Hello.
I'm using FirebaseImageLoader which is great, but is there any way to get rid of java.io.IOException: Could not open resulting stream. ?
I have objects that may not have saved image in Firebase Storage so this exception spam my logcat
This could be an issue with the library, but please ask a question on StackOverflow first.
@stasbar there is not enough information here to debug your issue, the issue template is not present and that exception is very general. In this case I agree with @TheCraftKid, sounds specific to your application and therefore better for StackOverflow.
This also happens to me. I tried everything to fix this issue. What I found is it only happens if I upgrade Firebase SDK to 10.2.4 I tested several times and same result all the time.
Here I share the error stack trace. Now I'm just using 10.2.1 and there's no same error.
java.io.IOException: Could not open resulting stream.
at com.google.firebase.storage.StreamDownloadTask.zzacI(Unknown Source)
at com.google.firebase.storage.StreamDownloadTask.zza(Unknown Source)
at com.google.firebase.storage.StreamDownloadTask$1.zzacK(Unknown Source)
at com.google.firebase.storage.StreamDownloadTask$1.call(Unknown Source)
at com.google.firebase.storage.StreamDownloadTask$zza.zzacM(Unknown Source)
at com.google.firebase.storage.StreamDownloadTask$zza.read(Unknown Source)
at java.io.BufferedInputStream.read(BufferedInputStream.java:290)
at com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream.fillbuf(RecyclableBufferedInputStream.java:166)
at com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream.read(RecyclableBufferedInputStream.java:229)
at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$StreamReader.getUInt16(ImageHeaderParser.java:334)
at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser.getType(ImageHeaderParser.java:87)
at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder$ImageTypeParser.parse(GifBitmapWrapperResourceDecoder.java:147)
at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeStream(GifBitmapWrapperResourceDecoder.java:82)
at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:71)
at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:61)
at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:22)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromSourceData(DecodeJob.java:190)
at com.bumptech.glide.load.engine.DecodeJob.decodeSource(DecodeJob.java:177)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromSource(DecodeJob.java:128)
at com.bumptech.glide.load.engine.EngineRunnable.decodeFromSource(EngineRunnable.java:122)
at com.bumptech.glide.load.engine.EngineRunnable.decode(EngineRunnable.java:101)
at com.bumptech.glide.load.engine.EngineRunnable.run(EngineRunnable.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(FifoPriorityThreadPoolExecutor.java:118)
Using Firebase 1.2.0 and FirebaseUI 1.2 and getting this issue. Using Glide to handle images and nothing at all will come through from Firebase Storage.
I have the same problem. I got this error with 10.2.6 but it works good with 10.2.1, so i can't understand why somebody closed this issue...
My sources (Kotlin):
Glide.with(app)
.using(FirebaseImageLoader())
.load(userAvatar)
.placeholder(defaultAvatar)
.listener(object : RequestListener<StorageReference, GlideDrawable> {
override fun onResourceReady(resource: GlideDrawable?, model: StorageReference?, target: Target<GlideDrawable>?, isFromMemoryCache: Boolean, isFirstResource: Boolean): Boolean {
Log.e("test", "onResourceReady")
return false
}
override fun onException(e: Exception?, model: StorageReference?, target: Target<GlideDrawable>?, isFirstResource: Boolean): Boolean {
Log.e("test", "onException", e)
return false
}
})
.into(imageView)
I'm always have "onException" and no avatar in "imageView"
@samtstern please reopen issue. This problem is actual for 10.2.6 version.
+1
Very annoying
For those having the issue: does the 11.0.1 SDK and/or FirebaseUI 2.0.1 fix it for you?
@samtstern 11.0.1 SDK with 2.0.1 FirebaseUI fixed it for me.
Most helpful comment
+1
Very annoying