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

IOException: Failed to decode stream #1587

Closed
mursidyazar opened this issue Feb 20, 2017 · 3 comments
Closed

IOException: Failed to decode stream #1587

mursidyazar opened this issue Feb 20, 2017 · 3 comments

Comments

@mursidyazar
Copy link

https://s3.amazonaws.com/cactusexams/58aaf214425d7c0e5244d0ec1487598127433.jpeg

This image not load in api 23. It loads in api 21 smoothly. The logs and my codes are as follows.

D/skia: --- decoder->decode returned false
W/System.err: java.io.IOException: Failed to decode stream.
W/System.err: at com.squareup.picasso.BitmapHunter.decodeStream(BitmapHunter.java:145)
W/System.err: at com.squareup.picasso.BitmapHunter.hunt(BitmapHunter.java:217)
W/System.err: at com.squareup.picasso.BitmapHunter.run(BitmapHunter.java:159)
W/System.err: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
W/System.err: at java.lang.Thread.run(Thread.java:818)
W/System.err: at com.squareup.picasso.Utils$PicassoThread.run(Utils.java:411)

//CODES
Picasso.with(activity).setLoggingEnabled(true);
Picasso.Builder builder = new Picasso.Builder(activity);
builder.listener(new Picasso.Listener() {
@OverRide
public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception){
exception.printStackTrace();
}
});
builder.build().load(user.getProfileImageUrl()).into(itemIcon);

@JakeWharton
Copy link
Member

This error occurs when Android is unable to decode your image. There's nothing Picasso can do to correct this. Consider using another image format or re-encoding your image.

@novodimaporo
Copy link

novodimaporo commented Sep 28, 2017

I have the same issue, its quite unpredictable, sometimes it loads and sometimes not. If its because android cant decode it, wouldn't it be always not?

@jays95jp
Copy link

jays95jp commented Oct 4, 2017

I have same issue with API 26 (LGE Nexus 5X) Same log which one mentioned above.
Working fine with API 23
we use this type of url for load image: http://xxx/xxx/xxx/Colorado.jpg

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

4 participants