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

CacheManager error : "Wrong owner. Perhaps a late disconnect" #1316

Open
PaoloDozio opened this issue Apr 13, 2019 · 8 comments
Open

CacheManager error : "Wrong owner. Perhaps a late disconnect" #1316

PaoloDozio opened this issue Apr 13, 2019 · 8 comments

Comments

@PaoloDozio
Copy link

Issue Type

[ ] Question
[X] Bug
[ ] Improvement
[ ] Build system related
[ ] Performance
[ ] Documentation

Description and/or steps/code to reproduce the problem

I used in the previous version the CacheManager, but now, when I try to download the tiles with the function

mOSMCacheManager.downloadAreaAsync

I receive this message

W/OsmDroid: Problem downloading MapTile: /z/y/x HTTP response:
I/System.out: Wrong owner. Perhaps a late disconnect

I don't understand where I wrong...

Environment

If it's a bug, version(s) of android this affects:

All

Version of osmdroid the issue relates to:

Tested on 6.1.0 and 6.0.3

@spyhunter99
Copy link
Collaborator

what tile source is this?

@PaoloDozio
Copy link
Author

PaoloDozio commented Apr 13, 2019 via email

@PaoloDozio
Copy link
Author

The complete error is this..

I/OsmDroid: Http redirect for MapTile: /12/2145/1462 HTTP response: Found to url https://tiles.wmflabs.org/hikebike/12/2145/1462.png
I/System.out: [OkHttp] sendRequest>>
[OkHttp] sendRequest<<
W/OsmDroid: Problem downloading MapTile: /17/68755/46714 HTTP response:
I/System.out: Wrong owner. Perhaps a late disconnect

And it happens for all the tiles to download..

@spyhunter99
Copy link
Collaborator

no idea, maybe it's related to http user agent header?

@monsieurtanuki
Copy link
Collaborator

@PaoloDozio Regarding HikeBikeMap, what I can say is that the "http://{a|b|c}.tiles." doesn't seem to work anymore, and that it's redirected to "https://tiles."
On my smartphone, the old http URLs work OK when accessed through the web or through the demo app "in live mode" (didn't try in cache mode, as the demo app sample doesn't let us change the tile source for the cache)

Could you try again with a custom made tile source:

final OnlineTileSourceBase myHIKEBIKEMAP = new XYTileSource("MyHikeBikeMap",
	0, 18, 256, ".png", new String[] { "https://tiles.wmflabs.org/hikebike/"});

I don't know, maybe something is lost in the redirection.

Why would it work in "live" but not in "cache" mode? There seems to be little differences:

  • in "live" mode, we manage a semaphore in order to limit the concurrent access to the tile source
  • in "cache" mode we don't use the semaphore, but we download the tiles one by one

Btw, do you use the default TileDownloader for the CacheManager: you don't use CacheManager.setTileDownloader, do you?

@PaoloDozio
Copy link
Author

PaoloDozio commented Apr 13, 2019 via email

@monsieurtanuki
Copy link
Collaborator

@PaoloDozio For MAPNIK, OSM admin guys recently asked us to forbid the bulk downloads (#1286). Their servers were too heavily impacted. That's why you get the explicit message "This online tile source doesn't support bulk download".

I noticed a small slightly unrelated bug in CacheManager; I'm about to PR.

Assuming that your tests are correct (meaning "if you don't change the MapView's tile source after you create the CacheManager then everything is fine") and if we go a bit beyond, we should put in the todo-list:

  • either change a bit the wiki or change the CacheManager concept
  • change the demo app samples dedicated to CacheManager tests, so that we can test with different sources
  • apply the same restrictions for the bulk download and the live download regarding the number of concurrent processes

monsieurtanuki added a commit that referenced this issue Apr 14, 2019
…rt check timing

Impacted class:
* `CacheManager`: the "supports bulk download?" check is now performed only for download actions
@PaoloDozio
Copy link
Author

PaoloDozio commented Apr 14, 2019 via email

@monsieurtanuki monsieurtanuki changed the title Wrong owner. Perhaps a late disconnect CacheManager error : "Wrong owner. Perhaps a late disconnect" Apr 15, 2019
spyhunter99 pushed a commit that referenced this issue Apr 21, 2019
…rt check timing (#1317)

Impacted class:
* `CacheManager`: the "supports bulk download?" check is now performed only for download actions
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

3 participants