📢 Describe the bug
If OkHttp client with the ChuckerInterceptor is used for image downloads then the requests fail.
💣 To Reproduce
- Run the sample project. - https://github.com/MiSikora/Chucker-Bug
- Run the app.
- Select the check box to enable Chucker.
- Press either
Coil or Picasso buttons.
🔧 Expected behavior
The image should be downloaded and displayed in the ImageView. It should work in the same way as if the ChuckerInterceptor was disabled.
📷 Screenshots
Stack trace for Picasso.
java.io.IOException: Failed to decode stream.
at com.squareup.picasso.BitmapHunter.decodeStream(BitmapHunter.java:161)
at com.squareup.picasso.BitmapHunter.hunt(BitmapHunter.java:229)
at com.squareup.picasso.RequestCreator.get(RequestCreator.java:429)
at io.mehow.demo.MainActivity$onCreate$3$1.invoke(MainActivity.kt:54)
at io.mehow.demo.MainActivity$onCreate$3$1.invoke(MainActivity.kt:23)
at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
Stack trace for Coil.
java.lang.IllegalStateException: BitmapFactory returned a null Bitmap. Often this means BitmapFactory could not decode the image data read from the input source (e.g. network or disk) as it's not encoded as a valid image format.
at coil.decode.BitmapFactoryDecoder.decode(BitmapFactoryDecoder.kt:156)
at coil.RealImageLoader$loadData$2.invokeSuspend(RealImageLoader.kt:392)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:561)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:727)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:667)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:655)
📱 Smartphone
- Device: Any Device
- OS: Any OS
- Lib version:
3.1.1
📄 Additional context
Issue does not exist in 3.1.0. It was introduced with 3.1.1.
📢 Describe the bug
If
OkHttpclient with theChuckerInterceptoris used for image downloads then the requests fail.💣 To Reproduce
CoilorPicassobuttons.🔧 Expected behavior
The image should be downloaded and displayed in the ImageView. It should work in the same way as if the
ChuckerInterceptorwas disabled.📷 Screenshots
Stack trace for
Picasso.Stack trace for
Coil.📱 Smartphone
3.1.1📄 Additional context
Issue does not exist in
3.1.0. It was introduced with3.1.1.