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

Maps downloading does not work #145

Open
Starcommander opened this issue Apr 20, 2020 · 30 comments
Open

Maps downloading does not work #145

Starcommander opened this issue Apr 20, 2020 · 30 comments

Comments

@Starcommander
Copy link
Collaborator

The User max.creative.lab reported problems downloading maps:

Maps downloading does not work.
Android 10
Pocketmaps 3.4

If anyone else can reproduce the issue, more information would be welcome.

@Starcommander
Copy link
Collaborator Author

Switching maps folder seems not to help.

@phwitti
Copy link

phwitti commented Jun 10, 2020

i have a similar problem (though dont know if the same one). my internal storage is kinda sparse -- i set the map folder to my sd-card, though the map-file is still downloaded to the default download folder... it's unpacked into the correct folder afterwards. If the packed one is already too big to even download it will just not work. PocketMap tells me it would still be downloading at the moment -- though it has been canceled already by then. I dont know if it would be possible to download directly into the set map folder?

@Starcommander
Copy link
Collaborator Author

@phwitti Thanks for your message.
I think this has to do with an android bug, see #104
What is your android version? Orion or later?
The only way to work around this bug was to temporary use internal storage for downloading.
But it is a good hint, that maybe there is not enough free memory on storage.

@phwitti
Copy link

phwitti commented Jun 15, 2020

Yes, i'm on oreo (Lineage 15.1). I feared there would be no other options... Thanks anyway :). (Would it be possible to just download the files and place them in the correct folder myself? -- would Pocketmaps recognize them automatically?)

EDIT: forget the additional question -- the nice documentation already got me the answer^^

@Starcommander
Copy link
Collaborator Author

@phwitti You can unpack the downloaded map file manually, but you have to create a version.txt file.
(Or copy from different map)
Pocketmaps should recognize the map after restart.
See also #82

@Starcommander
Copy link
Collaborator Author

TODO: Test newer versions of android (11+).
Maybe we can download to sdcard directly again, instead of internal storage?

@doosom
Copy link

doosom commented Oct 18, 2020

Any solution for this issue yet? Maybe some more detailed instructions on how to install manually? I tried with 0.9.0_1 and 0.13.0_1 in the version.txt file but no luck so far. It always tells me that I have the wrong version.

Tried Pocketmaps 3.4 (Play and F-Droid) and 3.7 from the Github releases. Running Android 9.

@feelingwalnut
Copy link

feelingwalnut commented Oct 18, 2020

Path to my working map that downloaded in the app ver 3.7 (i dont have the downloading issue)
/storage/emulated/0/Android/data/com.junjunguo.pocketmaps/files/Download/pocketmaps/maps/north-america_us_pennsylvania-gh

Version.txt is in there.
0.13.0_0

Maybe this helps?

Note: samsung galaxy S9, android 10

Also: map downloading issue, maybe related to my issue #149 but different corrupt file?
Logcat?

@Starcommander
Copy link
Collaborator Author

@doosom A more detailed information, what exactly did not work, could be very helpful.
Do you have download-problems, or a too sparse internal storage?
Android version? Device info?
Do you see an error message?
Maybe you can also provide a logcat output?

Downloading a map manually is just a workaround.
We should first try to find the cause for this issue.

@doosom
Copy link

doosom commented Oct 19, 2020

I tried again this morning and it is working now. I'm not sure what I did differently than yesterday but the issue is gone.

Downloaded the map, extracted to maps folder renaming to continent_country-gh and added a version.txt file with 0.13.0_0 as content.

Thanks for the fast replies anyway.

@feelingwalnut
Copy link

From an outside perspective you corrected a typo.
that would fix it. _1 to _0
Unless your typo is just on github and not in your version.txt

You still can not download map inside application?

@doosom
Copy link

doosom commented Oct 19, 2020

My working maps version.txt contains 0.13.0_0 but I tried with _1 before, which was failing.

Regarding your question if I still can't download. Weird thing! I tried to download another map now and it actually succeeded. Any idea why it may work now?

Note: Xiaomi A1, Android 9, PocketMaps 3.7

@feelingwalnut
Copy link

feelingwalnut commented Oct 19, 2020

Glad to hear it works.
Maybe it was an isolated issue with OSM like they had a hosting issue or maintinence at the time.
Starcommander might have a better suggestion.

@Starcommander
Copy link
Collaborator Author

No idea, but has nothing to do with OSM.
I use 2 different http servers (linux root-servers) where I host all the maps.

