failed to load ad : 3

MHogge picture MHogge · Nov 6, 2015 · Viewed 130.4k times · Source

I'm setting an ad to my Android application using DoubleClick and can't manage to show the final ad, can someone help me?

When I test an ad by adding ".addTestDevice("xxx...")" I get the test ad but when I remove this line I get the following error :

W/Ads: No fill from ad server

W/Ads: Failed to load ad: 3

I set my ad like this :

PublisherAdRequest adRequest = new PublisherAdRequest.Builder().build();
mPublisherAdView.loadAd(adRequest);

And my publisherView look like this :

    <com.google.android.gms.ads.doubleclick.PublisherAdView
        android:id="@+id/pronostics_ad"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"

        android:layout_gravity="center"

        ads:adSize="BANNER"
        ads:adUnitId="@string/ad_unit_pronostic">
    </com.google.android.gms.ads.doubleclick.PublisherAdView>

What could be wrong?

Thank's in advance for your answers.

Answer

blizzard picture blizzard · Nov 14, 2015

W/Ads: Failed to load ad: 3

As per the Documentation you are getting the following error code:

public static final int ERROR_CODE_NO_FILL

The ad request was successful, but no ad was returned due to lack of ad inventory.

Constant Value: 3

Based on the post onFailedToReceiveAd - Ad request successful, but no ad returned due to lack of ad inventory when using admob with adwhirl:

If you are getting this error, then your code is correct. The issue is that AdMob does not always have an ad to return for every request. This may happen particularly if you have just registered your AdMob publisher ID, as it takes some time and multiple requests before the new ID starts returning ads.

Another reason your fill rate may be low is that you don't have AdSense backfill enabled, or you have filtered out some ads. Check your app settings to see if that is the case.