Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to decode image #523

Open
rashmisridar opened this issue Oct 27, 2022 · 7 comments
Open

Failed to decode image #523

rashmisridar opened this issue Oct 27, 2022 · 7 comments

Comments

@rashmisridar
Copy link

There list of images can be scrolled horizontally and vertically . Phasing error log displayed in the below. Let me know what is the issue . Thanks

Failed to decode image
E/FlutterJNI( 6152): android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'unimplemented'Input contained an error.
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.nCreate(Native Method)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.access$200(ImageDecoder.java:169)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder$ByteBufferSource.createImageDecoder(ImageDecoder.java:246)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.decodeBitmapImpl(ImageDecoder.java:1754)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.decodeBitmap(ImageDecoder.java:1747)
E/FlutterJNI( 6152): at io.flutter.embedding.engine.FlutterJNI.decodeImage(FlutterJNI.java:524)
I/flutter ( 6152): Exception: Invalid image data
E/FlutterJNI( 6152): Failed to decode image
E/FlutterJNI( 6152): android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'unimplemented'Input contained an error.
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.nCreate(Native Method)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.access$200(ImageDecoder.java:169)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder$ByteBufferSource.createImageDecoder(ImageDecoder.java:246)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.decodeBitmapImpl(ImageDecoder.java:1754)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.decodeBitmap(ImageDecoder.java:1747)
E/FlutterJNI( 6152): at io.flutter.embedding.engine.FlutterJNI.decodeImage(FlutterJNI.java:524)
I/flutter ( 6152): Exception: Invalid image data
E/FlutterJNI( 6152): Failed to decode image
E/FlutterJNI( 6152): android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'unimplemented'Input contained an error.
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.nCreate(Native Method)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.access$200(ImageDecoder.java:169)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder$ByteBufferSource.createImageDecoder(ImageDecoder.java:246)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.decodeBitmapImpl(ImageDecoder.java:1754)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.decodeBitmap(ImageDecoder.java:1747)
E/FlutterJNI( 6152): at io.flutter.embedding.engine.FlutterJNI.decodeImage(FlutterJNI.java:524)
I/flutter ( 6152): Exception: Invalid image data
E/FlutterJNI( 6152): Failed to decode image
E/FlutterJNI( 6152): android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'unimplemented'Input contained an error.
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.nCreate(Native Method)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.access$200(ImageDecoder.java:169)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder$ByteBufferSource.createImageDecoder(ImageDecoder.java:246)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.decodeBitmapImpl(ImageDecoder.java:1754)
E/FlutterJNI( 6152): at android.graphics.ImageDecoder.decodeBitmap(ImageDecoder.java:1747)
E/FlutterJNI( 6152): at io.flutter.embedding.engine.FlutterJNI.decodeImage(FlutterJNI.java:524)
I/flutter ( 6152): Exception: Invalid image data

@rashmisridar
Copy link
Author

`` ExtendedImage.network(
imgUrl,
enableMemoryCache: false, // do not store in memory
enableLoadState: false,
clearMemoryCacheIfFailed: true,
fit: BoxFit.fill,
// cache: true,
clearMemoryCacheWhenDispose: true,
loadStateChanged: (ExtendedImageState state) {
switch (state.extendedImageLoadState) {
case LoadState.loading:
return Container(
//color: Colors.black.withOpacity(0.5),
child: const CircularProgressIndicator(color: Colors.red,),

    );
    break;
  case LoadState.failed:
    return Container(
      //color: Colors.black.withOpacity(0.5),
      child: const CircularProgressIndicator(color: Colors.white,),

    );
    break;
  case LoadState.completed:
    return null;
    break;
}

    },
  )``

@KaelTeck
Copy link

Did you finally find a solution?

@zmtzawqlp
Copy link
Member

it's flutter sdk to decode image, you should provide error image url and release a issue to flutter team

@KaelTeck
Copy link

Ok I will do it.
In fact my images URLs are google images thumbnails. They have this format :
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRp3OJBwdW-vreJNhEmYm_BQWAoHbfa_5WohKn4nwltRu1XdIk&s"
ExtendedImage.network displays them correctly but sometimes some of them failed and throw the error above.

@GeylanKalafMohe
Copy link

Any update? Still facing this issue

@GeylanKalafMohe
Copy link

E/FlutterJNI(29060): Failed to decode image
E/FlutterJNI(29060): android.graphics.ImageDecoder$DecodeException: Failed to create image decoder with message 'unimplemented'Input contained an error.
E/FlutterJNI(29060): at android.graphics.ImageDecoder.nCreate(Native Method)
E/FlutterJNI(29060): at android.graphics.ImageDecoder.-$$Nest$smnCreate(Unknown Source:0)
E/FlutterJNI(29060): at android.graphics.ImageDecoder$ByteBufferSource.createImageDecoder(ImageDecoder.java:242)
E/FlutterJNI(29060): at android.graphics.ImageDecoder.decodeBitmapImpl(ImageDecoder.java:2015)
E/FlutterJNI(29060): at android.graphics.ImageDecoder.decodeBitmap(ImageDecoder.java:2008)
E/FlutterJNI(29060): at io.flutter.embedding.engine.FlutterJNI.decodeImage(FlutterJNI.java:558)

@ddxl123
Copy link

ddxl123 commented Oct 19, 2024

It only happens under certain circumstances, such as there being an issue on Page A, but Page B functions normally. However, I haven’t been able to pinpoint where the problem lies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants