Fixed
Status Update
Comments
[Deleted User] <[Deleted User]> #2
workaround would be to explicitly force the app's OkHttp version: implementation "com.squareup.okhttp3:okhttp-urlconnection:$deps.okhttp"
[Deleted User] <[Deleted User]> #3
Just pasting the stack trace for reference:
Fatal Exception: java.lang.VerifyError: Verifier rejected class okhttp3.internal.huc.OkHttpURLConnection: p1.f okhttp3.internal.huc.OkHttpURLConnection.d() failed to verify: p1.f okhttp3.internal.huc.OkHttpURLConnection.d(): [0x95] cannot access instance field q1.b0 p1.l0.n.e.b from object of type Unresolved Reference: p1.l0.n.f (declaration of 'okhttp3.internal.huc.OkHttpURLConnection' appears in /data/app/com......==/base.apk!classes3.dex)
at okhttp3.internal.huc.OkHttpsURLConnection.<init>(OkHttpsURLConnection.java:34)
at okhttp3.OkUrlFactory.open(OkUrlFactory.java:75)
at okhttp3.OkUrlFactory.open(OkUrlFactory.java:65)
at com.google.android.gms.internal.mlkit_entity_extraction.zzut.zza(zzut.java:1)
at com.google.android.gms.internal.mlkit_entity_extraction.zzus.zzf(zzus.java:3)
at com.google.android.gms.internal.mlkit_entity_extraction.zzus.zze(zzus.java:713)
at com.google.android.gms.internal.mlkit_entity_extraction.zzuo.run(zzuo.java:1)
at com.google.android.gms.internal.mlkit_entity_extraction.zzbad.run(zzbad.java:1)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Fatal Exception: java.lang.VerifyError: Verifier rejected class okhttp3.internal.huc.OkHttpURLConnection: p1.f okhttp3.internal.huc.OkHttpURLConnection.d() failed to verify: p1.f okhttp3.internal.huc.OkHttpURLConnection.d(): [0x95] cannot access instance field q1.b0 p1.l0.n.e.b from object of type Unresolved Reference: p1.l0.n.f (declaration of 'okhttp3.internal.huc.OkHttpURLConnection' appears in /data/app/com......==/base.apk!classes3.dex)
at okhttp3.internal.huc.OkHttpsURLConnection.<init>(OkHttpsURLConnection.java:34)
at okhttp3.OkUrlFactory.open(OkUrlFactory.java:75)
at okhttp3.OkUrlFactory.open(OkUrlFactory.java:65)
at com.google.android.gms.internal.mlkit_entity_extraction.zzut.zza(zzut.java:1)
at com.google.android.gms.internal.mlkit_entity_extraction.zzus.zzf(zzus.java:3)
at com.google.android.gms.internal.mlkit_entity_extraction.zzus.zze(zzus.java:713)
at com.google.android.gms.internal.mlkit_entity_extraction.zzuo.run(zzuo.java:1)
at com.google.android.gms.internal.mlkit_entity_extraction.zzbad.run(zzbad.java:1)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
so...@google.com <so...@google.com> #4
Hi our internal okhttp-urlconnection is 3.12.1 and it will require a new release to update it. Before that, could you try forcing a strict dependency for this target in your app?
implementation('com.squareup.okhttp3:okhttp-urlconnection') {
version {
strictly '3.12.1'
}
}
implementation('com.squareup.okhttp3:okhttp-urlconnection') {
version {
strictly '3.12.1'
}
}
[Deleted User] <[Deleted User]> #5
Sorry but we cannot downgrade to such an old version. The workaround we adopted for now is
implementation("com.google.mlkit:entity-extraction:${deps.entityextraction}") {
exclude group: 'com.google.guava', module: 'listenablefuture'
exclude group: 'com.squareup.okhttp3', module: 'okhttp-urlconnection' // 3.12.1 is causing a crash as it references a now-removed class
}
implementation "com.squareup.okhttp3:okhttp-urlconnection:$deps.okhttp"
which leads to
% ./gradlew :app:dependencies | grep okhttp-urlconnection
+--- com.squareup.okhttp3:okhttp-urlconnection:4.9.1
implementation("com.google.mlkit:entity-extraction:${deps.entityextraction}") {
exclude group: 'com.google.guava', module: 'listenablefuture'
exclude group: 'com.squareup.okhttp3', module: 'okhttp-urlconnection' // 3.12.1 is causing a crash as it references a now-removed class
}
implementation "com.squareup.okhttp3:okhttp-urlconnection:$deps.okhttp"
which leads to
% ./gradlew :app:dependencies | grep okhttp-urlconnection
+--- com.squareup.okhttp3:okhttp-urlconnection:4.9.1
so...@google.com <so...@google.com>
ja...@google.com <ja...@google.com> #6
Created internal
ja...@google.com <ja...@google.com> #7
Entity Extraction released a new beta2 SDK which doesn't depend on okhttp-urlconnection anymore.
Description
- Phone make and model: Samsung, Xiaomi, Nokia - any
- OS version: verified on OS 8.0 and 8.1
- ML Kit APIs and versions: 16.0.0-beta1
### STEPS ###
1. use EntityExtraction.getClient(options).downloadModelIfNeeded()
### EXPECTED ###
no crash
### ACTUAL ###
`okhttp3.internal.huc.OkHttpURLConnection` is referenced by `okhttp-urlconnection:3.12.1` within `com.google.mlkit:entity-extraction` but since versions > 3.13.1 of OkHttp removed this class, it crashes
### ADDITIONAL INFORMATION ###
okhttp3.internal.huc.OkHttpURLConnection.d(): [0x95] cannot access instance field q1.b0 p1.l0.n.e.b from object of type Unresolved Reference: p1.l0.n.f (declaration of 'okhttp3.internal.huc.OkHttpURLConnection' appears in /data/app/...==/base.apk:classes3.dex)