react-native-dynamic-bundle
react-native-dynamic-bundle copied to clipboard
Local images disappeared after applying new bundle
After downloading and applying a new bundle all local image assets (png) not displaying in the app.
I'm creating new bundle with this command: react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
What can be the reason for such a problem?
RN 60.4
AFAIK, any images included through the standard bundling mechanism do not have stable identities and are not guaranteed to be accessible if you build a newer version, although I never investigated this. If I wanted to use this I'd consider also loading the assets over HTTP at the same time as the new bundle.
Alternatively, you could stick some debugging into the new bundle and look what files / assets it's trying to load, and if these exist...
@mauritsd thanks for a response! Yes, of course, any images included through the standard bundling mechanism. But any images are displayed after applying the new bundle (an old one too). All static images that were delivered to the app with initial APK installation have disappeared.
I mean, if some people use this package do they have any static images? Is there anybody else who experienced this issue or somebody who has local assets?
I have investigated that js-bundle includes paths to static images with hashes. None of these paths and hashes were changed in the new bundle. Also any errors in logs. So it is not clear what happens under the hood of this package when I apply a new bundle.
Such an issue also has microsoft/react-native-code-push package that uses a similar idea of updating js-bundle of the app.
I will be grateful for the feedback or any related thoughts
this may help: https://stackoverflow.com/questions/60896279/resolving-assets-relative-to-react-native-bundle-file-outside-project-root
Did you end up solving this issue?