You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Image downloads randomly fail (tested on Wikipedia) with a forbidden User-Agent policy error.
Retrying the download doesn't resolve it. Restarting the app sometimes resolve it.
I've written a test app showcasing how it randomly fails on different images - https://github.com/nirbil/FFImageTester
It's configured to use only memory cache and it iterates through some random images from Wikipedia.
Notice how it fails on different images, and after restarting the app it may fail on others.
I tried to set a custom HttpClient that adds the user-agent string through the ImageService initialization API, that but that had no effect.
I also tried downgrading to version 2.4.9.961 like was suggested on some other similar bugs but that had no effect.
Eventually I managed to bypass the bug by using that HttpClient to get the stream on my own and set a StreamImageSource. The downside of that however is that you lose caching for those resources.
Running under UWP and latest FFImageLoading 2.4.11.982.
The text was updated successfully, but these errors were encountered:
nirdil
changed the title
On windows image download randomly fail
On windows image download fails randomly
Feb 19, 2024
Eventually I managed to circumvent this by registering to the error event and in case of a failure attach a custom DataResolver that fetches the right stream with an user-agent enabled HttpClient and then call ReloadImage
Image downloads randomly fail (tested on Wikipedia) with a forbidden User-Agent policy error.
Retrying the download doesn't resolve it. Restarting the app sometimes resolve it.
I've written a test app showcasing how it randomly fails on different images -
https://github.com/nirbil/FFImageTester
It's configured to use only memory cache and it iterates through some random images from Wikipedia.
Notice how it fails on different images, and after restarting the app it may fail on others.
I tried to set a custom HttpClient that adds the user-agent string through the ImageService initialization API, that but that had no effect.
I also tried downgrading to version 2.4.9.961 like was suggested on some other similar bugs but that had no effect.
Eventually I managed to bypass the bug by using that HttpClient to get the stream on my own and set a StreamImageSource. The downside of that however is that you lose caching for those resources.
Running under UWP and latest FFImageLoading 2.4.11.982.
The text was updated successfully, but these errors were encountered: