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.

new NativeEventEmitter() was called with a non-null argument without the required `addListener` method.

See original GitHub issue

Please 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:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

7reactions
elashpearcommented, Sep 15, 2021

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.

6reactions
mikehardycommented, Aug 19, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - new NativeEventEmitter()` was called with a non-null ...
WARN `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method. WARN `new NativeEventEmitter()` ...
Read more >
new NativeEventEmitter() was called with a non-null argument ...
WARN new NativeEventEmitter() was called with a non-null argument without the required removeListeners method.
Read more >
What does these two warnings mean? : r/reactnative - Reddit
`new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method. I moved my existing project to a new ...
Read more >
new NativeEventEmitter()` was called with a non-null ...
Coding example for the question new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method-Reactjs.
Read more >
`new nativeeventemitter()` was called with a non-null ...
Any ideas how to solve it ? ERROR: new NativeEventEmitter() was called with a non-null argument without the required addListener method. at node_modules\expo\ ......
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