microg / microg/GmsCore

Background start not allowed: service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms

Open
#677 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
14.6k
Forks
3.2k
Avg merge
12d 11h
Merged PRs (30d)
4

Description

Android 8.1
MicroG: 0.2.6.13280-dirty

I've successfully installed MicroG in Android 8.1 and most apps are working perfectly.

But several apps are crashing on startup with the error below:

AndroidRuntime: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms (has extras) }: app is in background uid UidRecord{b092f7c u0a80 TRNB idle change:idle|uncached procs:1 seq(0,0,0)}
AndroidRuntime:        at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1521)
AndroidRuntime:        at android.app.ContextImpl.startService(ContextImpl.java:1477)
AndroidRuntime:        at android.content.ContextWrapper.startService(ContextWrapper.java:650)
AndroidRuntime:        at com.google.firebase.iid.h.b(Unknown Source:5000)
AndroidRuntime:        at com.google.firebase.iid.h.a(Unknown Source:0)
AndroidRuntime:        at com.google.firebase.iid.f.b(Unknown Source:4000)
AndroidRuntime:        at com.google.firebase.iid.FirebaseInstanceId.e(Unknown Source:2000)
AndroidRuntime:        at com.google.firebase.iid.FirebaseInstanceIdService.d(Unknown Source:21)
AndroidRuntime:        at com.google.firebase.iid.FirebaseInstanceIdService.b(Unknown Source:1000)
AndroidRuntime:        at com.google.firebase.iid.d.run(Unknown Source:4)
AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
AndroidRuntime:        at java.lang.Thread.run(Thread.java:764)

I found that by uninstalling and reinstalling the app the problem goes away. But when I reboot the device the same error starts happening again until I uninstall/reinstall the app.

Any suggestions on how to fix this issue permanently?

Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Android 8.1 failure after reboot and inspect the reported REGISTER service stack trace in GmsCore's handling of Google Cloud Messaging. Compare the behavior before and after reinstalling the affected app; done means background-start failures no longer crash apps after reboot.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.