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

Invariant Violation: new NativeEventEmitter() requires a non-null argument #1361

Closed
richardgirges opened this issue Feb 11, 2022 · 2 comments

Comments

@richardgirges
Copy link

richardgirges commented Feb 11, 2022

Description:
I am on a fresh install of React Native (0.67.1). I've configured and imported a fresh install of react-native-onesignal (4.3.6).

The moment I import the react-native-onesignal package, regardless of any method from the OneSignal package, I get the following error while running on iOS:

Invariant Violation: `new NativeEventEmitter()` requires a non-null argument.

Environment
React Native 0.67.1
react-native-onesignal 4.3.6 (installed w/ yarn)
Running into error while running on iOS emulator (haven't tried Android yet)

Steps to Reproduce Issue:

Anything else:

Call stack points to react-native-onesignal/dist/index.js L50:

var eventManager = new EventManager_1.default(RNOneSignal);
@richardgirges
Copy link
Author

Welp, I deleted OneSignalNotificationServiceExtension and re-added it and that resolved the issue. Not sure what I did wrong there. Closing this topic.

@oliviercperrier
Copy link

@richardgirges Im getting the same error with expo SDK 51 and react native 0.74.5 on a development build.. Not sure what to do to fix that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants