Admob No fill from ad server - failed to load ad: 3

74,040

Solution 1

If you create adunit and use it immediately may show this error, try to load ads after 30 minutes or more time.

Solution 2

The issues comes only if that particular app is suspended from playstore. Maybe you can try changing the package name and and also with new Admob Id.There is a chance that particular admob id can also be suspended due to compliances.

Solution 3

You need to use ID that Google provide for you for current test device. You can find it in logcat, just find something like this:

Ads: Use AdRequest.Builder.addTestDevice("903A70A3D439E256BAED43E65A79928E") to get test ads on this device.

Solution 4

it's also possible to luck of inventory. I am also face because of of this. failed to load ad : 3

Solution 5

In my case I found that my billing address was not verified and ads were blocked. Verify billing address it will automatically get fixed. https://www.google.com/adsense/

Share:
74,040
Admin
Author by

Admin

Updated on January 11, 2021

Comments

  • Admin
    Admin over 3 years

    My issue is that ads are not being displayed at all in my app, test mode or not. I am going to keep this question specific to test mode, and once I get that working I will worry about live ads.

    Development Information

    I am using Eclipse for development.

    I have setup ads using Google Play Services and Admob in my Android app, as described in the online documentation provided by Google.

    I have added my device ID using addTestDevice("xxxxxxxxxxxxxxxx"), and have checked the hashed device ID a number of times to be sure it is correct.

    The Issue (see below for log info)

    When I run the application on my device, no ads are displayed at all. This happens even when I have added my device as a test device.

    I have searched high and low, and turned up many similar issues, but am yet to find an answer to this specific problem.

    LogCat Output

    10-28 13:56:41.659: I/Ads(1704): Starting ad request.
    10-28 13:56:42.187: I/Ads(1704): No fill from ad server.
    10-28 13:56:42.187: W/Ads(1704): Failed to load ad: 3
    10-28 13:56:42.199: W/Ads(1704): No GMSG handler found for GMSG: gmsg://mobileads.google.com/jsLoaded?google.afma.Notify_dt=1414504602197
    

    My Activity

       package bb.hoppingbird;
    
        import org.cocos2d.layers.CCScene;
        import org.cocos2d.nodes.CCDirector;
        import org.cocos2d.opengl.CCGLSurfaceView;
    
        import com.google.android.gms.ads.AdListener;
        import com.google.android.gms.ads.AdRequest;
        import com.google.android.gms.ads.AdSize;
        import com.google.android.gms.ads.AdView;
        import com.google.android.gms.ads.InterstitialAd;
    
        import android.app.Activity;
        import android.content.SharedPreferences;
        import android.media.MediaPlayer;
        import android.os.Bundle;
        import android.support.v4.view.ViewPager.LayoutParams;
        import android.util.DisplayMetrics;
        import android.view.KeyEvent;
        import android.widget.RelativeLayout;
        import android.widget.Toast;
    
        public class MainActivity extends Activity {
    
        private CCGLSurfaceView mGLSurfaceView;
    
        //<!-- Admob Ads Using Google Play Services SDK -->
        private static final String AD_UNIT_ID = "ca-app-pub-xxxxxxxxxxxxxxxxxxxx";
        private static final String AD_INTERSTITIAL_UNIT_ID = "ca-app-pub-xxxxxxxxxxxxxxxxxxxx";
    
    
        /** The Admob ad. */
        private InterstitialAd interstitialAd = null;
        public AdView adView = null;
    
        public static MainActivity app;
    
        public void onCreate(Bundle savedInstanceState)
        {
            app = this;
    
            super.onCreate(savedInstanceState);
    
            // set view
            mGLSurfaceView = new CCGLSurfaceView(this);
    
    
            //Ads ----------------
            // Create the adView
            RelativeLayout layout = new RelativeLayout(this);
            layout.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
    
            //<!-- Ads Using Google Play Services SDK -->
            adView = new AdView(this);
            adView.setAdSize(AdSize.SMART_BANNER);
            adView.setAdUnitId(AD_UNIT_ID);
    
            // Add the adView to it
            RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(
                    LayoutParams.WRAP_CONTENT,
                    LayoutParams.WRAP_CONTENT);
            params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
            params.addRule(RelativeLayout.CENTER_HORIZONTAL, RelativeLayout.TRUE);
    
            adView.setLayoutParams(params);
    
            layout.addView(mGLSurfaceView);
            layout.addView(adView);
    
            setContentView(layout);
            //New AdRequest 
            AdRequest adRequest = new AdRequest.Builder()
            .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
            .addTestDevice("0D47C6944503F0284666D16BB79BF684")
            .build();
    
        // Start loading the ad in the background.
        adView.loadAd(adRequest);
    
    
            //-----------------------------------------------------Interstitial Add
            // Create an Interstitial ad.
            interstitialAd = new InterstitialAd(this);
            interstitialAd.setAdUnitId(AD_INTERSTITIAL_UNIT_ID);
            interstitialAd.setAdListener(new AdListener() {
                  @Override
                  public void onAdLoaded() {
                    interstitialAd.show();
                  }
    
                  @Override
                  public void onAdFailedToLoad(int errorCode) {
                      Toast.makeText(getApplicationContext(), "Interstitial Ads loading failed", Toast.LENGTH_SHORT).show();
                  }
            });
             // Load the interstitial ad.
            //showInterstitialAds();
    
            //----------------------
            // set director
            CCDirector director = CCDirector.sharedDirector();
            director.attachInView(mGLSurfaceView);
            director.setAnimationInterval(1/60);
    
            // get display info
            DisplayMetrics displayMetrics = new DisplayMetrics();
            getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
            G.display_w = displayMetrics.widthPixels;
            G.display_h = displayMetrics.heightPixels;
            G.scale = Math.max(G.display_w/1280.0f, G.display_h/800.0f);
            G.width = G.display_w / G.scale;
            G.height = G.display_h / G.scale;
    
            // get data
            SharedPreferences sp = CCDirector.sharedDirector().getActivity().getSharedPreferences("GameInfo", 0);
            G.music = sp.getBoolean("music", true);
            G.sound = sp.getBoolean("sound", true);
    
            // create sound
            G.soundMenu = MediaPlayer.create(this, R.raw.menu);
            G.soundMenu.setLooping(true);
            G.soundGame = MediaPlayer.create(this, R.raw.game);
            G.soundGame.setLooping(true);
            G.soundCollide = MediaPlayer.create(this, R.raw.collide);
            G.soundJump = MediaPlayer.create(this, R.raw.jump);
            G.soundLongJump = MediaPlayer.create(this, R.raw.long_jump);
            G.soundSpeedDown = MediaPlayer.create(this, R.raw.speed_down);
            G.soundSpeedUp = MediaPlayer.create(this, R.raw.speed_up);
            G.soundDirection = MediaPlayer.create(this, R.raw.direction_sign);
            G.soundClick = MediaPlayer.create(this, R.raw.menu_click);
            G.soundCollect = MediaPlayer.create(this, R.raw.collect);
            G.bgSound = G.soundMenu;
    
            // show menu
            CCScene scene = CCScene.node();
            scene.addChild(new MenuLayer(true));
            director.runWithScene(scene);
        }  
    
        @Override
        public void onPause()
        {
            if (adView != null) {
                  adView.pause();
                }
    
            super.onPause();
            G.bgSound.pause();
            CCDirector.sharedDirector().onPause();
        }
    
        @Override
        public void onResume()
        {
            super.onResume();
    
            if (adView != null) {
                adView.resume();
              }
    
            if( G.music ) G.bgSound.start();
    
            CCDirector.sharedDirector().onResume();
        }
    
        @Override
        public void onDestroy()
        {
            // Destroy the AdView.
            if (adView != null) {
              adView.destroy();
            }
    
            super.onDestroy();
            G.bgSound.pause();
            CCDirector.sharedDirector().end();
        }
    
        @Override
        public boolean onKeyDown(int keyCode, KeyEvent event)
        {
            if( keyCode == KeyEvent.KEYCODE_BACK )
            {
                CCDirector.sharedDirector().onKeyDown(event);
                return true;
            }
            return super.onKeyDown(keyCode, event);
        }
    
        public void showInterstitialAds()
        {
            runOnUiThread(new Runnable() {
                public void run() {
                     AdRequest interstitialAdRequest = new AdRequest.Builder().build();
                     interstitialAd.loadAd(interstitialAdRequest);
                }
            });
        }
    }
    
  • Ayaz Alifov
    Ayaz Alifov over 9 years
    I agree with this answer, just rename your package, it will work 100%.
  • mboy
    mboy over 9 years
    I just encountered this today. My app was suspended.. Change also the app name - <string name="app_name">TestApp</string>
  • Damnum
    Damnum almost 9 years
    This is wrong. The reason might be that the app is suspended, but there are other possible reasons. For instance, creating another app unit in the admob interface might help.
  • John Ashmore
    John Ashmore almost 9 years
    Unfortunately "The issues comes only if that particular app is suspended from playstore." is not true. My app and admob account are fine, in fact ~37% of customers are receiving ads. This was sudden, overnight, down from ~100% without even updating my app on the Google Play. My 2 test devices however are not displaying the ads and are getting the code 3 error also.
  • Suresh Kerai
    Suresh Kerai over 6 years
    my app not suspended still i am facing same issue. so i think suspended is not reason for this error.
  • Asad Mukhtar
    Asad Mukhtar about 6 years
    I created my banner ad and also verify my payment information, and after 2 days i test my ad and it gives me the error that Error code 3 No add fill from the server...
  • Diljeet
    Diljeet almost 6 years
    @AsadMukhtar Hi, I am having the same issue, i created the banner ad and also have everything verified and after 2 days i am not getting ads(no ads not even test ads are showing). Same msg "Error code 3 No add fill from the server" could you please _/\_ HELP? What happened in your case?, how did you solve it? or was this temporary?
  • Mateusz Kaflowski
    Mateusz Kaflowski almost 6 years
    How to fix that on emulators?
  • Smeet
    Smeet over 5 years
    @JohnAshmore Same thing is happening with me, is there any work around for that ? How did you solve this ?
  • 3c71
    3c71 about 5 years
    Same issue, but noticed it only worked ok depending on device/screen orientation! Pixel 3 landscape OK, portrait KO. Then on Doogee, landscape KO, portrait OK !? Using smartbanner or banner makes very little difference.
  • user1978019
    user1978019 over 3 years
    This looks like what is happening for me as well. The test ad units display. I had a previous app with this gmail address that never hit the payout threshold. I don't remember it being adsense, but maybe it was? The new one that I am currently using is admob, and those ads are reliably getting "failed to load code 3". At my adsense home page it says "Your ad units are not displaying because you haven't yet verified your address (PIN)." Going to try resending the PIN.
  • caw
    caw over 3 years
    It may even take a few hours (with new ad units, or perhaps even a new AdMob app).