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/iOS] Module RCTNativeAppEventEmitter is not a registered callable module

See original GitHub issue

After shipping app, I am getting lots of crash reports with the message as in title. Not sure how to reproduce as that’s not happening in development nor Hockey at all.

My use case is to just require NativeAppDeviceEmitter and addListener to listen for updates from native code.

Here’s the full trace for reference:

Thread : Fatal Exception: RCTFatalException: Unhandled JS Exception: Module RCTNativeAppEventEmitter is not a registered callable module.
0  CoreFoundation                 0x256b22eb __exceptionPreprocess
1  libobjc.A.dylib                0x24e7edff objc_exception_throw
2  CoreFoundation                 0x256b2231 -[NSException initWithCoder:]
3  XXXAppName                         0x129303 RCTFatal (RCTAssert.m:133)
4  XXXAppName                         0x124d1f -[RCTExceptionsManager reportFatalException:stack:exceptionId:] (RCTExceptionsManager.m:64)
5  CoreFoundation                 0x256b6cc4 __invoking___
6  CoreFoundation                 0x255e12ad -[NSInvocation invoke]
7  CoreFoundation                 0x255e4d47 -[NSInvocation invokeWithTarget:]
8  XXXAppName                         0x127a1d -[RCTModuleMethod invokeWithBridge:module:arguments:] (RCTModuleMethod.m:472)
9  XXXAppName                         0x142cc5 -[RCTBatchedBridge _handleRequestNumber:moduleID:methodID:params:] (RCTBatchedBridge.m:926)
10 XXXAppName                         0x142797 __33-[RCTBatchedBridge handleBuffer:]_block_invoke383 (RCTBatchedBridge.m:856)
11 libdispatch.dylib              0x2524fdd7 _dispatch_call_block_and_release
12 libdispatch.dylib              0x25259f97 _dispatch_queue_drain
13 libdispatch.dylib              0x25252f2f _dispatch_queue_invoke
14 libdispatch.dylib              0x2525b7b9 _dispatch_root_queue_drain
15 libdispatch.dylib              0x2525b193 _dispatch_worker_thread3
16 libsystem_pthread.dylib        0x253e8e0d _pthread_wqthread
17 libsystem_pthread.dylib        0x253e89fc start_wqthread

Anyone got some ideas how to debug that?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
daemonchencommented, Mar 11, 2016

@erdinc I added the code var NativeAppEventEmitter = require('RCTNativeAppEventEmitter'); and then it works. But I don’t know why?

I imported NativeAppEventEmitter like this before:

    import React, {
        AppRegistry,
        StyleSheet,
        TabBarIOS,
        Navigator,
        Image,
        Text,
        PushNotificationIOS,
        NativeAppEventEmitter,
        Linking,
        View,
        Animated
    } from 'react-native'

and this issue can be reproduced when switch simulator(such as from iphone 4s to iphone 5s) each time.

0reactions
gonghongxiacommented, Apr 26, 2016

var NativeAppEventEmitter = require(‘RCTNativeAppEventEmitter’) is right answer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native:Module RCTEventEmitter is not a registered ...
React Native:Module RCTEventEmitter is not a registered callable module (calling receiveTouches) · Restarted emulator (PC) · Rewrite all code.
Read more >
new nativeeventemitter | The AI Search Engine You Control
Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, ...
Read more >
React Native Navigation ERROR when using Drawer ... - Reddit
Module has not been registered as callable. ... HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, ...
Read more >
Active questions tagged react-native+typescript - Stack Overflow
Next React native Typescript path alias unable to resolve module ... Module has not been registered as callable. Registered callable JavaScript modules (n ......
Read more >
Requiring module "node_modules\react-native-reanimated ...
Module has not been registered as callable. ... HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, ...
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