trekarta icon indicating copy to clipboard operation
trekarta copied to clipboard

App does not open - Android 11

Open duggalsu opened this issue 4 years ago • 17 comments

The app does not get past the splash screen on Android 11. There are no relevant log messages either.

duggalsu avatar Oct 26 '20 14:10 duggalsu

Have you moved app data to external storage? Recently I've updated my phone and faced the same issue. I hope it will be fixed in next version. But currently you have to move data back (manually) or just reinstall the application (ONLY if you have not created any personal data - tracks or places).

andreynovikov avatar Mar 01 '21 14:03 andreynovikov

I have not moved app data to external storage. I reinstalled the app and it opened on first run. However it did not open again after downloading maps.

I saw two potential issues -

  1. The app does not ask for storage permission on launch
  2. Manually giving storage permission only asks for media access permission

duggalsu avatar Mar 01 '21 14:03 duggalsu

It does not need permission for normal use. Does it crash? If yes, can you look for file on your device: Android/data/mobi.maptrek/cache/export/exception.txt. If it is there paste its contents here or send it to me via email.

andreynovikov avatar Mar 01 '21 20:03 andreynovikov

The app does not crash and the exception file does not exist. I simply get a black screen on launching the app

duggalsu avatar Mar 01 '21 21:03 duggalsu

So, as I understand, app launches correctly until you load the first map. What map is it? Does this happen if you load any map? Try any small one. When you load the map for the first time do you keep application open? Does it finish loading and can you see loaded map? If no, what exactly happens?

andreynovikov avatar Mar 02 '21 06:03 andreynovikov

The maps loads on first app launch and I can use the app. Its only on subsequent app launches that the app fails to work

duggalsu avatar Mar 02 '21 19:03 duggalsu

Please find Android/data/mobi.maptrek/files/native/world.mtiles and attach it here or send me by email. I will try to look what's wrong with it.

andreynovikov avatar Mar 03 '21 09:03 andreynovikov

Hi Andrey,

I seem to have exactly the issue you've described above: I've moved my data to "user storage to prevent data loss" and now Trekarta is stuck on the splash screen.

I did that because Android 11 doesn't allow FolderSync to access Trekarta's app-storage anymore and I like to sync my data.

So I'm kinda stuck here!

Any idea when this issue gets fixed?

thanks Soko

SokoFromNZ avatar May 18 '21 16:05 SokoFromNZ

After a long night try and error I have more info. Apparently it does not have to do anything with "move data" at all. Its more like duggalsu said:

I reinstalled the app and it opened on first run. However it did not open again after downloading maps.

I've also thought its my SD card I've installed the app on. But after removing it and using the internal storage of my Nokia 2.3 (TA-1206 with Android One 11, Security Update 5.4.2021, Build 00WW_3_220_SP01) the problem persists.

So here are the details:

  1. "Force Stop" of Trekarta and "Clean Storage" (so basically reinstall)
  2. Trekarta opens as usual
  3. Setup a view things including downloading World Map and one area map.
  4. Phone restart
  5. Backup Android/data/mobi.maptrek/* files.
  6. Open Trakarta: Hangs on splash screen (most of the time at least... sometimes it starts but after closing it locking phone for a view minutes and open the app again it hangs definitely)
  7. Force Stop
  8. Delete evrything in Android/data/mobi.maptrek/* but Android/data/mobi.maptrek/files/data.
  9. Open app and no maps are there anymore (of course)
  10. Close app and swipe it close in resent/open apps overview
  11. Delete evrything in Android/data/mobi.maptrek/files/native and copy hillshade.mbtiles and world.mtiles (not the shm/wal files) from the backup
  12. Open app again and it starts and has the maps loaded

More interesting stuff:

  • If i just delete the files folder in step 8 it the app is still stuck on splash screen.
  • If I close the app after step 12, wipe it from the resent/open apps, lock the phone, unlock it after a minute and start Trakarta again it stucks again on splash screen and I have to start over with the steps above.

As I'm a developer myself and also did Android apps (a while ago) I might be able to help or even debug it myself. Do you use Android Studio as IDE? Which version? Any particular settings of the IDE so I can debug the source here?

I think the world.mtiles is not corrupt as it works from the backup. My educated guess would be that the SQLite version you are using has some issues on Android 11. I reckon you store almost everything in SQLite as even the Cache folder hast shm/wal files in it.

Soko

SokoFromNZ avatar May 19 '21 07:05 SokoFromNZ

Dear Andrey, I just found your app and instantly fell in love :) Unfortunately have android 11 and above issues affect me as well :( After fresh install the app starts with no problem, allows downloading maps ( I tried only 2-3 tiles), shows position, saves tracks. On the next start it freezes on splash-screen, although from there its behaviour is erratic and it sometimes starts and sometimes don't. Cleaning cache and/or data doesn't seem help consequently. Also there is no "exception.txt" file

CuriousCocainist avatar May 22 '21 21:05 CuriousCocainist

@CuriousCocainist: I've got it working in my own fork and the PR I've posted. Waiting for Andrey to react.

SokoFromNZ avatar May 25 '21 06:05 SokoFromNZ

Any updates on this? I'm having the same issue.

JonTabor avatar Aug 18 '21 22:08 JonTabor

Nope sorry. No reaction from Andrey on this. If you know how to operate Github with Android Studio you can make a Get on my fork and compile a working version by yourself.

SokoFromNZ avatar Aug 18 '21 23:08 SokoFromNZ

Does the problem persist after latest update?

andreynovikov avatar Apr 26 '22 18:04 andreynovikov

I was experiencing this issue last week on Android 12 with 2021.04 release, which was latest at the time. I saw 2022.04 was published yesterday and is now working :)

Also it'd be very helpful if you could publish APKs to the GitHub releases since it avoids the slow update time of F-Droid/Play Store!

nettybun avatar Apr 27 '22 03:04 nettybun

Looks good on my side. So I closed my Pull Request for this.

SokoFromNZ avatar Apr 27 '22 04:04 SokoFromNZ

@heyheyhello I'm considering that. Problem is that Google changes Android API so often that I have no time to work on new features, but have to fix and change everything they break.

andreynovikov avatar Apr 27 '22 07:04 andreynovikov

Confirmed that current version is working on Android 13. Closing issue

duggalsu avatar Jan 28 '24 13:01 duggalsu