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

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

Closed
SudoPlz opened this issue Mar 11, 2024 · 1 comment · Fixed by #636

Comments

@SudoPlz
Copy link
Contributor

SudoPlz commented Mar 11, 2024

Describe the bug
On new react-native versions (i.e on 0.73) we're getting an error about the android module not containing an addListener and an removeListeners method.
This causes issues in our app, so I'm opening a PR to fix it.

To Reproduce
Steps to reproduce the behavior:

  1. Upgrade to react-native 0.73.5
  2. Use useListener (@stripe/stripe-terminal-react-native/src/hooks/useListener.ts)
  3. See the logs and notice the following 2 errors:
E | ReactNativeJS ▶︎ `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.
E | ReactNativeJS ▶︎ `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.

Expected behavior
Those errors should not be there

Stripe Terminal React Native SDK version
0.0.1-beta.14

Smartphone (please complete the following information):
Android Emulator

  • Device: [e.g. iPhone6] Pixel 3a emulator
  • OS: [e.g. iOS8.1] Android 13.0
@SudoPlz
Copy link
Contributor Author

SudoPlz commented Mar 11, 2024

opened a PR ^

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