react-native-geolocation-service: Invariant Violation: `new NativeEventEmitter()` requires a non-null argument.


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: - /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


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


Please add the used versions/branches

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


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:


About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 1
  • Comments: 17 (1 by maintainers)

Most upvoted comments

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

I was getting this until I ran cd ios/ && pod install after installing the package. Could be a pod issue?

same issue 😦

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