Critical Bug in Android 15 OS Affects Some Hermit Features
Dec 11, 2024
With the latest Android 15 update, (Build AP4A.241205.013
), Google appears to have introduced a bug that leads to a crash inside the operating system. This affects Hermit features like opening an already-open Lite App from the home screen or via a notification.
With new Android releases, Google introduces new features, but also new bugs. This isn’t the first time that a Google update has introduced severe issues for Android Apps.
We request you to please up-vote this bug filed in the Android Issue Tracker by starring it, so it gets the attention it deserves and gets prioritized by Google for the next Android release. Thank you!
To be super clear, this was not introduced by us, but by Google. As long as you don’t install the latest Pixel update (soon to roll out to many other devices), your phone/tablet will continue to work fine.
What Happened?
When you tap on a Lite App icon from the home screen, Hermit first checks to see if you have that Lite App already open. If so, it will ask Android OS to bring that Lite App to the foreground, instead of starting a new instance of that Lite App.
Or, when you tap on a notification (from a Feed or Web Monitor configured in Hermit), Hermit will likewise first check to see if that Lite App is already open. And it will bring that to the front instead of starting a new instance.
The bug is in the Android OS code that handles bringing background activities to the foreground. Due to a coding error by Android engineers, this code runs into a NullPointerException
.
Solutions and Workarounds
At this time, we don’t yet have a solution, but we are working through our options. This blog post will be updated when we have a recommended solution.
Most likely, we will add messaging in the Hermit app letting you know when the app encounters this bug, so at least you are aware of the reason when a Hermit feature fails to work as expected on your device.
Technical Details
Calling ActivityManager$AppTask.moveToFront
from a client app leads to a NullPointerException in BackgroundActivityStartController
Here is the stack trace for the buggy code. As you can see, the crash is deep inside operating system level code, and only Google is in a position to fix this from their end.
AppTaskImpl onTransact aborts UID:10420 PID:28294
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.android.server.wm.BackgroundActivityStartController$BalVerdict.allows()' on a null object reference
at com.android.server.wm.BackgroundActivityStartController.statsLog(BackgroundActivityStartController.java:1753)
at com.android.server.wm.BackgroundActivityStartController.allowBasedOnCaller(BackgroundActivityStartController.java:821)
at com.android.server.wm.BackgroundActivityStartController.checkBackgroundActivityStart(BackgroundActivityStartController.java:757)
at com.android.server.wm.AppTaskImpl.moveToFront(AppTaskImpl.java:131)
at android.app.IAppTask$Stub.onTransact(IAppTask.java:130)
at com.android.server.wm.AppTaskImpl.onTransact(AppTaskImpl.java:68)
at android.os.Binder.execTransactInternal(Binder.java:1391)
at android.os.Binder.execTransact(Binder.java:1335)
uncaughtException: NullPointerException Attempt to invoke virtual method 'boolean com.android.server.wm.BackgroundActivityStartController$BalVerdict.allows()' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.android.server.wm.BackgroundActivityStartController$BalVerdict.allows()' on a null object reference
at android.os.Parcel.createExceptionOrNull(Parcel.java:3237)
at android.os.Parcel.createException(Parcel.java:3215)
at android.os.Parcel.readException(Parcel.java:3198)
at android.os.Parcel.readException(Parcel.java:3140)
at android.app.IAppTask$Stub$Proxy.moveToFront(IAppTask.java:225)
at android.app.ActivityManager$AppTask.moveToFront(ActivityManager.java:6190)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.wm.BackgroundActivityStartController.statsLog(BackgroundActivityStartController.java:1753)
at com.android.server.wm.BackgroundActivityStartController.allowBasedOnCaller(BackgroundActivityStartController.java:821)
at com.android.server.wm.BackgroundActivityStartController.checkBackgroundActivityStart(BackgroundActivityStartController.java:757)
at com.android.server.wm.AppTaskImpl.moveToFront(AppTaskImpl.java:131)
at android.app.IAppTask$Stub.onTransact(IAppTask.java:130)
Updates
This is a developing issue. We have not yet finished our planning for how to handle this. In the interest of providing you quick timely updates, this blog post offers early details of the detected problem.
Once we have more clarity on a temporary workaround, we will update this with more details.
Thank you for your patience and understanding while we navigate this mess. We hope, just as we’re sure you do, that Google fixes this issue before the latest update, and that this feature does not stay broken for too long.