humhub / app

18 stars 7 forks source link

App crashes at first start #165

Closed marc-farre closed 1 day ago

marc-farre commented 3 months ago

I experiment random crashes of the app on my Huawei P30 pro Android 10. Even on https://community.humhub.com/ It happens mainly a few seconds after clicking on "Connect" when clicking on a login field, or after login after clicking a link. It doesn't seam to be related to what I click on because it's quite random, but it's mainly at the beginning of using HumHub. I have this issue since many versions of the app (maybe from the beginning).

@PrimozRatej maybe I could help with ADB to have the log? Another idea?

PrimozRatej commented 1 month ago

Hey @marc-farre I assume this bug it's due to the newly added permission on Android that came with Android 14, SCHEDULE_EXACT_ALARM (API level 34). I couldn't replicate a bug (On the emulator with Android 14 it seems to work fine, but I couldn't test it on a physical device as I have a Huawei with an older Android version).

image

Our app does not directly use this permission, but some external libraries do. I bumped those to the latest version. The libraries in question are flutter_local_notifications (used for push redirects, fixed in 16.3.3) and permission_handler (used for checking if the user allowed notifications for the app, fixed in 10.2.0).

Maybe we could leave this task open for the time being until we are sure that this is not the problem anymore. I will circle back to you in a couple of days to make sure this is fixed.

marc-farre commented 1 month ago

@PrimozRatej Thanks! I personally still have the issue with Android 10.

I renamed this issue title because I can now reproduce it every time. @luke- Can you reopen it?

Steps to reproduce:

PrimozRatej commented 1 month ago

Hey @marc-farre does this look like your device?

image

It looks like Chromium WebView has some problems since March. https://issuetracker.google.com/issues/324803204

marc-farre commented 1 month ago

does this look like your device?

Yes, except that mine is HUAWEI P30 pro (and not lite). But I didn't do the crash 8 hours ago. If you want, I can make it crash again.

PrimozRatej commented 1 month ago

If you can, please, it will help a lot. I can't seem to replicate it.

marc-farre commented 1 month ago

@PrimozRatej Done just now

PrimozRatej commented 1 month ago

Thanks, I'll let you know. The crash log updates every couple of hours.

PrimozRatej commented 1 month ago

Hey @marc-farre, strange that your crash is not detected in the crash report on Google Play. We can enable Google Analytics for more in-depth tracking and then test this in real-time. The most annoying thing is that I really can't replicate the bug. I downloaded the exact image that the P30 Pro uses, and I could't replicate. I would say it's device-specific, but I also tested it on an actual P30 Pro (physical device), so idk anymore.

marc-farre commented 1 month ago

@PrimozRatej Thanks for your tests. I still think there is an issue with the app, because other apps nether crashes on my phone.

Maybe it's the same issue we had here: https://github.com/humhub/app/issues/104 And it came back again?

Do you want the logcat from adb?

PrimozRatej commented 1 month ago

Finally able to recreate the crash, I think this is the bug in question.

crash.txt

PrimozRatej commented 2 days ago

Hey @marc-farre, The problem was with the underlying native web view library. Some devices had issues communicating with the new versions of Android WebView, but they have patched it now. I tested it on my P30, and the prod app no longer crashes when opening the menu dialog. This PR should fix it https://github.com/humhub/app/pull/198

marc-farre commented 1 day ago

@PrimozRatej Thanks, works perfectly!

@luke- If not too long to upload on the Play Store, I think this version would be great to have, as it gives a much better first experience with the app. Thanks!

luke- commented 1 day ago

@marc-farre Just started the 1.0.103 Release Rollout!