-
Notifications
You must be signed in to change notification settings - Fork 292
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
Could not invoke RNFusedLocation.startObserving #431
Comments
Ok, I did some investigation myself and it appears that this is a known issue with recent updates to Google Play services. See the link below for more details: https://issuetracker.google.com/issues/256046114 Fortunately, there was a fix made last year in version 21.0.1 of the play-services-location library. To leverage this fix, I added the following line in my android > build.gradle:
Once I made this change and rebuilt the app, the crash went away. @Agontuk – To avoid this issue for others, you might consider changing the default version for react-native-geolocation-service and kick out a new version. |
And, of course, after I figured all this out, I found #424 which basically came to the same conclusion :) Sorry for the noise... |
Worked for me! |
Environment
System:
OS: macOS 12.6.3
CPU: (10) arm64 Apple M1 Max
Memory: 108.56 MB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.14.2 - ~/.asdf/installs/nodejs/16.14.2/bin/node
Yarn: 1.22.18 - /opt/homebrew/bin/yarn
npm: 8.5.0 - ~/.asdf/plugins/nodejs/shims/npm
Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.14.3 - /Users/mikeloos/.asdf/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9514443
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.14.1 - /Users/mikeloos/.asdf/shims/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.5 => 0.67.5
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Platforms
Android
Versions
Please add the used versions/branches
Description
When I call geoLocation.watchPosition on Android, the app will crash with the error:
Could not invoke RNFusedLocation.startObserving
See below:
I've been able to reproduce the issue on the Android emulator but I first detected it when I got a Sentry log from a production user that was experiencing the same crash.
Here are some screenshots from the stack trace that Sentry captured:
No issues on iOS. The crash only occurs on Android. And, oddly enough, the issue appears to have just started occurring about 2 weeks ago. Before that, and for several months prior, the same code has been working without any problems.
Reproducible Demo
Expected Results
Not crash
The text was updated successfully, but these errors were encountered: