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.

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

See original GitHub issue

Environment

System: OS: macOS 12.4 CPU: (8) x64 Apple M1 Memory: 24.48 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.13.1 - /usr/local/bin/node Yarn: Not Found npm: 8.1.2 - /usr/local/bin/npm Watchman: 2022.03.21.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7935034 Xcode: 13.4/13F17a - /usr/bin/xcodebuild Languages: Java: 18.0.1.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Platforms

This is only happening in iOS (I am working with the xCode simulator). In Android devices it works fine.

Versions

Please add the used versions/branches

  • iOS: 15.0
  • react-native-geolocation-service: master & ios-rewrite
  • react-native: 0.68.2

Description

Please provide a clear and concise description of what the bug is. Include screenshots if needed.

Reproducible Demo

Provide a detailed list of steps that reproduce the issue.

  1. Install a new app following the [RN doc](Invariant Violation: new NativeEventEmitter() requires a non-null argument.) and the instructions required in this library’s readme files.
  2. Run cd ios && pod install
  3. Run either npm run ios or use the xCode interface (the error is the same)

Expected Results

The app runs properly as it does in Android devices

Here is the complete error log:

image

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
k-sapariacommented, Aug 23, 2022

This issue still persists… on development is all good. However, when I run yarn test, I get this error!! Current Version is 5.3.0

2reactions
nachoSourcecommented, May 26, 2022

Here I attach some screenshots taken from my simulator. I’ve also read that the second error usually disappears when the first one is solved, but I show it just in case. image image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invariant Violation: new NativeEventEmitter() requires a non ...
image I am developing an ios app but i got dependency issues and. Invariant Violation: new NativeEventEmitter() requires ...
Read more >
`new nativeeventemitter()` requires a non-null argument. - You ...
Invariant Violation : `new NativeEventEmitter()` requires a non-null argument. ERROR Invariant Violation: Module AppRegistry is not a registered callable module ...
Read more >
new NativeEventEmitter() requires a non-null argument using ...
Coding example for the question Invariant Violation: new NativeEventEmitter() requires a non-null argument using Bluetooth in React Native.
Read more >
ERROR Error: Requiring module “node_modules/react-native ...
ERROR Invariant Violation: `new NativeEventEmitter()` requires a non-null argument. Solution: cd into the /ios directory cd ios. Once you are in this directory, ......
Read more >
NativeEventEmitter() Broken After Update From RN 0.64.2 To ...
constructor() { this.lightning = NativeModules. ... Invariant Violation: `new NativeEventEmitter()` requires a non-null argument.
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