403 error when trying to show banner ads

486 views
Skip to first unread message

Rutger

unread,
Aug 23, 2017, 10:31:23 AM8/23/17
to Google Mobile Ads SDK Developers
Hello,

Tried several times with different ways of installing to get banner ads to show up in my Unity app.
The test ad shows up when I add my device as test device. But when not setting as test device I get no ads showing and the following output in logcat:

08-23 16:15:59.703: D/AdsUnity(30814): Calling loadAd() on Android
08-23 16:15:59.833: I/Ads(30814): Starting ad request.
08-23 16:15:59.836: I/Ads(30814): Use AdRequest.Builder.addTestDevice("4AE9389FC691ED8783A760A7ED29881E") to get test ads on this device.
08-23 16:16:00.083: W/Ads(22314): App does not have the required permissions to get location
08-23 16:16:01.463: W/Ads(22314): Received error HTTP response code: 403
08-23 16:16:01.498: W/Ads(30814): There was a problem getting an ad response. ErrorCode: 0
08-23 16:16:01.503: W/Ads(30814): Failed to load ad: 0

I'm using:
Unity 5.4.0f3
play-services-ads-11.0.4 (although tried with other versions)
and latest version of GoogleMobileAds

AppId: ca-app-pub-5883972330330394~8130757533
Banner Ad Id: ca-app-pub-5883972330330394/7395248605

As far as I know I have the billing information correctly set up. Several days ago already.

I let someone else, on a different network and different device, test it. And they also don't get ads to show up. (Haven't gotten their logcat output though).

I really hope anyone can shed some light on this. I've been trying to get it to work for days. Reading many many guides/forum posts/issues.

Rutger

unread,
Aug 23, 2017, 10:58:59 AM8/23/17
to Google Mobile Ads SDK Developers
I tried the bannerexample Android project.
Which worked. And showed test ads.
After which I put in my own ids (app and banner). And, even though an error showed up in logcat:

08-23 16:53:17.213: E/Ads(4901): JS: Uncaught undefined (https://pagead2.googlesyndication.com/pagead/js/r20170817/r20110914/abg.js:1)

It (seemed to) work.
Hope this sheds some light on the cause of my issue.

Deepika Uragayala- MobileAds SDK team

unread,
Aug 23, 2017, 3:24:13 PM8/23/17
to Google Mobile Ads SDK Developers
Hi Rutger,

Thanks for sending us all the details. I was able to load ads using your Ad Unit ID with our Unity sample app without any issues. Can you try with our sample apps and then let us know again? Usually Error Code 0 is seen for a newly created Ad Unit ID. Also see if you can test with our Ad Unit ID and able to load test ads.

Also, JS: Uncaught undefined would not impact the ads from being served and you can safely ignore this log.

Regards,
Deepika Uragayala
Mobile Ads SDK Team

Rutger

unread,
Aug 24, 2017, 2:14:35 AM8/24/17
to Google Mobile Ads SDK Developers
Hi Deepika,

This works. It also works when I use my own appid and ad ids.
It however gives a warning (in logcat) about not integrating with FireBase. After adding the firebase analytics unity package. (with google-services.json etc), I get the same 403 and error code 0 errors.

Please advice.

Regards,
Rutger

Rutger

unread,
Aug 24, 2017, 2:25:16 AM8/24/17
to Google Mobile Ads SDK Developers
BTW adding the firebase package and google-services.json file also made it so I had to change the packagename to the one from the app I actually want to make work. So this may have something to do with that too.
I will try to narrow this down.
Altho maybe you already have enough information? ;-)

Rutger

unread,
Aug 24, 2017, 2:37:18 AM8/24/17
to Google Mobile Ads SDK Developers
When using my own packagename/bundle identifier and only having the GoogleMobileAds package added (so no FireBase), I have no ads showing up and when requesting an ad get the following warnings:

08-24 08:32:23.030: W/Ads(12251): Invoke Firebase method getInstance error.
08-24 08:32:23.030: W/Ads(12251): java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.measurement.AppMeasurement" on path: DexPathList[[zip file "/data/app/com.criticalbit.fightingtrainer-2/base.apk"],nativeLibraryDirectories=[/data/app/com.criticalbit.fightingtrainer-2/lib/arm, /data/app/com.criticalbit.fightingtrainer-2/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
08-24 08:32:23.030: W/Ads(12251): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
08-24 08:32:23.030: W/Ads(12251): at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
08-24 08:32:23.030: W/Ads(12251): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
08-24 08:32:23.030: W/Ads(12251): at com.google.android.gms.ads.internal.scionintegration.b.a(:com.google.android.gms.DynamiteModulesA:167)
08-24 08:32:23.030: W/Ads(12251): at com.google.android.gms.ads.internal.scionintegration.b.a(:com.google.android.gms.DynamiteModulesA:152)
08-24 08:32:23.030: W/Ads(12251): at com.google.android.gms.ads.internal.scionintegration.b.g(:com.google.android.gms.DynamiteModulesA:43)
08-24 08:32:23.030: W/Ads(12251): at com.google.android.gms.ads.internal.request.c.a(:com.google.android.gms.DynamiteModulesA:26)
08-24 08:32:23.030: W/Ads(12251): at com.google.android.gms.ads.internal.util.b.run(:com.google.android.gms.DynamiteModulesA:4)
08-24 08:32:23.030: W/Ads(12251): at com.google.android.gms.ads.internal.util.af.call(:com.google.android.gms.DynamiteModulesA:3)
08-24 08:32:23.030: W/Ads(12251): at com.google.android.gms.ads.internal.util.ag.run(:com.google.android.gms.DynamiteModulesA:3)
08-24 08:32:23.030: W/Ads(12251): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
08-24 08:32:23.030: W/Ads(12251): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
08-24 08:32:23.030: W/Ads(12251): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
08-24 08:32:23.030: W/Ads(12251): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
08-24 08:32:23.030: W/Ads(12251): at java.lang.Thread.run(Thread.java:761)
08-24 08:32:23.030: W/Ads(12251): 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
08-24 08:32:23.397: W/Ads(22314): Received error HTTP response code: 403
08-24 08:32:23.430: W/Ads(12251): There was a problem getting an ad response. ErrorCode: 0
08-24 08:32:23.438: W/Ads(12251): Failed to load ad: 0

So, the warnings about Firebase. But also the same ad errors.

Hope this helps to narrow down what's causing these issues.

Regards,
Rutger

P.S. Is there a way to edit a post? Instead of making new ones.

Deepika Uragayala- MobileAds SDK team

unread,
Aug 24, 2017, 3:12:10 PM8/24/17
to Google Mobile Ads SDK Developers
Hi Rutger,

If you are able to load ads with a different package name and not with your old package name, then that is a serving issue. I would suggest that you contact our AdMob Product Support team who can help you better with this issue. Do send them your Package name and your Ad Unit Ids and they will get back to you.

Regards,
Deepika Uragayala
Mobile Ads SDK Team

Reply all
Reply to author
Forward
0 new messages