fresco
fresco copied to clipboard
Tap on retry logic doesn't work if cache image is broken
Here are the steps I reproduce the issue:
- Load an image with SimpleDraweeView e.g. (https://www.google.com.hk/logos/doodles/2016/charles-perraults-388th-birthday-5071286030041088-5656774724026368-ror.jpg)
- Find out the cache file by this URL according to this http://stackoverflow.com/a/31610386/827785
- I pull out the cache file, manually make it corrupted, push it back to the phone.
- Now it will show the retry icon when the image is loaded.
However, when I tap on it, see the log:
V/unknown:AbstractDraweeController: controller 52a0b440 44: final_failed @ onFailure: failure: java.lang.IllegalArgumentException: unknown image format
Is this retry logic expected according to design? What I am expecting is that, it will try to clear the wrong cache, and download it again from network.
@am5a03 I think this will resolve your issue
Fresco.getImagePipeline().evictFromCache(uri);
http://frescolib.org/docs/caching.html
and you can track fail in DraweeController
Should be fixed along with #1413. @am5a03 does it fix the issue for you?