Failed to call into JavaScript module method RCTEventEmitter.receiveEvent()
Description
Description After wrapping app using <SafeAreaProvider>…</SafeAreaProvider>
Getting following error,
Uncaught Error
{ "message": "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, GlobalPerformanceLogger, RCTNativeAppEventEmitter, SamplingProfiler, RCTDeviceEventEmitter, RCTLog, HeapCapture, Systrace. Did you forget to call registerCallableModule?", "stack": [] }
If I remove <SafeAreaProvider>…</SafeAreaProvider> . App works fine but without insets which causes issues with margins on top
React-native-navigation 8.3.2
Steps to reproduce
Upgraded to 077.3 Upgraded react-native-safe-area-context to 5.6.1 and this issue started happening
Snack or a link to a repository
https://github.com/AppAndFlow/react-native-safe-area-context/issues/661
Safe Area Context version
5.6.1
React Native version
0.77.3
Platforms
iOS
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
iPhone 16 Pro Max
Acknowledgements
Yes
@AkramHarazem I'm facing the same issue, are you using react-native-navigation? I have the same issue on iOS:
"react-native-navigation": "8.2.1",
"react-native": "0.77.3",
@AkramHarazem I'm facing the same issue, are you using react-native-navigation? I have the same issue on iOS:
"react-native-navigation": "8.2.1", "react-native": "0.77.3",
yes React-native-navigation: 8.3.2
@AkramHarazem I'm facing the same issue, are you using react-native-navigation? I have the same issue on iOS:
"react-native-navigation": "8.2.1", "react-native": "0.77.3",yes React-native-navigation: 8.3.2
Hi, have you fixed this error yet i am having the same error
"react-native-safe-area-context": "^5.5.2", "react-native": "0.81.4",
{
"react-native": "0.81.0",
"react-native-safe-area-context": "^5.6.1",
"@react-navigation/native": "^7.1.17"
}
Getting this too while trying to migrate to the new arch :(
Found this stack overflow post that has some potentially similar comments.
I can repro the error with minimal App.tsx like
export default () => {
return (
// Commenting this Provider out fixes the error
<SafeAreaProvider>
<View>
<Text>Hello world</Text>
</View>
</SafeAreaProvider>
)
{ "react-native": "^0.77.0", "react-native-safe-area-context": "^5.6.1" }
facing the same error after upgrading.
Has there been any update or fix regarding this?
I was stuck on this for hours and upgrading AppDelegate to Swift fixed the issue (even if I thought they were doing the same and it was just synthax, but it was probably not).
{ "react-native": "^0.82.0", "react-native-safe-area-context": "^5.6.2" }
facing the same error after upgrading. Has there been any update or fix regarding this?
I upgraded to React native 0.81.5 And I was able to resolve this error by following https://reactnative.dev/blog/2025/01/21/version-0.77#rctappdependencyprovider
#import <ReactAppDependencyProvider/RCTAppDependencyProvider.h>
self.dependencyProvider = [RCTAppDependencyProvider new];
I upgraded to React native 0.81.5 And I was able to resolve this error by following https://reactnative.dev/blog/2025/01/21/version-0.77#rctappdependencyprovider
#import <ReactAppDependencyProvider/RCTAppDependencyProvider.h>
self.dependencyProvider = [RCTAppDependencyProvider new];
This was it! I don't understand how this is not in the diff when using the upgrade helper. I had to add this into my swift AppDelegate and this example only had the objective-c example.
I upgraded to React native 0.81.5 And I was able to resolve this error by following https://reactnative.dev/blog/2025/01/21/version-0.77#rctappdependencyprovider
#import <ReactAppDependencyProvider/RCTAppDependencyProvider.h>
self.dependencyProvider = [RCTAppDependencyProvider new];
This solution also worked for me. I upgraded from React Native 0.74.5 to React Native 0.82.0. I'm assuming this issue can be closed?
I upgraded to React native 0.81.5 And I was able to resolve this error by following https://reactnative.dev/blog/2025/01/21/version-0.77#rctappdependencyprovider
#import <ReactAppDependencyProvider/RCTAppDependencyProvider.h>
self.dependencyProvider = [RCTAppDependencyProvider new];
This solution also worked for me, on React Native upgrade 0.74.6 -> 0.78.0