[RN 0.70.0-rc.2] React Native Lottie - function getModule: assertion failed (moduleAsValue.isObject())
See original GitHub issueDescription
While testing the latest RC version, I’ve noticed the following error when starting the application:
Abort message: '/Users/alex/Documents/Projects/lottie-react-native/fabric-example/node_modules/react-native/ReactCommon/react/renderer/uimanager/bindingUtils.cpp:29: function getModule: assertion failed (moduleAsValue.isObject())'
@cortinico - I have provided a more simplified example project in my current WIP branch.
Version
0.70.1
Output of npx react-native info
System: OS: macOS 12.5 CPU: (12) x64 Intel® Core™ i7-9750H CPU @ 2.60GHz Memory: 125.38 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.14.2 - /usr/local/bin/node Yarn: 1.22.18 - ~/.yarn/bin/yarn npm: 5.1.0 - ~/Documents/Projects/lottie-react-native/node_modules/.bin/npm Watchman: Not Found Managers: CocoaPods: 1.11.3 - /Users/alex/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 28, 29, 30, 31, 32, 33 Build Tools: 30.0.2, 30.0.3, 31.0.0 System Images: android-29 | Google Play Intel x86 Atom, android-31 | Google Play Intel x86 Atom_64, android-32 | Google APIs Intel x86 Atom_64, android-32 | Google Play Intel x86 Atom_64, android-33 | Google APIs Intel x86 Atom_64, android-33 | Google Play Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8815526 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: 11.0.16 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: 0.70.0-rc.2 => 0.70.0-rc.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
- Clone https://github.com/AlexanderEggers/lottie-react-native/tree/feature/add-fabric-support
- yarn install
- cd lib
- yarn build
- cd …/examples/fabric
- yarn android
Snack, code example, screenshot, or link to a repository
https://github.com/AlexanderEggers/lottie-react-native/tree/feature/add-fabric-support
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:29 (17 by maintainers)

Top Related StackOverflow Question
@alfonsocj Thank you so much for looking into this problem from a different angle.
Based on your observations, I found the issue which was indeed part of the metro config file. I replaced my config with https://github.com/th3rdwave/react-native-safe-area-context/blob/main/fabric-example/metro.config.js for my fabric example project and seems to be working fine now. I believe that this specific behaviour really needs to be well documented for the new arch - these specific metro config changes were never needed for the old arch.
I also got the react-native-lottie library finally compatible with android for fabric 🎉 Just ios is missing but hopefully that won’t take as much time. 🤞
Thanks for reporting. For reference this a duplicate of #34056 #33618 As you provided a repro, we can investigate further 👍 I’ll get back to you