firebase-android-sdk: java.lang.IllegalArgumentException: Service not registered: com.google.android.gms.measurement.internal.zzji@dbed45a
I have the following exception when FirebaseAnalytics.logEvent executes :
com.dreamtechs.MadfooatCom W/ConnectionTracker: Exception thrown while unbinding
java.lang.IllegalArgumentException: Service not registered: com.google.android.gms.measurement.internal.zzji@dbed45a
at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1832)
at android.app.ContextImpl.unbindService(ContextImpl.java:1880)
at android.content.ContextWrapper.unbindService(ContextWrapper.java:741)
at com.google.android.gms.common.stats.ConnectionTracker.zza(com.google.android.gms:play-services-basement@@17.3.0:55)
at com.google.android.gms.common.stats.ConnectionTracker.unbindService(com.google.android.gms:play-services-basement@@17.3.0:50)
at com.google.android.gms.measurement.internal.zzir.zzah(com.google.android.gms:play-services-measurement-impl@@17.4.3:251)
at com.google.android.gms.measurement.internal.zzir.zzam(com.google.android.gms:play-services-measurement-impl@@17.4.3:268)
at com.google.android.gms.measurement.internal.zzir.zzc(com.google.android.gms:play-services-measurement-impl@@17.4.3:335)
at com.google.android.gms.measurement.internal.zziq.zza(com.google.android.gms:play-services-measurement-impl@@17.4.3:2)
at com.google.android.gms.measurement.internal.zzaj.run(com.google.android.gms:play-services-measurement-impl@@17.4.3:7)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.google.android.gms.measurement.internal.zzfz.run(com.google.android.gms:play-services-measurement-impl@@17.4.3:21)
implementation 'com.google.android.gms:play-services-base:17.3.0'
implementation 'com.google.android.gms:play-services-basement:17.3.0'
implementation "com.google.android.gms:play-services-vision:20.1.0"
implementation "com.google.android.gms:play-services-places:17.0.0"
implementation "com.google.android.gms:play-services-location:17.0.0"
implementation "com.google.android.gms:play-services-auth:18.0.0"
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.google.android.gms:play-services-analytics:17.0.0'
implementation 'com.google.android.gms:play-services-auth-api-phone:17.4.0'
implementation "com.google.firebase:firebase-core:17.4.3"
implementation "com.google.firebase:firebase-messaging:20.2.0"
implementation "com.google.firebase:firebase-invites:17.0.0"
implementation "com.google.firebase:firebase-config:19.1.4"
implementation 'com.google.firebase:firebase-firestore:21.4.3'
implementation 'com.google.firebase:firebase-functions:19.0.2'
implementation 'com.google.firebase:firebase-crashlytics:17.0.1'
implementation 'com.google.firebase:firebase-analytics:17.4.3'
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 212
- Comments: 192 (11 by maintainers)
Links to this issue
Commits related to this issue
- Update play services. Update should fix "IllegalArgumentException : Service not registered" exception https://github.com/firebase/firebase-android-sdk/issues/1662 — committed to covid19cz/erouska-android by deleted user 4 years ago
- Update play services. (#378) Update should fix "IllegalArgumentException : Service not registered" exception https://github.com/firebase/firebase-android-sdk/issues/1662 Co-authored-by: Tomáš... — committed to covid19cz/erouska-android by Gh0stahCZ 4 years ago
Hey folks,
As many of you have pointed out, it turns out that there exist some device configurations that trigger the warning even with the workaround I provided above.
Unfortunately there is nothing more we can do to “silence” the warning on the SDK side. The warning is caused by “Google Play Services” itself. The good news is that the root cause of the issue is now fixed, however it will roll out to devices around February, so we will have to live with this warning for a few months.
I understand that it is causing inconvenience for developers, but fwiw it’s a warning not a crash. So please bear with us till the update gets rolled out. Thanks
PS: Many of you have commented that this warning is sometimes followed by a crash(with its own exception), I am fairly confident that in most cases, the crash is completely unrelated to this warning and just so happens to occur right after it. So please investigate your crashes independently, just ignoring the warning. If however you think that the crash is related, please provide:
Adding:
seems to solve the issue (the warning is no longer logged).
So just to give an update to everyone interested: we’ve confirmed with the team that the warning is benign(although admittedly annoying). Feel free to ignore it until we make the fix that will “silence” this warning.
Once again it’s not a fatal error, it’s just a logcat warning
Any errors that happen before or after it are very likely unrelated
Same/similar issue … no crashes but getting this after adding firebase_core and updating crashlytics SDK
THIS SEEMS TO HAVE FIXED IT FOR ME
adding these two dependencies to app level build.gradle (…/android/app/build.gradle)
Folks, Apologies for the silence from our end. We’ll do better! We lost sight of this since it was deemed initially that these are noisy logs more than anything else (internal bug reference), with crashes being a rare theoretical possibility, but not something we could internally reproduce
I can’t parse from the thread whether folks are seeing crashes(other than in Flutter), missing data, faulty behavior or whether the logs are raising false alarms. If you are seeing crashes, or faulty product behavior please drop a note.
Again, sry bout the delays and thanks for your patience!
Still no fix since Jun 14, although the issue is perfectly reproducible. Please everyone here in this thread vote up this issue to speed up the fix. Thanks.
Even if I change gradle like this, I still get an error.
W/ConnectionTracker: Exception thrown while unbinding java.lang.IllegalArgumentException: Service not registered: lv@e66c395 at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1289) at android.app.ContextImpl.unbindService(ContextImpl.java:1502) at android.content.ContextWrapper.unbindService(ContextWrapper.java:648) at ci.f(:com.google.android.gms.dynamite_measurementdynamite@204516056@20.45.16 (040800-0):1) at ci.d(:com.google.android.gms.dynamite_measurementdynamite@204516056@20.45.16 (040800-0):2) at lw.E(:com.google.android.gms.dynamite_measurementdynamite@204516056@20.45.16 (040800-0):9) at lg.a(:com.google.android.gms.dynamite_measurementdynamite@204516056@20.45.16 (040800-0):3) at eg.run(:com.google.android.gms.dynamite_measurementdynamite@204516056@20.45.16 (040800-0):3) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at iz.run(:com.google.android.gms.dynamite_measurementdynamite@204516056@20.45.16 (040800-0):5)
Hello, everyone, I have a small iPhone project (Native swift) to complete in a day. I need someone who completes it
if you are interesting it, let me know
Thank you
Same issue for me on Flutter
Issue started in
play-services-basement:17.3.0
I get the same error. I am using firebase-core 17.4.3 and crashlytics 2.10.1
Same for in flutterfire
@ashwinraghav Is this actually being worked on?
The temporary fix you provided in your comment on June 29 obviously does not work. Would be really good to get a fix progress update 😃
Why do we need to add these?
There are 2 parts to this issue, both of which can be fixed by updating your dependencies to the following:
The above will silence the warnings, in the meantime our engineers will be working to fix the problem in Google Play Services to make these warnings go away completely(no SDK updates will be required on the developers’ part).
As this issue seems to have gone stale, maybe people still experiencing this problem should each be creating a new issue rather than adding further comments to this one.
No one is assigned to this, the contributor isn’t responding and we are 6 months down the road waiting for a fix. Then hopefully someone in Google has to read them to mark them as duplicates. Just a thought 😃
Adding
implementation 'com.google.android.gms:play-services-basement:17.5.0'
might work on some devices, but if you check your users logs you will see that a lot of them are still getting this issue.There is no fix for this at the moment and Google isn’t interested in fixing this issue or any other issue reported by hundreds of developers. This is a shame because both developer AND Google are losing money over this
Gathered the feedback from this thread and others so this answer can encapsulate as many fixes as possible.
Thanks for those that helped with their contributions. 👍
Log show when not action in app
W/ConnectionTracker: Exception thrown while unbinding java.lang.IllegalArgumentException: Service not registered: lu@c38f59c at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1671) at android.app.ContextImpl.unbindService(ContextImpl.java:1781) at android.content.ContextWrapper.unbindService(ContextWrapper.java:730) at ci.f(:com.google.android.gms.dynamite_measurementdynamite@204516065@20.45.16 (100400-0):1) at ci.d(:com.google.android.gms.dynamite_measurementdynamite@204516065@20.45.16 (100400-0):2) at lv.E(:com.google.android.gms.dynamite_measurementdynamite@204516065@20.45.16 (100400-0):9) at lf.a(:com.google.android.gms.dynamite_measurementdynamite@204516065@20.45.16 (100400-0):3) at ef.run(:com.google.android.gms.dynamite_measurementdynamite@204516065@20.45.16 (100400-0):3) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:459) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at iy.run(:com.google.android.gms.dynamite_measurementdynamite@204516065@20.45.16 (100400-0):5)
I also have this error . Actually comment out this line implementation ‘com.google.android.gms:play-services-base:17.3.0’ It’s just that the version number went from 17.3.0 to 17.0.0 And then there was no mistake
Guys,
It is clear this is an error on firebase/google-play-services import No combination or order you try to import makes any difference it will still get this error UNTIL THEY SOLVE IT AND RELEASE A NEW VERSION
This is a non fatal error and it is not clear to me what are the real side effects of it, but i get over 2k errors like this per day but no crashes in my app in production so this is a minor error
as always people on google tend to take MONTHS or YEARS to solve problems pointed by community in their free services so i strongly suggest stop speculating… all messages here suggesting that any specific combinations of import/versions order etc is simple bullshit…
if you are really concerned about it… downgrade all firebase api to bellow 20 and google-play-services bellow 17 and done
same issue here. adding
implementation 'com.google.android.gms:play-services-basement:17.5.0'
does not fix the issue for meI fixed adding: implementation ‘com.google.android.gms:play-services-basement:17.5.0’ (version not relevant, just get the latest)
In my case the error show up when integrate the Firebase Performance sdk.
Error:
W/ConnectionTracker: Exception thrown while unbinding java.lang.IllegalArgumentException: Service not registered: com.google.android.gms.measurement.internal.zzji@a48bf5 at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1557) at android.app.ContextImpl.unbindService(ContextImpl.java:1692) at android.content.ContextWrapper.unbindService(ContextWrapper.java:717) at com.google.android.gms.common.stats.ConnectionTracker.zza(com.google.android.gms:play-services-basement@@17.3.0:55) at com.google.android.gms.common.stats.ConnectionTracker.unbindService(com.google.android.gms:play-services-basement@@17.3.0:50) at com.google.android.gms.measurement.internal.zzio.zzag(com.google.android.gms:play-services-measurement-impl@@17.6.0:245) at com.google.android.gms.measurement.internal.zzio.zzal(com.google.android.gms:play-services-measurement-impl@@17.6.0:262) at com.google.android.gms.measurement.internal.zzio.zzc(com.google.android.gms:play-services-measurement-impl@@17.6.0:336) at com.google.android.gms.measurement.internal.zzir.zza(com.google.android.gms:play-services-measurement-impl@@17.6.0:2) at com.google.android.gms.measurement.internal.zzai.run(com.google.android.gms:play-services-measurement-impl@@17.6.0:7) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.google.android.gms.measurement.internal.zzfs.run(com.google.android.gms:play-services-measurement-impl@@17.6.0:21)
Gradle:
I have this issue with my
implementation "com.google.android.gms:play-services-ads:$admob_version"
admob_version = ‘19.3.0’ I’ve just checked, no new versions available.Folks, We wish to acknowledge the problem. I’ve been able to repro the issue with the below configuration
Thanks @amal @virgil85 @voyula for pointing us in the right direction.
The temporary fix while we work on this is to exclude base from the build.
implementation ‘com.google.android.gms:play-services-base:17.3.0’Products that need base should automatically bring in the right version of base.
If there are use cases that need you to explicitly codify base as an explicit dependency that I am not aware of, pls drop us a note.
After trying everything this exact combination of versions and order seem to have solved the issue for us as well!
THANKS
Same here,
implementation 'com.google.android.gms:play-services-basement:17.4.0'
didn’t fix itMy env is the following Flutter 1.22.0 • channel stable firebase_core: ^0.5.2 firebase_crashlytics: ^0.2.3 firebase_analytics: ^6.2.0
Doesn’t work for me.
My first encounter with this similar problem was just one month ago. It was initially solved temporarily by adding
implementation 'com.google.android.gms:play-services-basement:17.5.0'
. But now that is not working anymore and the exception keeps being logged again in the console and that annoys a lot.And yeah, I experience it with real device.
I do confirm that I only have this issue only with my connected android device and not the emulator.
I’m also getting this error using Flutter, I’ve tried everything above.
Dependencies:
App Level build.gradle:
Debug Output:
is it anything serious?
This doesn´t work for me Using : androidTestImplementation ‘com.google.android.gms:play-services-analytics:18.0.0’ implementation ‘com.google.android.gms:play-services-basement:17.5.0’
Yes its. We need flutter to provide fix asap
On Wed, Nov 11, 2020, 18:18 saveKenny notifications@github.com wrote:
add the dependency:
to the gradle
same issue with
on main gradle
Yes, it works for me ! Thanks.
Much of that is deprecated so I don’t want to put it back. See: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects [image: Mailtrack] https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5& Sender notified by Mailtrack https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5& 24/12/20, 12:36:43
On Thu, 24 Dec 2020 at 12:20, truongpx396 notifications@github.com wrote:
–
Kind regards,
Graham
Hi… I m getting the same warning in Logcate. I want to know this warning is affected by Application performance?
Library :
W/ConnectionTracker(20646): Exception thrown while unbinding W/ConnectionTracker(20646): java.lang.IllegalArgumentException: Service not registered: lv@9bd6d41 W/ConnectionTracker(20646): at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1156) W/ConnectionTracker(20646): at android.app.ContextImpl.unbindService(ContextImpl.java:1452) W/ConnectionTracker(20646): at android.content.ContextWrapper.unbindService(ContextWrapper.java:644) W/ConnectionTracker(20646): at ci.f(:com.google.android.gms.dynamite_measurementdynamite@204516044@20.45.16 (040300-0):1) W/ConnectionTracker(20646): at ci.d(:com.google.android.gms.dynamite_measurementdynamite@204516044@20.45.16 (040300-0):2) W/ConnectionTracker(20646): at lw.E(:com.google.android.gms.dynamite_measurementdynamite@204516044@20.45.16 (040300-0):9) W/ConnectionTracker(20646): at lg.a(:com.google.android.gms.dynamite_measurementdynamite@204516044@20.45.16 (040300-0):3) W/ConnectionTracker(20646): at eg.run(:com.google.android.gms.dynamite_measurementdynamite@204516044@20.45.16 (040300-0):3) W/ConnectionTracker(20646): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423) W/ConnectionTracker(20646): at java.util.concurrent.FutureTask.run(FutureTask.java:237) W/ConnectionTracker(20646): at iz.run(:com.google.android.gms.dynamite_measurementdynamite@204516044@20.45.16 (040300-0):5)
I have same issue. There is no problem on Android emulator. But in android phones, it gives this error. I added to playstore for internal test. There is a crash report with ‘java.lang.NoClassDefFoundError: aewt’ exception.
I’m experiencing this issue on Pixel 5 physical hardware. Very annoying. Please provide a fix Google.
try adding
to gradle dependencies
Commenting out 17.3.0 I get…
At 17.2.1, I got
No static method isAtLeastR
, a known issue. 17.0.0 could not login to Firebase, 17.1.0 seems to work for me at least thus far.I have the same error, but when I hit the enter key it jumps to red compileExpression And it blocks me from using HOT REALOAD AND RESTART
Packages Flutter firebase_core: ^0.5.3 firebase_analytics: ^6.3.0 firebase_messaging: ^7.0.3
Graddle implementation ‘com.google.firebase:firebase-analytics:18.0.0’ implementation ‘com.google.firebase:firebase-messaging:21.0.1’ implementation ‘com.google.android.gms:play-services-basement:17.5.0’
I just now had a similar issue pop up that will not go away. Using java in android studio:
W/ConnectionTracker: Exception thrown while unbinding java.lang.IllegalArgumentException: Service not registered: lu@f1bf131 at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1751) at android.app.ContextImpl.unbindService(ContextImpl.java:1776) at android.content.ContextWrapper.unbindService(ContextWrapper.java:741) at ci.f(:com.google.android.gms.dynamite_measurementdynamite@204516084@20.45.16 (120700-0):1) at ci.d(:com.google.android.gms.dynamite_measurementdynamite@204516084@20.45.16 (120700-0):2) at lv.E(:com.google.android.gms.dynamite_measurementdynamite@204516084@20.45.16 (120700-0):9) at lf.a(:com.google.android.gms.dynamite_measurementdynamite@204516084@20.45.16 (120700-0):3) at ef.run(:com.google.android.gms.dynamite_measurementdynamite@204516084@20.45.16 (120700-0):3) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at iy.run(:com.google.android.gms.dynamite_measurementdynamite@204516084@20.45.16 (120700-0):5)
Added: implementation ‘com.google.firebase:firebase-analytics:18.0.0’ implementation ‘com.google.android.gms:play-services-basement:17.5.0’
It doesn’t seem to help.
On the bright side the app seems to function on most devices testing it.
Make sure to have this line in your MainActivity file " GeneratedPluginRegistrant.registerWith(flutterEngine);"
For example
Same for me with emulator Android 8.0 x86, not tested in real device yet:
@vkryachko Thanks for update. The fix you recommend has been mentioned before and seems to work for some people but not for others (as evidenced by several comments above). I fall into the latter category. Good to hear the true fix is being worked on.
Same here
Yeah, maybe you are right. I have opened a new issue as you see. I am not that expectant of a quick fix to this as it appears to only impact debugging, but 6 months without an update is a bit ridiculous.
It looks like my previous solution works for one build; if I stop and restart the app, the errors start pouring in again. I need to do a cleanup and start all over to make them go away.
No,it doesn´t, im having problems not reporting screens names.
This issue came up for me too. But I did the following:
dependencies { // Remove the Fabric Crashlytics SDK. implementation ‘com.crashlytics.sdk.android:crashlytics:2.10.1’
// Add the Firebase Crashlytics SDK. implementation ‘com.google.firebase:firebase-crashlytics:17.2.2’
// Recommended: Add the Google Analytics SDK. implementation ‘com.google.firebase:firebase-analytics:17.6.0’ }
This is from crashlytics upgrade guide. Apparently analytics is not just “optional”
Sa
Same issue. Happens immediately after gradle dependency is added. I commented out all my Admob code yet keeps showing.
Exactly the same after changing from:
implementation ‘com.google.android.gms:play-services-ads:19.3.0’
to
implementation ‘com.google.android.gms:play-services-ads:19.4.0’
SOLUTION: Firebase is really a headache sometimes on some virtual machines too. **Try implementing on the dependencies: implementation ‘com.google.android.gms:play-services-basement:17.4.0’ **
Reason behind this solution: **Firebase only tries to update on real time if you’ve implemented analytics, crashalytics, admob, tests labs. our build.gradle needs to sync step by step, but sometimes it does not (Depending on your machine) and we need a basement service so firebase needs where to begin.
Hope I was clear enough 😃) **
I have the same problem on simulator and on real device OnePlus6
2020-12-23 09:13:34.178 12401-12550/app.greenmob.mobile V/FA: Inactivity, disconnecting from the service 2020-12-23 09:13:34.179 12401-12550/app.greenmob.mobile W/ConnectionTracker: Exception thrown while unbinding java.lang.IllegalArgumentException: Service not registered: lu@e0d0705 at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1766) at android.app.ContextImpl.unbindService(ContextImpl.java:1810) at android.content.ContextWrapper.unbindService(ContextWrapper.java:741) at ci.f(:com.google.android.gms.dynamite_measurementdynamite@204516081@20.45.16 (120400-0):1) at ci.d(:com.google.android.gms.dynamite_measurementdynamite@204516081@20.45.16 (120400-0):2) at lv.E(:com.google.android.gms.dynamite_measurementdynamite@204516081@20.45.16 (120400-0):9) at lf.a(:com.google.android.gms.dynamite_measurementdynamite@204516081@20.45.16 (120400-0):3) at ef.run(:com.google.android.gms.dynamite_measurementdynamite@204516081@20.45.16 (120400-0):3) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) at java.util.concurrent.FutureTask.run(FutureTask.java:266)
It’s also happened to me for only certain devices. Thanks for update, can’t wait till February 👍
It’s just a warning, doesn’t crash the app.
This is very frustrating and it makes going debugging a pain in the ass.
I’ve started filter debug console with “!W/”. At least it hides all these bullshit useless messages, so I can read my logs.
yes only firebase-bom in dependencies
implementation platform('com.google.firebase:firebase-bom:26.1.0')
I’m using Flutter and this seems to work for me https://firebase.google.com/docs/android/setup#add-sdks
This WORKS for me as well. Thank you!
Maybe related? https://stackoverflow.com/questions/64820697/how-to-fix-exception-thrown-while-unbinding-java-lang-illegalargumentexception
no firebase analystics works fine
In my case users having those errors are not getting ads from Admob, so yes this is a major issue
What is the effect of this issue? Because silent those errors does not solve the problem. What we are facing with?
Same issue.
I was remove com.google.android.gms:play-services-base and problem solved.