I am facing a bug with my latest app for Android. I am using latest Google Play Services v. 4 and think that it is the culprit for the following error I get on some phones. I get many reports for this kind of errors : IllegalArgumentException (@LoadedApk:forgetServiceDispatcher:888) {AdWorker #2}
The error details from reports from users are those :
java.lang.IllegalArgumentException: Service not registered: ano@407dc868
at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:891)
at android.app.ContextImpl.unbindService(ContextImpl.java:906)
at android.content.ContextWrapper.unbindService(ContextWrapper.java:352)
at ta.a(SourceFile:135)
at qc.d(SourceFile:88)
at qc.b(SourceFile:129)
at pz.a(SourceFile:239)
at pz.a(SourceFile:176)
at wd.a(SourceFile:112)
at xf.run(SourceFile:14)
at xh.run(SourceFile:30)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
at java.lang.Thread.run(Thread.java:1019)
I can't understand what goes wrong, since my app does not use any services at all except for the google play services.
Any ideas?
After a lot of experimentation I think that I finally found the solution. The culprit seems to be Admob and more specifically Interstitial ads from latest Admob library on Google Play Services.
I had one Interstitial ad to show up when user was leaving the application. I had another one to show up when he was leaving one specific Activity. That caused the error. On the first case application was closing and the Interstitial was still working to load the ad and that was causing the error. On the other case activity was closing and ad was still loading and that was causing problems on some phones.
Solution : I moved all Interestitial ad loading or showing when activity starts and now everything works fine. Ofcourse I removed the ad showing when user exits the app.
Hope that helps, it took me two days to figure it out!
Seems like this is introduced by firebase-core
package version 20+. However, this doesn't seem like an actual issue or a crash. With this also the app keeps working fine both in debug and release mode. For now there is no fix for it except to live with it or to downgrade the version to belo 20.
More discussions on this github page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With