Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andrewhavens opened this issue Apr 26, 2022 · 3 comments · Fixed by #151
Labels
bug Something isn't working released

Comments

@andrewhavens
Copy link

Description

Using react-native-tcp-socket v5.6.1 and seeing this warning:

 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.

Steps to reproduce

I tracked it down to importing this library:

import TcpSocket from 'react-native-tcp-socket'

Looks like it's coming from this line: https://github.com/Rapsssito/react-native-tcp-socket/blob/master/src/Globals.js#L10

Expected behavior

I'm not sure what the solution is, but the warning should be addressed so that it doesn't cause the warning anymore.

Relevant information

OS macOS 12.3.1
react-native 0.68.1
react-native-tcp-socket 5.6.1
@Rapsssito
Copy link
Owner

@andrewhavens I believe the latest version fixes it!

@github-actions
Copy link

🎉 This issue has been resolved in version 5.6.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@andrewhavens
Copy link
Author

Thank you @Rapsssito!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants