7mada123 / disposable_cached_images

MIT License
9 stars 4 forks source link

Android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'unimplemented'Input contained an error. #13

Open spauldhaliwal opened 1 month ago

spauldhaliwal commented 1 month ago

Some images don't show and return this error:

E/FlutterJNI(28988): Failed to decode image
E/FlutterJNI(28988): android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'unimplemented'Input contained an error.
E/FlutterJNI(28988):    at android.graphics.ImageDecoder.nCreate(Native Method)
E/FlutterJNI(28988):    at android.graphics.ImageDecoder.access$200(ImageDecoder.java:173)
E/FlutterJNI(28988):    at android.graphics.ImageDecoder$ByteBufferSource.createImageDecoder(ImageDecoder.java:250)
E/FlutterJNI(28988):    at android.graphics.ImageDecoder.decodeBitmapImpl(ImageDecoder.java:1862)
E/FlutterJNI(28988):    at android.graphics.ImageDecoder.decodeBitmap(ImageDecoder.java:1855)
E/FlutterJNI(28988):    at io.flutter.embedding.engine.FlutterJNI.decodeImage(FlutterJNI.java:561)

Example URL: https://seed-mix-image.spotifycdn.com/v6/img/folk_acoustic/5c3GLXai8YOMid29ZEuR9y/en/default

This error does not happen with Image.network. Furthermore, these errors do not trigger onError callback, so it's impossible to fallback to Image.network or a placeholder of some kind.

Edit: I also noticed that these images also don't show when building an app for macOS, however, on macOS no error is thrown. So I don't think it's platform specific, however, on Android at least an error is thrown.

7mada123 commented 4 weeks ago

Hi @spauldhaliwal Thanks for reporting this so I should be able to reproduce this bug with this image that you provide?

spauldhaliwal commented 4 weeks ago

Yep that's right.

7mada123 commented 4 weeks ago

I will into this