Failed to call into JavaScript module method RCTEventEmitter.receiveEvent(). Module has not been registered as callable.
After upgrading to React Native 0.77 or later with the New Architecture, a screen that uses a library's native component fails with:
Error: Failed to call into JavaScript module method RCTEventEmitter.receiveEvent(). Module has not been registered as callable. Registered callable JavaScript modules (n = 9): AppRegistry, HMRClient, ...
It often shows up right after wrapping the app in a provider such as SafeAreaProvider, and removing the provider makes it go away, so it looks like a bug in that library. In Release builds it can be a crash at launch.
Why. Since React Native 0.77, AppDelegate must hand third-party Fabric components to React Native through RCTAppDependencyProvider. The release notes call it "a new line in the community template that, if missed, can cause some runtime issues". Without it, library components fall back to the legacy interop layer, which sends events through RCTEventEmitter, a module the New Architecture never registers. Projects upgraded by hand, or whose AppDelegate was customised, often miss the line.
Fix. Add it to your AppDelegate.
Objective-C (AppDelegate.mm), before calling super:
#import <ReactAppDependencyProvider/RCTAppDependencyProvider.h>
self.dependencyProvider = [RCTAppDependencyProvider new];
Swift, React Native 0.77 and 0.78 (class AppDelegate: RCTAppDelegate):
import ReactAppDependencyProvider
self.dependencyProvider = RCTAppDependencyProvider()
Swift, React Native 0.79 and later (RCTReactNativeFactory):
import ReactAppDependencyProvider
delegate.dependencyProvider = RCTAppDependencyProvider()
Then cd ios && pod install and rebuild. Clearing caches or reinstalling pods alone does not fix it.
Check your project. npx nativekeel reports an AppDelegate without RCTAppDependencyProvider on React Native 0.77 and later, before the error appears.
npx nativekeel