question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). When Upgrading To React Native v0.70

See original GitHub issue

Description

Upgrade from 0.68.1 to 0.70.0. Builds fine in Xcode. Launches Simulator. Splash screen for app appears.

and then it crashes with the error:

ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes

Version

0.70.0

Output of npx react-native info

ystem: OS: macOS 12.3.1 CPU: (4) x64 Intel® Core™ i7-4578U CPU @ 3.00GHz Memory: 1.20 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.15.0 - /usr/local/bin/node Yarn: Not Found npm: 8.5.5 - /usr/local/bin/npm Watchman: 2022.03.21.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: Not Found react-native: Not Found react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

Upgrade from 0.68.1 to 0.70.0. Builds fine in Xcode. Launches Simulator. Splash screen for app appears.

and then it crashes with the error:

ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes

Snack, code example, screenshot, or link to a repository

Screen Shot 2022-09-14 at 7 06 35 AM

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:66
  • Comments:179

github_iconTop GitHub Comments

77reactions
GrimDevcommented, Sep 15, 2022

I succeed to avoid this error. In my case, it was due to the react-native-gesture-handler that changed.

Previously we needed to import it at the top of the root file, now we must do that in App.js instead

import { GestureHandlerRootView } from 'react-native-gesture-handler';
/* ... */
// Wrap your app with the new GestureHandler
<GestureHandlerRootView style={{ flex: 1 }}>
  /* your app */
</GestureHandlerRootView>

Hope it will help

64reactions
spearghostcommented, Sep 15, 2022

i have the same issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

I have some problem when I upgrade my react-native version ...
I was clean my cache but It dont work!!! ERROR TypeError: undefined is not a function, js engine: hermes ERROR Invariant Violation: Failed...
Read more >
failed to call into javascript module method ... - You.com
The error message ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication() indicates that there is a problem with ...
Read more >
AppRegistry - React Native
App root components should register themselves with AppRegistry. ... with the tag that was passed into runApplication .
Read more >
React Native remote debugging does not work with Babylon ...
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable.
Read more >
React Native Navigation ERROR when using Drawer ... - Reddit
npm install react-navigation-drawer ... ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication() ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found