Error Last location unavailable
See original GitHub issueI have this exception sometimes, on production (I can’t reproduce in dev mode)
Error
Last location unavailable
node_modules/@react-native-mapbox-gl/maps/javascript/modules/location/locationManager.js in call at line 21:63
this.onUpdate = this.onUpdate.bind(this);
}
async getLastKnownLocation() {
if (!this._lastKnownLocation) {
const lastKnownLocation = await MapboxGLLocationManager.getLastKnownLocation();
if (!this._lastKnownLocation && lastKnownLocation) {
this._lastKnownLocation = lastKnownLocation;
}
}
return this._lastKnownLocation;
Full log here: https://sentry.io/share/issue/8037c6ed509a496aaa969bc23698ab04/
I actually happens quite often, Android only.
Any idea ? I think it might be related to when GPS is unavailable but location permission is given or something…
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to fix a location unavailable error in the Android device ...
Just go to settings, then click location. Turn it on and agree to Improve location accuracy by this you can fix location unavailable...
Read more >Mapbox failed last location React native - Stack Overflow
I found the answer by changing the location settings and changing the highAccuracy option and enable it.
Read more >How to Fix “Location Not Available” on iPhone - MakeUseOf
The quickest way to resolve that is to force quit and relaunch the app in question. If that doesn't work, you must restart...
Read more >Ultimate Guide To Fix Location Not Available iPhone In 2022
We have researched and run down the potential fixes on the "Location Not Available iPhone" error; follow along with the solutions below.
Read more >How to Fix Location Unavailable Error on Android Device?
Fix Location Unavailable Error on Android Device · Is it really a GPS problem? Some apps that use GPS also need a data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, it’s a native error that bubbles up to the JS side. Will wrap
in a
try...catch
block to prevent crashesAny wishes, what it should log out 😃 Should it log at all? 🤷♂
Possibly related / for more information: https://github.com/mapbox/mapbox-events-android/issues/419