-
Notifications
You must be signed in to change notification settings - Fork 467
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
ImageCachePreloader does not work on first time preloading #163
Comments
After extensive testing i can confirm that the bug occurs on iOS when starting from a fresh React Native 0.59.8 install. The first time the app is launched, ImageCachePreloader will only preload the first URL in the urlsToPreload list. The bug does not seem to appear on consecutive launches. Gist to files used to recreate bug. Steps to recreate bug.
Testing further. If you launch the app again with internet access on the device enabled the urlsToPreload list will be successfully cached.
|
Update I've since posting the issue replaced react-native-cached-image with react-native-fast-image. After more than two weeks of waiting for a response from maintainers i finally decided it was time to call quits and move on. React-native-fast-image has so far worked flawlessly, and also appears to perform noticeably better than react-native-cached-image while lacking none of the features. It was a fairly effortless procedure to replace the two. If anyone has questions on replacing react-native-cached-image with react-native-fast-image, i'm happy to help. |
I've realized that ImageCachePreloader doesn't work when "successfully" attempting to preload urls for the first time. By "successfully" i mean one preload attempt with an available internet connection.
Edit:
This bug emerged when upgrading from React Native 0.56.0 to React Native 0.59.8. Bug is confirmed to occur on iOS when starting from a fresh React Native 0.59.8 install.
Fastest way to reproduce bug
I've run all scenarios i can think of to narrow it down to this behavior. I've tried variations of using a ImageCacheProvider component, as well as using a standalone ImageCachePreloader.
In all scenarios tried, i enabled/disabled setting the urlsToPreload and/or disabling ImageCachePreloader.preloadImages. The bug is reproduced no matter if i have a combination of both ways of preloading enabled, or one at a time.
Observations
Screencap of bug: https://vimeo.com/337032777
Notice how the images are neither displayed on the device, nor appear in the device file system until the second attempt. Result is the same if running from xcode again rather than reloading in-app.
Setup
Holler if code is wanted.
Any idea what the root of the bug might be @fungilation, @kfiroo ?
The text was updated successfully, but these errors were encountered: