"not enough space" while updating maps #4122
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#4122
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description:
Steps to reproduce:
Expected behaviour:
Provisional fix:
Directory contents while rejecting the maps downloading:
adb_ls.txt
Wow, that's a serious bug. Can you please enable logs in OM settings, try to reproduce the issue, and share logs with us via "?" -> Report a bug?
I have not managed to reproduce it, even using the same way to cause the network failure (switching the hotspot frequency) after a few tries.
However, the previous "prerequisites" are not met. That is, yesterday, I started from already donwloaded maps (outdated) and proceeed to download a new set (updated). Yesterday it there were two maps folders. Since now there aren't new maps for updating now I'm starting from scratch (data cleaned, only a single maps folder).
It could also be that the behaviour is not consistent or always reproducible.
Anyway, yesterday it was not possible to recover the application download function (even forceclosing it, and once restarted, it always rejected to updated the maps due to "no space available"). You could look also on what conditions that message is triggered, because indeed it is not always linked to lack of storage.
When a new maps update becomes available I'll try to reproduce the issue again.
PS: A moment ago I was tempted to manually create empty files to see if that was the cause (its accidental presence), but due to Android permissions that wouldn't be just a suitable way (e.g. files created and owned by adb user can't be deleted, and perhaps also couldn't be written by organicmaps user).
@lightful thanks for the feedback. You can try to reproduce the issue by installing an older version from Github, FDroid (but please backup your bookmarks first, they're removed on uninstall!) or an older beta if you subscribed to it (installs separately).
Regarding permissions, is your device rooted? Did you do something manually with the file system? What is the android version? Did you modify somehow the SD-card?
I have managed to reproduce the problem again by downgrading the version.
When upgrading the maps, after the network error, the screen shows a retry icon for each map. I didn't tried here at first, instead I just went back to the previous screen (where all maps pending to download are summarized). The "Download ALL" buttom there reported the wrong error:
However, entering again in the maps detail screen, I could retry downloading one by one (I don't remember if there is also a "downloading all" in such nested screen... I think that I retried them separately). So it seems that there is a recovery way, without resetting the entire storage, which I didn't manage to work out a couple of days ago.
Here are the logs:
logs.zip
Perhaps the problem is that sometimes (at least while in the summary screen shown above) the call to GetWritableStorageStatus() may request a huge (and wrong) amount of data:
Note that 66071607967 is just by chance... the TOTAL USED space on my device!. So in a device with less than half the space used this bug likely would have not shown up.
PS: No, my device is not rooted. A couple of days ago I didn't used adb nor tried any manual filesystem operation until I couldn't resume the download.
I simply tried to delete the partial download, but that was not possible due to lack of permissions:
I can delete de logs (via adb shell) but can't delete (nor write) inside the 221216 folder, nor just wipe it (despite the files folder at the previous level do is writtable for the shell user):
That is not good for non-root hackers ;-)
Thanks for details! That's very interesting that you can access files with adb on Android 13.
@pastk Looks like the global
g_totalBytesToDownload
is not reset properly.In addition, Android 13 still allows efficient (high performance) read/write on sdcard/android/obb to any application having the permission to "install applications". In Android 11 this permission was listed right the others, now it is separated in "installation sources".
I have granted such permission to Termux and to Osmand (organicmaps don't allows to be granted such permission, but anyway there is no option to manually configure the storage folder). Some file explorers (Amaze) still request SAF permission, but this is because they don't know they don't actually need it! (Amaze can be granted too). It is incredible how slow is SAF.
Thank to this feature (still not killed by Google nonsense) I can automate the creation of gpx files using Termux scripts, placing them in the android/obb/net.osmand.plus subfolders...
By the way, I think that app developers could easily add some kind "public shared" storage support to every application, via a shared API, so that e.g. a sshfs/ftp server could expose it to the users. Many people use safe applications (in fact I think that most of the malware comes just from the Play Store) and don't need that recent "security improvements". Google security features, as poorly implemented as they are, prevent power users from having control on their devices, and are in fact creating a horde of stupid people instead of leaving the natural selection to do its job... :-)
Thanks for the details! Are there any docs about that "fast" file access and how to properly enable it? We may try to use it for FDroid.
There is no need to enable anything... folders under sdcard/Android/obb are as fast as the internal app storage, unlike every other folder under sdcard/ which is too slow in recent android versions, or using the SAF. In fact, Google storagement poor tech is likely taking battery from the users (I assume the slowness is due to high CPU usage).
The only risk is the required "unsafe" permission to be able to read/write... when will Google remove this "hole"?.
And only power users would use it (I had to manually grant permission to "install applications" to my file explorer, Termux,... etc).
Edit: apps with "install applications" permission seems to be added to the ext_obb_rw filesystem group in Android 13 (in Android 10 it was just the "everybody" group as the entire sdcard).
A Termux shell session:
Thanks! We are looking for a generic solution suitable for every user.
It looks like duplicate of #2436 (the second case listed there)
Probably
Download All
triggers whole country size estimations too.