vicolo-dev / chrono

A modern and powerful clock, alarms, timer and stopwatch app for Android!
GNU General Public License v3.0
305 stars 13 forks source link

App opens to black screen on first run #289

Open erikpopp opened 1 month ago

erikpopp commented 1 month ago

Description I was intrigued when I saw this app in the F-Droid store, but when I installed it and tried opening it, I found that it didn't start properly.

It opened to a black screen (see attached screenshot).

Interestingly, when I tried uninstalling and reinstalling chrono, it worked fine.

To Reproduce

  1. On GrapheneOS, download chrono from the F-Droid store
  2. Open chrono from F-Droid
  3. Manually close app by going to switch app screen and swiping on chrono
  4. Open chrono again. I opened it from the normal app menu, but I would presume it doesn't matter where it is opened from. When I subsequently tried opening chrono from F-Droid it seemed to work fine.

Expected behavior App opens to initial screen.

Screenshots First run: Screenshot_20240531-060109

Second run after closing app and reopening: Screenshot_20240531-061808

Smartphone Information

Additional context If this issue is difficult to reproduce, it might be specific to GraphrneOS.

GrapheneOS is a security and privacy focused Android ROM that uses a sandbox called GMSCompat to isolate Play Services from the rest of Android; thus enabling GrapheneOS to limit its permissions like any other app. This solves the problem of Google listening to your conversations, among other things.

If this issue only happens on GrapheneOS, then odds are you are doing something that confuses GMSCompat. This could mean you are calling a function that GMSCompat does not currently support or it could mean that you are running into a permissions issue. You could also have done something that is technically not correct but but still works on most Androids.

AhsanSarwar45 commented 1 month ago

Thanks for the report. It does seem specific to GrapheneOS since I can't reproduce it. I'll take a look if something isn't allowed under GMSCompat. The app mostly just creates some data files on first launch and gets notification permission. Did it ask you for notification permission on first or second launch?

erikpopp commented 1 month ago

It asked me for notification permission on first launch.

Also I'mnoew running into another issue: when I open Chrono it gets stuck on its initial loading graphic. I've attached a screenshot. If I had to guess, I'd say that there is probably a security feature that GrapheneOS enables that most Android distros don't. Are there any Android security features/hardening option that Android provides that could cause Chrono problems if they were enabled?

One thing off the top of my head is that GrapheneOS by default gives filesystem access permissions only for the which an app is actually accessing, so if an app asks for permission to access all files, GrapheneOS will by default only give it access to the folder it actually is accessing, but then the app will think it has permission to access all files so it works properly.

This feature is intended to make intrusive apps less able to access sensitive data, but if GrapheneOS has similar policies in place elsewhere, I could see that causing problems with Chrono - especily if some of the files it accesses are outside of its own app folder.

If Chrono does access files outside its own app folder on startup, then it may have to ask for permission to do so on GrapheneOS.

I hope this is helpful, and thank you for taking the time to address my issue.

-Erik

-------- Original Message -------- On 6/1/24 7:53 AM, Ahsan Sarwar wrote:

Thanks for the report. It does seem specific to GrapheneOS since I can't reproduce it. I'll take a look if something isn't allowed under GMSCompat. The app mostly just creates some data files on first launch and gets notification permission. Did it ask you for notification permission on first or second launch?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

AhsanSarwar45 commented 1 month ago

Are you familiar with using adb logcat? Or if your phone is rooted, or has Shizuku, you can install a logcat app like LogFox. Or if you have flutter sdk on you computer, you can run flutter logs to get cleaner logs. If its possible for you to do this, can you sends the logs you get after opening my app?

My app only really reads or writes within its own app data directory, so that probably isn't an issue.