Ads always failed with error code 0

351 views
Skip to first unread message

Hana

unread,
Oct 1, 2017, 11:14:36 AM10/1/17
to Google Mobile Ads SDK Developers
Hello all,

I'm encountering a problem with showing ads. For all interstitial ads id I tried for my all, even with the old one works on other application, always failed as below logs:

10-01 21:59:19.617 1206-1206/com.xxx.xxxxxxxxx I/Ads: Starting ad request.
10-01 21:59:19.617 1206-1206/com.xxx.xxxxxxxxx I/Ads: Use AdRequest.Builder.addTestDevice("8D20391A1103F19AE271877114938E0C") to get test ads on this device.
10-01 21:59:19.697 1206-2391/com.xxx.xxxxxxxxx W/Ads: Invoke Firebase method getInstance error.
                                                              java
.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.measurement.AppMeasurement" on path: DexPathList[[zip file "/data/app/com.xxx.xxxxxxxxx-1/base.apk", zip file "/data/app/com.xxx.xxxxxxxxx-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.xxx.xxxxxxxxx-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.xxx.xxxxxxxxx-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.xxx.xxxxxxxxx-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.xxx.xxxxxxxxx-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.xxx.xxxxxxxxx-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.xxx.xxxxxxxxx-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.xxx.xxxxxxxxx-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.xxx.xxxxxxxxx-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.xxx.xxxxxxxxx-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.xxx.xxxxxxxxx-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.xxx.xxxxxxxxx-1/lib/arm, /vendor/lib, /system/lib]]
                                                                  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                                                                  at com.google.android.gms.ads.internal.scionintegration.b.a(:com.google.android.gms.DynamiteModulesA@11517436:167)
                                                                  at com.google.android.gms.ads.internal.scionintegration.b.a(:com.google.android.gms.DynamiteModulesA@11517436:152)
                                                                  at com.google.android.gms.ads.internal.scionintegration.b.g(:com.google.android.gms.DynamiteModulesA@11517436:43)
                                                                  at com.google.android.gms.ads.internal.request.c.a(:com.google.android.gms.DynamiteModulesA@11517436:47)
                                                                  at com.google.android.gms.ads.internal.util.b.run(:com.google.android.gms.DynamiteModulesA@11517436:4)
                                                                  at com.google.android.gms.ads.internal.util.af.call(:com.google.android.gms.DynamiteModulesA@11517436:3)
                                                                  at com.google.android.gms.ads.internal.util.ag.run(:com.google.android.gms.DynamiteModulesA@11517436:3)
                                                                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                                  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                  at java.lang.Thread.run(Thread.java:818)
                                                              Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.measurement.AppMeasurement
                                                                  at java.lang.Class.classForName(Native Method)
                                                                  at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
                                                                  at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                                                                  ... 13 more
                                                               Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
10-01 21:59:19.697 1206-2391/com.xxx.xxxxxxxxx W/Ads: The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firbase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
10-01 21:59:22.947 1206-1218/com.xxx.xxxxxxxxx W/Ads: There was a problem getting an ad response. ErrorCode: 0
10-01 21:59:22.967 1206-1206/com.xxx.xxxxxxxxx W/Ads: Failed to load ad: 0

In build.gradle, I'm using 
compile 'com.google.android.gms:play-services-ads:11.2.2'

Please help me to fix this issue. If you have any question, let me know.

Ashraf Alshahawy

unread,
Oct 1, 2017, 11:41:45 AM10/1/17
to Google Mobile Ads SDK Developers

Hana

unread,
Oct 1, 2017, 11:57:39 AM10/1/17
to Google Mobile Ads SDK Developers
Yes, it works with interstitial test ad id: 
ca-app-pub-3940256099942544/1033173712

But I'm not sure. I used another ad id which works on my old app, but with current app it is still failed. Do you know why? 

Ashraf Alshahawy

unread,
Oct 1, 2017, 12:10:18 PM10/1/17
to Google Mobile Ads SDK Developers
I'm not sure why, but I could guess that your old app uses an old version of AdMob SDK which doesn't cause this warning (Maybe because it doesn't related to Firebase SDK), while your new app uses one of AdMob latest SDKs that produces this warning.

I hope AdMob technical team can enlighten us more about this issue.

Hana

unread,
Oct 1, 2017, 12:10:31 PM10/1/17
to Google Mobile Ads SDK Developers
Do these warning cause ad load failed?

Hana

unread,
Oct 1, 2017, 12:12:44 PM10/1/17
to Google Mobile Ads SDK Developers
They uses same: 'com.google.android.gms:play-services-ads:11.2.2'

Ashraf Alshahawy

unread,
Oct 1, 2017, 12:13:00 PM10/1/17
to Google Mobile Ads SDK Developers
Based on my tests/ experiments, it doesn't cause ad load fail with real ads

Hana

unread,
Oct 1, 2017, 12:29:03 PM10/1/17
to Google Mobile Ads SDK Developers
That's why I created this topic. Do you need any information to help me find out why? The most suspicious thing as I guess is above warnings. But it seems not the root cause, as you said.

Hana

unread,
Oct 1, 2017, 1:16:49 PM10/1/17
to Google Mobile Ads SDK Developers
My app have not published yet. FYI. But I think it's not related, Ad can shows normally in app either it published or not. 

Ivan Bautista (Mobile Ads SDK Team)

unread,
Oct 2, 2017, 3:54:49 AM10/2/17
to Google Mobile Ads SDK Developers
Hi everyone,

Thank you for doing extra investigative work and for sharing your findings. The ClassNotFoundException stack traces for AppMeasurement shouldn't affect ad serving in any way nor result to Error Code: 0. As mentioned in this post you referred to earlier, those log spam will be cleaned up in a future release. We can't give you a definite timeline but we will let you know once we get an official feedback about the release.

Hi Hana, 

With regards to the Error Code: 0 you encountered, since you mentioned that it is only reproducible in your current app while Ad Ids are working in your old app, then there might be something in your current app that is causing the error. For us to further check on our end, would you be able to share with us privately the Ad Unit Id/s in question as well as other helpful information? I will send to you a private email where you can respond privately with the requested information.

Regards,
Ivan Bautista
Mobile Ads SDK Team

Asad Mukhtar

unread,
Jun 16, 2018, 4:24:04 PM6/16/18
to Google Mobile Ads SDK Developers
kindly you can help me, i created my account new and even  i setup my payments settings and after that my app is on play store but i just update my app with new ad ids and after that i `m getting error code 0 even i updated my app i release the app update and waiting long till 2 to 3 days but ads were not showing. kindly help me.

mobileadssdk-a...@google.com

unread,
Jun 18, 2018, 12:12:53 AM6/18/18
to Asad Mukhtar, Google Mobile Ads SDK Developers
Hi Asad,

It is indeed expected that ads will fail to load for newly created Ad Unit Ids, however, it usually just takes a few hours for ads to start serving.

That said, could you try loading the sample Ad Unit Ids in your app and see if you get the same error? Also, could you test your Ad Unit Ids in question with our sample apps and see if it will throw the same error?

However, given that this is an old thread, could you create a new thread to share your new findings and we'll continue our investigation from there?

Regards,
Ivan Bautista
Mobile Ads SDK Team
Reply all
Reply to author
Forward
0 new messages