new NativeEventEmitter() was called with a non-null argument without the required `addListener` method.
See original GitHub issuePlease provide all the information requested. Issues that do not follow this format are likely to stall.
Description
when I open the app after upgraded to RN 0.65 I get 2 warnings
React Native version:
0.65
Snack, code example, screenshot, or link to a repository:
WARN new NativeEventEmitter
was called with a non-null argument without the required addListener
method.
WARN new NativeEventEmitter
was called with a non-null argument without the required removeListeners
method.
LOG Reactotron Configured
LOG Running “PnwApp” with {“rootTag”:21}
LOG Skipping setJSExceptionHandler: Reason: In DEV mode and allowedInDevMode = false
WARN new NativeEventEmitter
was called with a non-null argument without the required addListener
method.
at PageSplashScreen
at RCTView
at View
at RootNavigation
at EnsureSingleNavigator
at BaseNavigationContainer
at ThemeProvider
at NavigationContainer
at RCTView
at View
at RCTView
at View
at MenuProvider
at RCTView
at View
at SafeAreaView
at Provider
at App
at RCTView
at View
at RCTView
at View
at AppContainer
at PnwApp
WARN new NativeEventEmitter
was called with a non-null argument without the required removeListeners
method.
at PageSplashScreen
at RCTView
at View
at RootNavigation
at EnsureSingleNavigator
at BaseNavigationContainer
at ThemeProvider
at NavigationContainer
at RCTView
at View
at RCTView
at View
at MenuProvider
at RCTView
at View
at SafeAreaView
at Provider
at App
at RCTView
at View
at RCTView
at View
at AppContainer
at PnwApp
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5
Top GitHub Comments
Could the docs be updated to include this? I was implementing a brand new android module and couldn’t figure out why I was getting this error because it wasn’t mentioned at all in https://reactnative.dev/docs/native-modules-android#sending-events-to-javascript
Are native modules now expected to keep track of their own listeners? Or is this handled automatically? The example you linked just shows empty method bodies.
So this should be in the react-navigation repo, right? But even then it is probably from reanimated, it’s probably this: https://github.com/software-mansion/react-native-reanimated/issues/2297
For future people - this is not a react-native issue. This is new react-native behavior exposing an issue in a module
Example PR to fix, in a native module: https://github.com/invertase/react-native-firebase/pull/5616