Closed kueda closed 4 months ago
FWIW, I have tried a number of approaches here and I'm out of options. The problem isn't really about when we ask for coordinates, but something weirder about getting stale coordinates while offline. I can replicate like this:
If you look at the timestamp of the location you get back, it's stale... and it never freshens up. I tried
@react-native-community/geolocation
but didn't see any, it seemed like the stale coordinates were coming straight out of the CLLocationManager
Geolocation.watchPosition()
but I keep running into problems stopping the watch, so I never even got to the point where I could test if it was returning fresher coordinates (seems unlikely, anyway)IMO, this is still a bad bug, b/c people who happen to get a really good location read and then lose connection are going to end up with a lot of bad coordinates. I just don't know what to do about it.
Describe the bug Hard to replicate, but as reported by Carrie, you can make a lot of observations and if one use of the camera within the session gets coordinates with accuracy that are below 10m, you may end up with all your subsequent observations having exactly the same coordinates. Restarting the app or otherwise unloading the camera component would reset it.
To Reproduce (Theoretical) steps to reproduce the behavior:
Expected behavior The coordinates should get refetched every time the camera is opened.
Context (please complete the following information):
Additional context Carrie reported this, and at present her symptomatic observations are at https://www.inaturalist.org/calendar/carrieseltzer/2024/6/15. This is almost certainly related to my recent work on continuous location fetch. It's probably just holding on to the one user location when it falls below the accuracy threshold, and I didn't catch it b/c my iPhone SE w/o a SIM card generally never gets much bettern than 20-30 m.