Fix warnings: new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method
chrisglein opened this issue · 0 comments
chrisglein commented
Problem Description
Cause is this: react-native-clipboard/clipboard#116
Fix should look something like this: https://github.com/invertase/react-native-firebase/pull/5616/files#diff-c887076b0c80d540aed1bfbb472cc8f20516634e8e72d53014c65d690bba4fb1
Similar issue for reanimated: software-mansion/react-native-reanimated#2297
And for netinfo: react-native-netinfo/react-native-netinfo#486
Steps To Reproduce
Run app in debug mode. Get warnings on each run.
`new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.
at Chat (http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:148014:25)
at AutomatedChatSession (http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:156658:24)
at ChatSession (http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:156758:43)
at RCTView
at http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:46747:44
at App (http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:96829:42)
at RCTView
at http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:46747:44
at RCTView
at http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:46747:44
at AppContainer (http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:46627:36)
at ComponentWithDisplayName (http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:84894:29)
registerWarning @ C:\Users\cglein\Source\artificial-chat\node_modules\react-native-windows\Libraries\LogBox\LogBox.js:148
`new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.
at Chat (http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:148014:25)
at AutomatedChatSession (http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:156658:24)
at ChatSession (http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:156758:43)
at RCTView
at http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:46747:44
at App (http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:96829:42)
at RCTView
at http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:46747:44
at RCTView
at http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:46747:44
at AppContainer (http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:46627:36)
at ComponentWithDisplayName (http://localhost:8081/index.bundle?platform=windows&dev=true&hot=false&inlineSourceMap=true:84894:29)
Expected Results
No warnings.
App version
No response