Service not registered: com.google.android.gms.common.internal.zzf@20fb92a
Step 1: Describe your environment
- Android device: Xiaomi MI 8 UD (equuleus)
- Android OS version: 9.0
- Google Play Services version: 17.0.0
- Firebase/Play Services SDK version: 17.0.0
Step 2: Describe the problem:
app crash by the issue
Steps to reproduce:
Appears randomly and randomly during the process of using APP
Observed Results:
java.lang.IllegalArgumentException: at android.app.LoadedApk.forgetServiceDispatcher (LoadedApk.java:1570) at android.app.ContextImpl.unbindService (ContextImpl.java:1702) at android.content.ContextWrapper.unbindService (ContextWrapper.java:727) at com.google.android.gms.common.stats.ConnectionTracker.unbindService (Unknown Source:25) at com.google.android.gms.common.internal.zzf.zzf (Unknown Source:41) at com.google.android.gms.common.internal.zze.handleMessage (Unknown Source:45) at android.os.Handler.dispatchMessage (Handler.java:102) at com.google.android.gms.internal.common.zze.dispatchMessage (Unknown Source:8) at android.os.Looper.loop (Looper.java:201) at android.app.ActivityThread.main (ActivityThread.java:6806) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:873)
Expected Results:
no carsh
Relevant Code:
After integrating firebase in my project, I occasionally get the following error
Fatal Exception: java.lang.IllegalArgumentException: Service not registered: com.google.android.gms.common.internal.zzf@a87a29b at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1680) at android.app.ContextImpl.unbindService(ContextImpl.java:1781) at android.content.ContextWrapper.unbindService(ContextWrapper.java:730) at com.google.android.gms.common.stats.ConnectionTracker.unbindService(:25) at com.google.android.gms.common.internal.zzf.zzf(:41) at com.google.android.gms.common.internal.zze.handleMessage(:45) at android.os.Handler.dispatchMessage(Handler.java:102) at com.google.android.gms.internal.common.zze.dispatchMessage(:8) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7127) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
I checked the related source code for zzf
public final void zzf(String var1) { zze.zzb(this.zzec).removeMessages(1, this.zzeb); zze.zzd(this.zzec).unbindService(zze.zzc(this.zzec), this); this.zzea = false; this.mState = 2; }
I would like to ask whether this service is bound by firebase, and when was it unbundled, why did this problem occur when unbundling?
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Same issue,please fix this.
implementation 'com.google.firebase:firebase-messaging:20.0.0'
implementation 'com.google.firebase:firebase-core:17.0.0'
...
apply plugin: 'com.google.gms.google-services'

Same issue,please fix this

Same issue,please fix this
![]()
This issue first happened in version 7.0.3 of my app, in version 7.0.3 I upgraded the version of Android gradle plugin (from 2.3.2 to 3.5.2) . Is there any incompatibility between the firebase SDK and version 3.5.2 of gradle plugin?
Thanks for your patience. Are you seeing the issue in specific locations and only on Xiaomi MI 8 UD devices?
Thanks for your patience. Are you seeing the issue in specific locations and only on Xiaomi MI 8 UD devices?
can find in huawei and samsung
Firebase uses FirebaseInitProvider to obtain the Context without intrusion, and this Context is an instance of Application, so we can rewrite Application#unbindService(), and the unbindService() that is finally called will be captured here
@Override
public void unbindService(ServiceConnection conn) {
try {
super.unbindService(conn);
} catch (IllegalArgumentException e) {
e.printStackTrace();
// do something, ignore or report...
}
}
Firebase uses FirebaseInitProvider to obtain the Context without intrusion, and this Context is an instance of Application, so we can rewrite Application#unbindService(), and the unbindService() that is finally called will be captured here
@Override public void unbindService(ServiceConnection conn) { try { super.unbindService(conn); } catch (IllegalArgumentException e) { e.printStackTrace(); // do something, ignore or report... } }
same issue and i add these code in my application but it not worked.
Getting similar issue .. Please update.
Getting similar issue .. Please update.
Getting similar issue .. Please fix it.
Hi @jecksonwang Sorry for the long wait here. I'd like to confirm if you're still seeing this issue? I'd recommend using the latest SDK version in your app to ensure old known bugs are fixed.
Thanks!
Hi @jecksonwang Sorry for the long wait here. I'd like to confirm if you're still seeing this issue? I'd recommend using the latest SDK version in your app to ensure old known bugs are fixed.
Thanks!
@aguatno I'm using the latest sdk version,but bugs still exist.
Hey @jecksonwang. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@jecksonwang if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.