[de.check24.check24] BackgroundServiceStartNotAllowedException: Not allowed to start service Intent
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 14.6k
- Forks
- 3.2k
- Avg merge
- 12d 11h
- Merged PRs (30d)
- 4
Description
Affected app
Name: CHECK24
Package id: de.check24.check24
Describe the bug
I am a developer of the CHECK24 app. We are getting quite regular Sentry crash logs since 6th August with the error message Not allowed to start service Intent { act=com.google.android.gms.analytics.ANALYTICS_DISPATCH cmp=de.check24.check24/com.google.android.gms.analytics.AnalyticsService }: app is in background uid UidRecord{db0c2cc u0a241 CAC bg:+4m23s554ms idle change:procadj procs:0 seq(404703,399269)}. The Google Play version is set to 0.3.2.240913-22 which directly leads to microG when searching it in Google. So I assume that it is related to this project.
Here is the stack trace:
java.lang.RuntimeException: Error receiving broadcast Intent { act=com.google.analytics.RADIO_POWERED cat=[de.check24.check24] flg=0x10 (has extras) } in com.google.android.gms.internal.gtm.zzfe@fff8f18
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$android-app-LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1800)
at android.app.LoadedApk$ReceiverDispatcher$Args$$ExternalSyntheticLambda0.run
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7924)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { act=com.google.android.gms.analytics.ANALYTICS_DISPATCH cmp=de.check24.check24/com.google.android.gms.analytics.AnalyticsService }: app is in background uid UidRecord{db0c2cc u0a241 CAC bg:+4m23s554ms idle change:procadj procs:0 seq(404703,399269)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1908)
at android.app.ContextImpl.startService(ContextImpl.java:1864)
at android.content.ContextWrapper.startService(ContextWrapper.java:817)
at com.google.android.gms.internal.gtm.zzbs.zzc(com.google.android.gms:play-services-analytics-impl@@18.0.4:0)
at com.google.android.gms.internal.gtm.zzbs.zzc(com.google.android.gms:play-services-analytics-impl@@18.0.4:7)
at com.google.android.gms.internal.gtm.zzfe.onReceive(com.google.android.gms:play-services-analytics-impl@@18.0.4:0)
at com.google.android.gms.internal.gtm.zzfe.onReceive(com.google.android.gms:play-services-analytics-impl@@18.0.4:15)
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$android-app-LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1790)
at android.app.LoadedApk$ReceiverDispatcher$Args$$ExternalSyntheticLambda0.run
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7924)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
To Reproduce
We can unfortunately not reproduce this crash locally as it a) seems to be rare and b) we don't have test devices running microG.
Expected behavior
The app should not crash when the user has microG installed instead of the regular Google Play Services.
System
Android Version: we got crash logs for Android 12 and 13
Custom ROM: I cannot see if a user has a custom ROM installed, but the Sentry root detection shows that the devices are not rooted
microG
microG Core version: 0.3.2.240913-22
microG Self-Check results: I cannot verify that as I don't use microG
Additional context
Please let me know if there is something that we can do on our side to prevent this.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided stack trace, especially zzfe.onReceive, zzbs.zzc, and AnalyticsService, and inspect the repository's corresponding analytics implementation. Investigate the Android 12/13 background-service restriction under microG 0.3.2.240913-22. Done means identifying a reproducible or testable handling path that prevents this broadcast from crashing the app.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100