Reputation: 5414
We got lot of crash reports from Firebase regarding this crash.
Fatal Exception: android.app.RemoteServiceException$CannotDeliverBroadcastException: can't deliver broadcast
at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2219)
at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2508)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8762)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Crash happens only on Samsung devices running android 13 (API 33)
We followed this post CannotDeliverBroadcastException only on Pixel devices running Android 12
The thing is - we can't just silence/absorb this crash, as some of our app functionality is build on the broadcast (BroadcastReceiver, registered in Manifest).
We need to actually prevent this crash (somehow :))
We checked also this one on google issue tracker but it seems there is no solution https://issuetracker.google.com/issues/245258072
Any of you found a solution for this? Thanks
Upvotes: 1
Views: 459
Reputation: 3721
This may not be a broadcast bug at all, but a knock-on error caused by memory fragmentation (OOM).
Profile your app while it is running and make sure it is not running out of its allocated memory.
Here are some very good suggestions to try. Bouncing the service (kill/relaunch) on a timer might prevent this behavior too.
Upvotes: 0