lottie-react-native: Lottie Editor-generated file crashes application on Android Expo app but not iOS Expo app
Lottie file generated by Lottie Editor works on one platform and crashes the other
When editing a working Lottie file in Lottie’s web-based editor, the resulting export crashes my Expo app on Android but renders properly on iOS. Prior to the edit, the original file works fine on both Android and iOS.
Steps to Reproduce
- Upload this Lottie file in the Lottie Editor and replace one of the images in it. (I used GIMP)
- Export the JSON for your edit and embed it in an Expo application (link to an example with one image edited already)
- Run the Expo application on an Android device and an iOS device
Expected behavior: The Lottie file renders as displayed in the editor on both platforms without issue
Actual behavior: The Android Expo app crashes immediately but the iOS app renders it properly
Versions
...
lottie-react-native@5.1.5
expo-image@1.0.0
expo@48.0.10
...
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 17
downloading and using a Json from lottiefiles.com directly works fine, but when you open it in the editor and download it from there, it crashes the app.
For those who are using their own dev client instead of expo go (you bundle your app with dev-client build) and not seeing any animation following this guide from Expo: https://docs.expo.dev/versions/latest/sdk/lottie/ , try to rebuild your dev-client build and install again. This works for me.
I guess it’s because our build doesn’t have the native component that’s required. It’s weird that it doesn’t throw any error or warning but instead render a blank component.
Hope this helps
Lottie is now updated for Expo Go in the next release of Expo SDK. However, those who are using Expo Prebuilt should not have any problems. Cheers!
Here is how I finally did it :
assetsandlayersarraysopproperty (in seconds)Hopefully it helps someone else
I’m experiencing the same problem. lottie-react-native @5.1.4
I have the same problem. Even with lottie-react-native@6.0.0-rc.3