Search code examples
androidadmobadsbanner

Admob Banner ads fail to load, Error Code : 3 No fill


I've integrated admob Banner & Interstitial in my app. I've noticed that some of ads banner are fail to load. I've debug error code when ads fail to load, Error code is common Error : 3 It mean No fill error. I've added banner and Interstitial ads in 3-4 screens.
Now Issues is that just one screen banner id is running and all Interstitial are working fine but some of banner not working. (in notch screen).
When I've change all screens banner id with same which was running proper and all screens working fine for notch screen also.
I've tested this case in nougat, oreo, marshmello etc. Normal Screen and notch screen.
I just notice that some of devices running with notch screen are not load all ads. But all normal screens are working fine. So I can't getting exact issue.
Note: All devices are running with same wifi network when I am testing.
I don't know if any thing is wrong with other unit id. But all unit id have same settings in my admob account. As per my testing case something is wrong with my AdUnit id. But can't getting what's the issue is.
I noticed one more case. If I added Testing id in request then it also working. I got device hash from android log.

I/Ads: Use AdRequest.Builder.addTestDevice("XXXXXXXXXX") to get test ads on this device.
.addTestDevice("XXXXXXXXXX")


If any extra debugging technique there it admob account then please share with me so I can check in detail. Can any please help me to check this issue in detail? Please comment if any one need more explanation.


Solution

  • I've tried combination of devices running with different OS. Finally I got solution. I wrote this code when app was fail with error code 3 (No Fill Error)

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

    Now As per google sample code I've to use width with match_parent so I've changed width with match_parent still same error occurred. So finally I've change Size type with BANNER and now it run in all devices. (Google's demo code use BANNER type) I just tried this size and now all devices run ads banner. Not sure but as per my testing scenario ad was fail which device have large resolution (More than 16:9 ratio like 19:9 ratio 1080 x 2280 pixels) and After Set Banner size type as BANNER works fine with large resolution also.