Closed chrysn closed 1 year ago
According to your posted stack trace, the static Setup.java
was not initialized:
https://github.com/OpenLauncherTeam/openlauncher/blob/a80293e38e7e08525c002a801c25dd643b75f853/app/src/main/java/com/benny/openlauncher/manager/Setup.java#L23-L28
Searching the code shows that only in the HomeActivity, the setup is being initialized: https://github.com/OpenLauncherTeam/openlauncher/blob/22e681e5dada9cb9e7c4fece4428e65040ecfa89/app/src/main/java/com/benny/openlauncher/activity/HomeActivity.java#L186-L188
I do not know why this activity is not executed (and thus the Setup is not being initialized) but maybe it is sufficient to initialize it right before https://github.com/OpenLauncherTeam/openlauncher/blob/a80293e38e7e08525c002a801c25dd643b75f853/app/src/main/java/com/benny/openlauncher/receivers/ShortcutReceiver.java#L54
Unfortunately I am no Java and no App developer, I have not the required understanding to say for sure what the solution is.
Thanks for your input. Based on this, I'd guess that this could all be happening when the launcher app has been unloaded by the OS for being inactive; this would often not show in testing as there one'd be hopping back and forth between the launcher and the PWA installer, and in my tests I've been using Chromium for some time before I pushed the 'install' button.
Only before Android Oreo. Since Oreo ShortcutReceiver
was deprecated in favor of ShortcutManager.pinRequestShortcut()
.
I made a patch (https://github.com/Ptitg/openlauncher/tree/fix/adding_pwa_crash), but I don't have the right version of android to test. If someone can test. If it's OK, I'll make a pull request.
General Information
Description
Adding a PWA launcher from Chromium sometimes produces a crash screen:
Log
A crash report was shown:
Further references
PWA shortcuts were introduced in #637 by @Apollo3zehn -- if you read this and it does ring a bell, hints would be appreciated.
Next steps
I'll yet have to see whether I can make anything of this or fix it myself.