humhub/app

App crashes at first start

Closed this issue · 13 comments

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?

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.

@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:

  • Android settings -> Apps -> HumHub
  • Storage -> CLEAR DATA
  • Open HumHub and connect to https://community.humhub.com instance
  • Click on "Got it" (the button at the bottom about cookies)
  • The app crashes

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

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.

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

@PrimozRatej Done just now

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

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.

@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: #104
And it came back again?

Do you want the logcat from adb?

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

crash.txt

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 #198

@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!

@marc-farre Just started the 1.0.103 Release Rollout!