Invariant Violation: Native module cannot be null.
See original GitHub issueI have been using v4.0.0 without problems. Updating to v5.0.0 is causing the error below on IOS. Going back to v4.0.0 (no other changes) fixes the issue.
I just updated the version and ran yarn install
& pod install
.
The bridging header is in the project.
React-Native is at 0.62.2.
Are there any other steps we have to complete to upgrade?
Invariant Violation: Native module cannot be null.
invariant
browser.js:38:14
constructor
NativeEventEmitter.js:37:6
<global>
Geolocation.native.js:3:28
loadModuleImplementation
require.js:323:4
guardedLoadModule
require.js:212:11
metroRequire
require.js:130:6
<unknown>
index.bundle?platform=ios&dev=true&minify=false:234779:44
loadModuleImplementation
require.js:323:4
guardedLoadModule
require.js:212:11
metroRequire
require.js:130:6
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Invariant Violation: Native module cannot be null #43 - GitHub
At iOS, it builds successfully, however, when the app starts, I get this error: Invariant Violation: Native module cannot be null.
Read more >(React Native - Invariant Violation: Native module cannot be null
This module (aws-amplify@unstable) introduced an error saying TypeError: undefined is not an object (evaluating '_core.Amplify.register') so ...
Read more >Invariant Violation: Native module cannot be null. on Managed ...
SDK Version: 41.0.0; Platforms(Android/iOS/web/all): Android/ios. I upgraded to SDK 41 yesterday and worked out some smaller issues before ...
Read more >" has not been registered" and "Invariant Violation: Native ...
I am working on a project in React Native using Expo and Firebase. ... and "Invariant Violation: Native module cannot be null" errors ......
Read more >Error Running mobile-preview "Invariant Violation: Native ...
Hello, trying to setup the mobile-preview app for component dev. Just trying to run the app in Xcode at this point, not loading...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Experiencing the same problems as @blumendorf during jest testing
Edit: This is because with v5 we now need to mock the module implementation like:
Guys! Make sure to create the swift file with bridging support as mentioned on Readme. Game changer, i promise! 🥇