OkHttp integration breaks the app after upgrading OkHttp to 4.9.0+
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
**4.12.0**:
**OkHttp3**:
**x86_64 emulator SDK 29**:
Upgrade OkHttp from 4.8.1 to 4.9.0. Obfuscate the build - we use Dexguard 8.7.09. Run it. On the first attempt to load image our app just stops responding to any input. In the LogCat I observe the exception (see below). Downgrading okHttp to 4.8.1, disabling obfuscation or removing okHttp integration and switching to HURL stack fixes the issue.
Glide.with(context)
.load(imageUri)
.into(target);
**Stack trace / LogCat**:
```ruby
2021-02-11 13:06:28.907 9982-9982/? W/System.err: Caused by: java.lang.NoClassDefFoundError: okhttp3.OkHttpClient
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader$Factory.getInternalClient(Unknown Source:46)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader$Factory.(Unknown Source:55)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at com.bumptech.glide.integration.okhttp3.OkHttpGlideModule.registerComponents(Unknown Source:32)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at com.bumptech.glide.Glide.initializeGlide(Unknown Source:293)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at com.bumptech.glide.Glide.initializeGlide(Unknown Source:242)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at com.bumptech.glide.Glide.checkAndInitializeGlide(Unknown Source:201)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at com.bumptech.glide.Glide.get(Unknown Source:182)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at com.bumptech.glide.Glide.getRetriever(Unknown Source:749)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at com.bumptech.glide.Glide.with(Unknown Source:776)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at o.GeneralRange.onTransact(Unknown Source:40050)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at o.GeneralRange$onTransact.invoke(Unknown Source:1196)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at o.available.onChanged(Unknown Source:23)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at androidx.lifecycle.LiveData.considerNotify(Unknown Source:131)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at androidx.lifecycle.LiveData.dispatchingValue(Unknown Source:149)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at androidx.lifecycle.LiveData.setValue(Unknown Source:307)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at androidx.lifecycle.MutableLiveData.setValue(Unknown Source:50)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at o.hasLowerBound$getLastCustomNonConfigurationInstance.cancel(Unknown Source:1057)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at o.setNavigationIcon.onSuccess(Unknown Source:62)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at o.MenuItemHoverListener$asInterface.onSuccess(Unknown Source:64)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at o.setContentWidth$getDefaultImpl.onSuccess(Unknown Source:69)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at o.MenuPopupWindow$onTransact.run(Unknown Source:81)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: at o.getTextViewMethod$asInterface.run(Unknown Source:124)
2021-02-11 13:06:28.907 9982-9982/? W/System.err: ... 7 more
2021-02-11 13:06:28.907 9982-9982/? W/System.err: Caused by: java.lang.VerifyError: Verifier rejected class okhttp3.OkHttpClient: void okhttp3.OkHttpClient.(okhttp3.OkHttpClient$Builder) failed to verify: void okhttp3.OkHttpClient.(okhttp3.OkHttpClient$Builder): [0x5] register v3 has type Uninitialized This Reference: okhttp3.OkHttpClientAllocation PC: 0 but expected Reference: okhttp3.OkHttpClient (declaration of 'okhttp3.OkHttpClient' appears in base.apk!classes2.dex)
```
Contributor guide
Assessment
This issue has not been assessed yet.