Error: invalid response was received from the ad server

750 views
Skip to first unread message

Robert Gomez

unread,
Sep 27, 2018, 7:13:47 PM9/27/18
to google-adm...@googlegroups.com
Hi,

I have an Android App with a Smart Banner and an InterstitialAd.

I implemented the setAdListener to know what is happening because the ads are not showing.


I always receive this message:
  • ERROR_CODE_INTERNAL_ERROR - Something happened internally; for instance, an invalid response was received from the ad server.
The question is why?, the first 2 days with AdMob, the ads was showing correctly but now, there are not showing any.

My code is:

MainActivity
MobileAds.initialize(this, getResources().getString(R.string.admob_app_id));

SecondActivity
// AdMob Banner
AdView adView = findViewById(R.id.adView);
adView.loadAd(new AdRequest.Builder().build());

<com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin"
ads:adSize="SMART_BANNER"
ads:adUnitId="@string/admob_ad_unit_id_banner" />

ThirdActivity
// AdMob Interstitial
mInterstitialAd = new InterstitialAd(context);
mInterstitialAd.setAdUnitId(context.getString(R.string.admob_ad_unit_id_interstitial));
loadAd();

mInterstitialAd.setAdListener(new AdListener() {
@Override
public void onAdClosed() {
loadAd();
// Do stuff....
}
});

private void loadAd() {
// Request a new ad if one isn't already loaded
if (!mInterstitialAd.isLoading() && !mInterstitialAd.isLoaded()) {
mInterstitialAd.loadAd(new AdRequest.Builder().build());
}
}

Gradle
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

// AdMob
implementation 'com.google.android.gms:play-services-ads:15.0.1'
}

AndroidManifest
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="@string/admob_app_id"/>
</application>

----------
W/Ads: There was a problem getting an ad response. ErrorCode: 0
W/Ads: Failed to load ad: 0
----------

Any clue about what is the issue?

mobileadssdk-a...@google.com

unread,
Sep 28, 2018, 12:36:08 AM9/28/18
to Robert Gomez, Google Mobile Ads SDK Developers
Hi Robert,

Thank you for sharing your code snippets as well as other helpful information.

There's nothing out of the ordinary with your code snippets so it should work accordingly given that you mentioned that it was working few days before. That said, this might be related to a recent issue that the team is actively working on. The issue is being prioritized by the team and mostly affects Android O & P devices.

For us to confirm, could you provide to us the following information?
  • Could you confirm from which devices do you encounter the Error Code 0?
  • Complete device logs from the time the Ad Request was sent until the Error Code 0 was thrown
  • If possible, the Charles session (here are setup instructions) from the time the Ad Request was sent until the Error Code 0 was thrown. You may share this with us privately using Reply privately to author option.
Regards,
Ivan Bautista
Mobile Ads SDK Team



Any clue about what is the issue?

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/12a66f27-1972-4d16-9a46-93288bc79eae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Gomez

unread,
Sep 28, 2018, 12:27:10 PM9/28/18
to google-adm...@googlegroups.com
Hi,

1. Samsung Galaxy S7 (Android Oreo 8.0)

2. Device logs:

