Cordova - Admob cordova plugin error, black & blank ads

266 views
Skip to first unread message

Onur Demirtaş

unread,
Sep 1, 2016, 9:29:53 AM9/1/16
to Google Mobile Ads SDK Developers

Helo. I am using Admob cordova plugin to display ads in my ionic based app. However i am getting black blank banner and in android logcat i am getting this error: JS: Uncaught ReferenceError: AFMA_ReceiveMessage is not defined I googled and stackowerflowed it but couldn't find a solution. What can i do? I am sugin the plugin as it is explained in git repo. I think the problem is about sdk. Thanks.

my ionic ready code part looks like this:


.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
    // for form inputs)
    if (window.cordova && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
      cordova.plugins.Keyboard.disableScroll(true);

    }
    if (window.StatusBar) {
      // org.apache.cordova.statusbar required
      StatusBar.styleDefault();
    }

     window.plugins.AdMob.setOptions( {
          publisherId: 'ca-app-pub-*****/*****',
          bannerAtTop: false, // set to true, to put banner at top
          overlap: false, // set to true, to allow banner overlap webview
          offsetTopBar: false, // set to true to avoid ios7 status bar overlap
          isTesting: false, // receiving test ad
          autoShow: true // auto show interstitial ad when loaded
        });
        // display the banner at startup
        window.plugins.AdMob.createBannerView();

  });

******EDIT*******

After a couple of app starts now i am getting this error in logcat and still black & blank banner ad.

"Receiver error Http response code: 403 " 
"There was a problem getting an ad response. ErrorCode: 0 " 
"Failed to load ad: 0"

http://i.stack.imgur.com/g8wQA.png 

Vu Chau (Mobile Ads SDK Team)

unread,
Sep 1, 2016, 2:30:28 PM9/1/16
to Google Mobile Ads SDK Developers
Hi Onur,

The SDK doesn't officially support third-party plugins, so you would need to reach out to the respective author of the plugin in case of an issue.

What I can tell you is that "Uncaught ReferenceError: AFMA_ReceiveMessage is not defined" isn't critical.  It's more like a warning message to be used internally by the SDK, so you can safely ignore it.  

You might want to try your ad unit ID in the vanilla sample we have on GitHub.  If you see the same issue (error code 0), send us the ad unit ID and we will take a further look.

Vu Chau
Mobile Ads SDK Team

Onur Demirtaş

unread,
Sep 4, 2016, 6:57:36 AM9/4/16
to Google Mobile Ads SDK Developers
Ok i will give a try. Btw now i am getting http status 403 responses. I will write the result asap. Thanks a lot.

Vu Chau (Mobile Ads SDK Team)

unread,
Sep 6, 2016, 8:44:21 AM9/6/16
to Google Mobile Ads SDK Developers
Hi Onur,

Are you getting a 403 even when using our sample examples? If so, feel free to provide the info requested and we will be able to look into it.

Vu Chau
Mobile Ads SDK Team

Reply all
Reply to author
Forward
0 new messages