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.

[Android] NativeModules Runtime Error

See original GitHub issue
03-14 13:39:49.251 6001-6036/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
                                                 Process: com.fbtmobile, PID: 6001
                                                 com.facebook.react.common.JavascriptException: Requiring unknown module "NativeModules"., stack:
                                                 o@2:742
                                                 n@2:426
                                                 i@2:348
                                                 t@2:210
                                                 exports@759:402
                                                 <unknown>@446:6937
                                                 n@2:557
                                                 i@2:348
                                                 t@2:210
                                                 <unknown>@445:30
                                                 n@2:557
                                                 i@2:348
                                                 t@2:210
                                                 <unknown>@365:208
                                                 n@2:557
                                                 i@2:348
                                                 t@2:210
                                                 <unknown>@12:38
                                                 n@2:557
                                                 i@2:278
                                                 t@2:210
                                                 global code@1087:9
                                                 
                                                     at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:97)
                                                     at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:81)
                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                     at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:319)
                                                     at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158)
                                                     at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
                                                     at android.os.Handler.handleCallback(Handler.java:815)
                                                     at android.os.Handler.dispatchMessage(Handler.java:104)
                                                     at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
                                                     at android.os.Looper.loop(Looper.java:207)
                                                     at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
                                                     at java.lang.Thread.run(Thread.java:818)

It’s happening when I try to release an .apk file following the docs: https://facebook.github.io/react-native/docs/signed-apk-android.html

react-native version: 0.41.2

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
marcoaciernocommented, Mar 15, 2017

Same issue with 0.42.0

0reactions
mcconkieecommented, Dec 4, 2017

@brunocascio / @marcoacierno - i’m having this exact issue w/ 0.42.0. - however i’m not seeing a reactotron dependency. Any more explanation why production builds fail with this exception?

12-04 13:49:27.006  3484  3524 E AndroidRuntime: java.lang.RuntimeException: com.facebook.react.devsupport.JSException: Error: Requiring module "NativeModules" which threw an exception (index.android.bundle:1)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler.handleException(DefaultNativeModuleCallExceptionHandler.java:24)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at com.facebook.react.devsupport.DisabledDevSupportManager.handleException(DisabledDevSupportManager.java:158)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at com.facebook.react.cxxbridge.CatalystInstanceImpl.onNativeException(CatalystInstanceImpl.java:471)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at com.facebook.react.cxxbridge.CatalystInstanceImpl.access$400(CatalystInstanceImpl.java:51)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at com.facebook.react.cxxbridge.CatalystInstanceImpl$NativeExceptionHandler.handleException(CatalystInstanceImpl.java:487)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:33)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at android.os.Looper.loop(Looper.java:148)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at java.lang.Thread.run(Thread.java:818)
12-04 13:49:27.006  3484  3524 E AndroidRuntime: Caused by: com.facebook.react.devsupport.JSException: Error: Requiring module "NativeModules" which threw an exception (index.android.bundle:1)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at android.os.Handler.handleCallback(Handler.java:739)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at android.os.Handler.dispatchMessage(Handler.java:95)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  ... 3 more
12-04 13:49:27.006  3484  3524 E AndroidRuntime: Caused by: com.facebook.jni.CppException: Error: Requiring module "NativeModules" which threw an exception (index.android.bundle:1)
12-04 13:49:27.006  3484  3524 E AndroidRuntime:  ... 7 more
Read more comments on GitHub >

github_iconTop Results From Across the Web

Exception in 'NativeModules': java.lang.RuntimeException ...
RuntimeException: Got unknown argument class: Object ... I am trying to call a native ReactMethod from react native but it is throwing the...
Read more >
Android Native Modules
Android studio is an IDE built for Android development and using it will help you resolve minor issues like code syntax errors quickly....
Read more >
Android Guide to TurboModules in React Native for Early ...
Finally, at app startup, all native modules needed to be loaded into memory. ... EDIT: Users of React-Native 0.69.0 will see false errors...
Read more >
Implementing Bridging For Android Native Modules
In the above code, success and error callbacks are assigned to the class level callbacks , so that they can be accessed from...
Read more >
Enforcing Product Partition Interfaces | Android Open Source ...
Native modules in the product partition to link: ... then look for build and runtime errors and resolve them. To check the device...
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