@doosom Which map did not work, and what is the "another map" that worked?

@doosom
Copy link

doosom commented Oct 20, 2020

The first map I tried to download was Poland or Canary Islands. Both of them were failing with a Download Manager message . Once I had one map running correctly, by downloading manually and adapting the version.txt, suddenly others could be downloaded. Spain is an example. I guess that all others would also work now. Quite odd, but that's my experience.

@feelingwalnut
Copy link

poland and canary islands worked here. long download/decompress time.

didn't know the maps were self hosted, thought the app acquired them from the source or mirror of source. sorry for using your bandwidth. poland is big.

@Starcommander
Copy link
Collaborator Author

@feelingwalnut Thanks for testing.

@OmlineEditor
Copy link

I have a problem too. I can't load the map. I changed the location of the map directory, but it doesn't help, I restarted the application - it doesn't help.

I ask you to make it possible to download maps manually and then copy them to the desired directory

PocketMaps 3.9 (39) F-Droid
Redmi Note 7 (Android 9)

@Starcommander
Copy link
Collaborator Author

Hello @OmlineEditor .
I need more information to help you.

Which map you can not load?
Do you see an error message, or what exactly happens?
Do you have an error on downloading, or while opening the map?

Better you create a new issue.
This one is from 2020.

@OmlineEditor
Copy link

I can't upload a map of Russia. I click download, but nothing happens and there are no error messages, I don't see traffic movement either.

@Starcommander
Copy link
Collaborator Author

There are a lot of maps for russia.
For example: Crimean-fed-district.
Did you try this one?
Did you try an other map, for example: Cape-verde (Africa)

Maybe you are able to provide a logcat-output directly after downloading failed.
This could really help for debugging.

Sometimes an installed firewall-app leads to problems.
Do you have installed any firewall-app?

@OmlineEditor
Copy link

nothing is downloaded, regardless of the maps.

firewall - ok, everything is allowed.
need to change the program so that it says where the problem is, and not look at logs. it's easier and clearer this way

there is nothing in the logs, I can't understand the reason.
log.txt

@Starcommander
Copy link
Collaborator Author

What we see in the log:
Line 7: List of maps is downloaded sucessfully.
Line 8-18: You have Searched for a map, using the filter.
Line 21: Seems an update is available, as locally there is no map (=1970)
Line 22: Before downloading we everytime delete the local map (even if not existing)
Line 23: As we use the AndroidDownloadManager we register a receiver to get the response after downloading.

But the response seems to never happen.
Seems the AndroidDownloadManager has a problem.
Maybe you have to allow networking via firewall also for AndroidDownloadManager, not only PocketMaps?
A logcat-output of all apps via adb may also show a hint.

@OmlineEditor
Copy link

the problem is solved in manual mode. nothing works in automatic mode.

  • I'm going to the website http://vsrv15044.customer.xenway.de/maps/
  • I'm looking for the right map and download it
  • I move the downloaded file to the directory /storage/emulated/0/Android/data/com.junjunguo.pocketmaps/files/Downloads/
  • I run the program and go to add a map
  • the program will unpack the downloaded file itself and the card will work.

I do not know where the problem was. I had all applications allowed:
iptables -I INPUT 1 -j ACCEPT
iptables -I OUTPUT 1 -j ACCEPT

I think we need to add part of the solution in manual mode to the FAQ

@Starcommander
Copy link
Collaborator Author

Good Idea to document this way to add maps.
But "Manual mode" is not a solution, it is a workaround.
Maybe you can find more log-entries using adb (android-debug-bridge)
Would be useful if we can find the cause.

@OmlineEditor
Copy link

I have little experience in solving such problems. I can only advise the developer to make more conclusions in the logs on behalf of the program itself. I saw the reviews and understand that other users are facing the same problem. So it needs to be solved somehow.

@Starcommander
Copy link
Collaborator Author

You sent a log.txt
How did you get this?

Seems you are not familar with adb, but you can search the web:
https://duckduckgo.com/?t=ffab&q=android+debug+bridge

@OmlineEditor
Copy link

I use another program to get logs: MyAndroidTools
your method is very complicated, it's easier through my program

@Starcommander
Copy link
Collaborator Author

Ok. Maybe you can select/deselect a filter for the logcat.txt output.
I fear the exception occurs on AndroidDownloadManager.
If I have more time, then I will also look into the code of pocketmaps to get an idea, what happend.

@Siggi932
Copy link

Turkey download doesn't work. All other downloads I tried were fine.

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

6 participants