Position frozen at some offset at a place I haven't been (while OsmAnd running concurrently has no problem)
First time seen, version is v58.2 running on Android 13: Today I wanted to add some nearby information, so I loaded the corresponding data and walked out. However soon I noticed that the position indicator was not where I was, so I guessed the GPS did not sync yet. In such cases I always open GPStest in satellite view, but it showed that there were more than 15 satellites being used for the position fix, so I guessed it cannot be that wrong. Next I started OsmAnd, just to find that it had the correct position. Next I swiped SC off the task list, restarting it. Still the position was off, and even when walking, that position did not move. At that point I saved the logs to a draft mail message (that I could send on request).
How to Reproduce
Goof question; no idea (other than the description above)
Expected Behavior
The position indicator should indicate the current position, not worse than what GPS delivers.
Versions affected
Adroid 13 (Oppo ColorOS), SC v58.2
Checking the app's permission in Android's app management, I saw that it did not have permission for location! (My guess is that I didn't use the app for a while, and Android's "security feature" did remove all app permissions, and I did not remember to re-assign those) However this brings up a real bug: It seems the permission checking is not done correctly: Maybe the app remembers a flag that show that one it had permission to the the location, but current Android can revoke permissions, too. So I guess the check for permissions should be reviewed under current Android development guidelines.
Maybe "Don't assume that these permissions have been previously granted—check them and, if needed, request them before each access." in https://developer.android.com/guide/topics/permissions/overview?hl=en
And I think that it's better not to show a position indicator at all, rather than showing one at the wrong location, especially as SC re-positions to that location frequently.
I cannot reproduce this by going to the settings and change the app's location permission to "denied". When I reopen the app, it shows the location not available.
I cannot reproduce this by going to the settings and change the app's location permission to "denied". When I reopen the app, it shows the location not available.
Can I send the logs I saved via E-Mail to you? Maybe they help.
Regarding the initial issue (OsmAnd showing correct location, and SC not) I've had this issue with StreetComplete too when GPS signal was interrupted (i.e. I entered a supermarket and exited some time later).
SC would look like it had a fix, and direction indication would rotate as I did, but lat/lon would be wrong (showing last location where I was while I was still in SC, while OsmAnd would show actual location where I exited the shop. It seemed like SC didn't update the location when fix was re-acquired, while OsmAnd did).
Also, while it was improved, it was not possible to fix it completely, so it is still not visually as clear to see that GPS is not returning current location as it is in other apps
(If it happens again once MapLibre release is out, I'll try to report it...)
@sjvudp did you perhaps take a screenshot or video? Was the GPS indicator in lower-right corner of the screen steady, blinking, or stricken-out? Did you perhaps tried clicking it (and what happened if you did)?
As for the removed permission, SC seems to show stricken-out GPS button for me in such case, and I have to press it to get a warning dialog to re-enable the GPS.
Can I send the logs I saved via E-Mail to you? Maybe they help.
No, because nothing to this effect is logged.
Not sure whether I should name it "reproduced", but it happened again to me today. Before I had enabled "GPS" checked in SC that the position was current (it was). Then I disabled "GPS", went outside, wanted to check some spot, so I re-enabled "GPS", just to find that the position is still the old one. Again I saved the logs, and made a short video of the issue. Taping on the position indicator just caused some zoom-in, but did not fix the effect. I have the impression that the effect is new in this version of SC.
The only thing found in logcat was this:
[08-18 18:17:31.451 1868:1968 E/OplusThermalStats]
Error getting package info: de.westnordost.streetcomplete
and some messages related to Android Auto (I guess; not connected to a car at that moment, however):
[08-18 18:17:30.869 3194:15113 W/ContextImpl]
Calling a method in the system process without a qualified user: android.app.ContextImpl.startActivity:1095 android.app.ContextImpl.startActivity:1084 android.content.ContextWrapper.startActivity:442 com.oplus.appplatform.providers.ContextProvider.startActivity:3 java.lang.reflect.Method.invoke:-2
In the app logs I found nothing related to the issue.
Hm well, the code that is used to get the current location is here:
https://github.com/streetcomplete/StreetComplete/blob/a6c49bc4a845d002e174d3ab1910cbc07e6850e9/app/src/main/java/de/westnordost/streetcomplete/util/location/FineLocationManager.kt
The app may consider an older GPS location "better" than a more current one that is (much) less precise.
The app may consider an older GPS location "better" than a more current one that is (much) less precise.
It would be more helpful @sjvudp if that GPSTest was in Status mode (so we could see PDOP & H/V DOP & E H/V Acc)
Also, IIRC SCEE had some changes in handling that case, so it might (should?) behave differently. Would be interesting if you could test both SC and SCEE when such GPS-disconnect happens.
Having had similar problems with Street Complete recently, my guess is that some position filter has problems updating the position under some conditions. I had even suspected that the map has an offset when the positions were all consistently "off".
I don't see anything actionable here. To summarize:
The issue as originally reported turned out to be because the user removed the location permission from the app. That an old location would be displayed instead of the "no location info available"-icon in that case could not be reproduced.
No related logs are available.
What is seen in the posted video could just as well be the result of the Android system having supplied StreetComplete with the last known position and the new GPS fix not having reached a sufficient accuracy yet to be considered as better than the previous position, yet. (I provided a link to the sources.)