Open fg1998 opened 3 months ago
This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed.
Please see the Contributing Guide for how to create a Sample App.
Thanks! Ionitron 💙
Ok, there is it
https://github.com/fg1998/geolocation-bug
The error occurs occasionally. But the screenshots prove the error.
Running on physical device Samsung Galaxy a54 and Samsung Galaxy S10 lite
I can confirm that users report the same behavior. (Since Capacitor version 6, but it does not necessarily have to be due to the version. The Android hardware or software may also have something to do with it) and I have also seen the error message before.
But as already written: Quite sporadic and cannot be firmly defined.
Yes I can confirm also I'm using physical devices that shows the "location unavailable" error. I did @fg1998's technique of "restarting" the location by opening Google Maps and it works again.
Bug Report
Plugin(s)
@capacitor/geolocation
Capacitor Version
@capacitor/ios: not installed @capacitor/cli: 6.1.1 @capacitor/core: 6.1.0 @capacitor/android: 6.1.0
Platform(s)
ANDROID
Current Behavior
Sometimes Geolocation.getCurrentPosition() simples does not provide any coordinates, just return LOCATION UNAVAILABLE. This issue occurs sometimes after install app, or after live run. But not all times. When this issue occurs, I just open Google Maps and the dot with my current position is GRAY. After 1 or 2 seconds, it became blue and than the error on capacitor does not occur anymore
Code Reproduction
async getCoordenadas() { try { const resp = await Geolocation.getCurrentPosition();
}
Other Technical Details
Galaxy A54, Galaxy S9, Galaxy S10 Lite