2018-09-28 12:17:25.013 28444-28444/*****PackageName***** I/Ads: Starting ad request.
2018-09-28 12:17:25.013 28444-28444/*****PackageName***** I/Ads: SDK version: afma-sdk-a-v13280021.12451000.1
2018-09-28 12:17:25.014 28444-28444/*****PackageName***** I/Ads: Use AdRequest.Builder.addTestDevice("C4855B8372E18C59B6E74453712FB11A") to get test ads on this device.
2018-09-28 12:17:25.059 28444-28444/*****PackageName***** I/Ads: Starting ad request.
2018-09-28 12:17:25.059 28444-28444/*****PackageName***** I/Ads: SDK version: afma-sdk-a-v13280021.12451000.1
2018-09-28 12:17:25.060 28444-28444/*****PackageName***** I/Ads: Use AdRequest.Builder.addTestDevice("C4855B8372E18C59B6E74453712FB11A") to get test ads on this device.
2018-09-28 12:17:25.063 28444-28444/*****PackageName***** W/Ads: Not retrying to fetch app settings
2018-09-28 12:17:25.256 4446-4446/? W/Ads: #004 The webview is destroyed. Ignoring action.
2018-09-28 12:17:25.265 4446-4446/? W/Ads: #004 The webview is destroyed. Ignoring action.
2018-09-28 12:17:35.258 4446-6021/? E/Ads: Error waiting for future.
    java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException
        at com.google.android.gms.ads.internal.util.future.ae.get(:com.google.android.gms@1328...@13.2.80 (040408-211705629):11)
        at com.google.android.gms.ads.internal.util.future.g.a(:com.google.android.gms@13280021@13.2.80 (040408-211705629):13)
        at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@1328...@13.2.80 (040408-211705629):65)
        at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@1328...@13.2.80 (040408-211705629):198)
        at com.google.android.gms.ads.internal.request.service.f.run(:com.google.android.gms@1328...@13.2.80 (040408-211705629):1)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.util.concurrent.TimeoutException
        at com.google.android.gms.ads.internal.util.future.m.run(Unknown Source:2)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
2018-09-28 12:17:35.260 28444-28463/*****PackageName***** W/Ads: There was a problem getting an ad response. ErrorCode: 0
2018-09-28 12:17:35.261 28444-28444/*****PackageName***** W/Ads: Failed to load ad: 0
2018-09-28 12:17:35.267 4446-29567/? E/Ads: Error waiting for future.
    java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException
        at com.google.android.gms.ads.internal.util.future.ae.get(:com.google.android.gms@1328...@13.2.80 (040408-211705629):11)
        at com.google.android.gms.ads.internal.util.future.g.a(:com.google.android.gms@13280021@13.2.80 (040408-211705629):13)
        at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@1328...@13.2.80 (040408-211705629):65)
        at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms@1328...@13.2.80 (040408-211705629):198)
        at com.google.android.gms.ads.internal.request.service.f.run(:com.google.android.gms@1328...@13.2.80 (040408-211705629):1)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.util.concurrent.TimeoutException
        at com.google.android.gms.ads.internal.util.future.m.run(Unknown Source:2)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
2018-09-28 12:17:35.273 28444-28463/*****PackageName***** W/Ads: There was a problem getting an ad response. ErrorCode: 0
2018-09-28 12:17:35.274 28444-28444/*****PackageName***** W/Ads: Failed to load ad: 0

3. I have sent you the charles session privately.

Note:
Yesterday, running the App using the Android Emulator, the ads showed with a title at the top saying "Test Ads" but, today they are not appearing. I received the error:
ERROR_CODE_NO_FILL which means, according to the documentation: "The ad request was successful, but no ad was returned due to lack of ad inventory.". Well, I think this is not an error but, at least using the Emulator I should see an example banner (a Test Ad), just like I saw yesterday. It seems that the behavior of the things is changing.

mobileadssdk-a...@google.com

unread,
Sep 30, 2018, 11:44:42 PM9/30/18
to Robert Gomez, Google Mobile Ads SDK Developers
Hi Robert,

Thank you for getting back to us with the details requested and for sharing the Charles logs captured privately. Though the Charles logs provided wasn't able to capture the Ad Request and response properly, the information you provided for the device affected as well as the device logs is enough to confirm that this is related to a recent issue that the team is actively working on. 

The issue mostly affects Android O & P devices and this is being prioritized by the team. Rest assured that I will get back to this thread for any updates.

As for the No fill error you encountered when loading test ads in the Android emulator (which is automattically configured as a test device), if you are using your own live Ad Unit Id, then it is expected that you will sometimes get a No fill error when loading ads. However, you should not get a No fill error if you are using one of our sample Ad Unit Ids as these should load test ads consistently. Could you please confirm? If you are getting a No fill error using our sample Ad Unit Id, then it's best that you create a new thread for this and we'll continue our investigation from there.

Regards,
Ivan Bautista
Mobile Ads SDK Team


Note:
Yesterday, running the App using the Android Emulator, the ads showed with a title at the top saying "Test Ads" but, today they are not appearing. I received the error:
ERROR_CODE_NO_FILL which means, according to the documentation: "The ad request was successful, but no ad was returned due to lack of ad inventory.". Well, I think this is not an error but, at least using the Emulator I should see an example banner (a Test Ad), just like I saw yesterday. It seems that the behavior of the things is changing.

Robert Gomez

unread,
Oct 3, 2018, 10:07:20 AM10/3/18
to Google Mobile Ads SDK Developers
Hi,

How the team is going trying to fix the issue?

It seems weird to me that Admob didn't publish an article or an advice about the issue.

mobileadssdk-a...@google.com

unread,
Oct 4, 2018, 12:03:16 AM10/4/18
to Robert Gomez, Google Mobile Ads SDK Developers
Hi Robert,

The issue just recently manifested and is intermittent and it mostly affects Android O & P devices but not all devices. The fix related to this is already in place and the team is actively testing it, however, we don't have any definite timelines for the release. Rest assured that we will update this thread accordingly and other publishers who have raised this issue in the Google Mobile Ads SDK forum. Also, you may keep an eye on our Release Notes for any future updates in general.

Regards,
Ivan Bautista
Mobile Ads SDK Team



--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Robert Gomez

unread,
Oct 21, 2018, 9:33:09 AM10/21/18
to Google Mobile Ads SDK Developers
Hi,

I would like to let you know that yesterday I saw ads on my Android 8.0 phone but, today the ads disappeared again. The ads are not showing.

mobileadssdk-a...@google.com

unread,
Oct 22, 2018, 4:01:57 AM10/22/18
to Robert Gomez, Google Mobile Ads SDK Developers
Hi Robert,

Thank you for getting back to us on this.

Please note that a fix is already in place for this, however, we have no definite timelines on its release. Rest asurred that this is a high priority for the team. That said, I'll keep you posted for any updates.

Regards,
Ivan Bautista
Mobile Ads SDK Team



On 10/21/18 21:33:09 rrg...@gmail.com wrote:
Hi,

I would like to let you know that yesterday I saw ads on my Android 8.0 phone but, today the ads disappeared again. The ads are not showing.

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Yuriy Bagryanskiy

unread,
Oct 23, 2018, 12:10:30 PM10/23/18
to Google Mobile Ads SDK Developers
Hello! I have exactly the same problem on Samsung Galaxy S7 (Android 8.0.0) device only. All other devices and emulators works well. Different apps, assigned to different AdMob accounts, different versions of "play-services-ads" including the latest one, different network connections - doesn't matter - all ways don't show the ads on Samsung Galaxy S7.

Do you have any update when the fix will be released? Thanks!

mobileadssdk-a...@google.com

unread,
Oct 24, 2018, 3:19:13 AM10/24/18
to Yuriy Bagryanskiy, Google Mobile Ads SDK Developers
Hi Yuriy,

Thank you for testing this in different scenarios.

Since the Internal Error is only reproducible on your end in your Samsung Galaxy S7 (Android 8.0.0) device only and ads are loading in other devices, then this is most likely related to the recent issue that affects mostly Android O & P devices.

That said, we can't provide a definite date for the release of the fix nor from which version it will be included. However, rest assured that this is being highly prioritized by the team. Alternatively, you may keep an eye on our Release Notes for any future updates.

Regards,
Ivan Bautista
Mobile Ads SDK Team



On 10/24/18 00:10:30 yuriy.ba...@gmail.com wrote:
Hello! I have exactly the same problem on Samsung Galaxy S7 (Android 8.0.0) device only. All other devices and emulators works well. Different apps, assigned to different AdMob accounts, different versions of "play-services-ads" including the latest one, different network connections - doesn't matter - all ways don't show the ads on Samsung Galaxy S7.

Do you have any update when the fix will be released? Thanks!

On Monday, October 22, 2018 at 3:01:57 PM UTC+7, mobileadssdk-a...@google.com wrote:
Hi Robert,

Thank you for getting back to us on this.

Please note that a fix is already in place for this, however, we have no definite timelines on its release. Rest asurred that this is a high priority for the team. That said, I'll keep you posted for any updates.

Regards,
Ivan Bautista
Mobile Ads SDK Team




On 10/21/18 21:33:09 rrg...@gmail.com wrote:
Hi,

I would like to let you know that yesterday I saw ads on my Android 8.0 phone but, today the ads disappeared again. The ads are not showing.

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages