Skip to content
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

Background Map not updating unless i reinstall #3260

Closed
joshinils opened this issue Sep 5, 2021 · 15 comments
Closed

Background Map not updating unless i reinstall #3260

joshinils opened this issue Sep 5, 2021 · 15 comments

Comments

@joshinils
Copy link

I have added separate sidewalks, they did not show up in the map, quests for kerb etc. however did.

How to Reproduce
Look at portion of map in SC without a future (to-be-added) sidewalk,
add a separate sidewalk way to OSM,
look at map in SC again (even after a week), the sidewalk is not visible,
delete SC, reinstall SC, look at same portion of map with new sidewalk, which is now visible.

Separate sidewalks I added yesterday are not visible after the re-install, i do not know how long it takes for SC to show new data on the map.
Quests for the sidewalks I added yesterday are already there, though.

I did delete my cache in the settings, that did not update the underlying map, only the re-install did.

Versions affected
v33.1

@joshinils joshinils added the bug label Sep 5, 2021
@joshinils
Copy link
Author

to be fair, it may just be that I am too impatient, but i did not find any other issue regading this. maybe a bit of info on how fast the displayed map shows new ways could help here.

@Helium314
Copy link
Collaborator

If you scan for quests manually (menu -> scan for quests here) the map should be updated. But deleting cache should also help...
If you delete the cache in in the Android app settings, map will be deleted too and thus freshly downloaded.

(I just had to think of @smichel17's comment #3235 (comment), it's definitely happening)

@mnalis
Copy link
Member

mnalis commented Sep 5, 2021

@Helium314 I think that Scan for quests here currently only updates the quests, and not the Jawg base map, so it won't help. See #3256 for suggestion that it should update Jawg map tiles too.

One could go to Android system Settings / Apps / Apps / StreetComplete / Storage select CLEAR CACHE instead of uninstall/install, I think - see #3133 (comment). (the exact menus might differ by manufacturer and Android version, of course)

@westnordost
Copy link
Member

Separate sidewalks I added yesterday are not visible after the re-install, i do not know how long it takes for SC to show new data on the map.
Quests for the sidewalks I added yesterday are already there, though.

Yeah, the map simply needs some time before it is updated.

@joshinils
Copy link
Author

If you scan for quests manually (menu -> scan for quests here) the map should be updated. But deleting cache should also help...

That's what I meant, my android is set to German, so I had to haphazardly translated.

One could go to Android system Settings / Apps / Apps / StreetComplete / Storage select CLEAR CACHE instead of uninstall/install, I think - see #3133 (comment). (the exact menus might differ by manufacturer and Android version, of course)

Thank you, that is much easier. Now some of my new sidewalks appear at some zoom levels and looking at some locations and disappear upon zooming in, I guess expected since they are new.

@HolgerJeromin
Copy link
Contributor

even easier:
Long press on the app icon on the launcher or app list. Click on the (i) or App-Info (at least on my motorola android 10). Then the known Storage => clear cache

@mnalis
Copy link
Member

mnalis commented Sep 6, 2021

Long press on the app icon on the launcher or app list. Click on the (i) or App-Info (at least on my motorola android 10).

That is nice option if it exists, but I'm afraid it is heavily dependent on specific manufacturer UI and launcher used... I remember seeing that on previous phones, but for example neither my stock Xiaomi (MIUI 10, Android 6) nor stock Huawei (EMUI 11, Android 10) offer that shortcut.

(in MIUI long-press enables moving of icon to rearrange screen, including drag&drop to Uninstall placeholder only, and on EMUI long-press offers only Uninstall - and even that only if screen is unlocked, otherwise you only get Screen is locked message on long-press).

One could install different launcher I guess, if this shortcut was often needed... But still it only solve some percentage of cases (when StreetComplete has cached old version, but Jawgmaps has already updated a tile - a process which is also not instantaneous)

@smichel17
Copy link
Member

when […] Jawgmaps has already updated a tile - a process which is also not instantaneous

Does SC have any way to tell when tiles are updated? e.g. an etag response when we retrieve them

@mnalis
Copy link
Member

mnalis commented Sep 8, 2021

Although people did report in #3124 (comment) that they required to clear ALL DATA (not just CACHE) in order to force tiles to redownload... Removing cache only seems to work for me personally (I have to exit the app and remove if from list of recent apps, though)

@smichel17 I'm not sure if StreetComplete has much control about how Tangrem-ES (which handles tiles) works, see #3256 (comment)

@Helium314
Copy link
Collaborator

Although people did report in #3124 (comment) that they required to clear ALL DATA (not just CACHE) in order to force tiles to redownload...

Tiles are stored in [internal storage]/Android/data/de.westnordost.streetcomplete/cache/tile_cache. If the tiles don't exist in the tile cache, they can't be shown (and will be downloaded).
If there are Android versions that don't delete the tile_cache folder when clearing cache, then it's a bug of Android.

@smichel17
Copy link
Member

@mnalis Yes, but on manual download there's some info at least

override fun onResponse(call: Call, response: Response) {
var size = 0
response.body()?.use { body ->
// just get the bytes and let the cache magic do the rest...
size = body.bytes().size
}
val alreadyCached = response.cacheResponse() != null
val logText = if (alreadyCached) "in cache" else "downloaded"
Log.v(TAG, "Tile $zoom/$x/$y $logText")
cont.resume(DownloadSuccess(alreadyCached, size))
}

@Cj-Malone
Copy link
Contributor

I mapped some paths almost a month ago, they show up in a jawg.io web map, but still aren't in my StreetComplete. I've tried zooming around and scanning for quests, but these tiles still haven't been kicked from cache and re downloaded. (v35.0)

@riQQ
Copy link
Collaborator

riQQ commented Oct 8, 2021

@Cj-Malone see my experience as documented in #2479.

@Cj-Malone
Copy link
Contributor

Yeah, that's pretty much it. I think there is must be an issue with invalidating cached tiles.

@matkoniecz
Copy link
Member

From https://discord.com/channels/413070382636072960/429092644438802432/896889394877853707

For content relating to my issue, these two buildings I mapped two months ago.

Well the usual update method threw an error, but uninstalling and installing the update has got most of the stuff apart from the new areas mapped in the past month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants