-
Notifications
You must be signed in to change notification settings - Fork 11
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
OTA update issues with minified bundle: Images & Lottie animations not displaying #10
Comments
let me take a look |
Hi @hson0512 , for the lottie, may I know when you update via OTA, you just update json file from assets, like: And for image, I have tried with --minify=true and still working, may I know all image even old image cannot show in the app, or just image update via OTA cannot display? |
For better clarity, I'll provide the export-android command I'm currently using on Windows: Regarding the Lottie issue: |
it weird, are there any specific configs of your babel or metro server? as you can see in example project I already used with minify and works as normal, I also used with react native 0.75, under 0.70 and still fine |
My metro.config.js
babel.config.js
Personally, I haven't seen any abnormalities in the 2 files that could cause errors. |
Hi @hson0512 , for Lottie issue I have found it related to this library, can refer here and try: lottie-react-native/lottie-react-native#1098 And about the image not show with minify, let debug together, you can try with example project first, and compare with your project and see any different things. |
Hi, Thank you for your project! |
I'm encountering issues with OTA updates in our application, specifically related to bundle minification and asset loading. I would really appreciate any guidance on this.
Current Setup:
React Native bundle generation command:
react-native bundle --platform android --dev false --minify=false --entry-file index.js
How we're importing assets:
Images:
<Image source={require('@/assets/images/logo.png')} />
Lottie animations:
<LottieView source={require('@/assets/animation.json')} />
Issues:
Images not displaying with minified bundle:
Images only display correctly after OTA when bundle is generated with --minify=false
With minified bundle (--minify=true), images fail to load after OTA update
Lottie animations not working after OTA:
.lottie files fail to display after hot update
This occurs regardless of minification settings (--minify=true/false)
Steps to Reproduce:
Generate bundle with minification:
react-native bundle --platform android --dev false --minify=true
Deploy OTA update
Observe:
Images fail to load in the app
Lottie animations don't display
Current Workaround:
We're currently forced to use --minify=false to get images working
No current workaround for Lottie animations
Is this a known issue with minified bundles?
Are there specific configurations needed for Lottie animations to work with OTA updates?
Is there a different way I should be importing/requiring these assets?
Environment:
React Native version: 0.75.2
Lottie version: "lottie-react-native": "^7.0.0"
I would really appreciate that could help.
The text was updated successfully, but these errors were encountered: