question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onInterstitialAdClosed not firing and shows error in Xcode

See original GitHub issue

Hello,

I am trying to implement interstitial ads. The ad loading is working perfectly fine and I can see ‘onInterstitialAdLoaded’ is getting fired. The ad showing is also working and I see my test ad pop up. I would like to load a new ad when the ad closed event is fired, however the event does not fire and I see this error in Xcode when I click to close the ad. Any ideas on how I can resolve this? I am testing on an iPhone 12 Pro simulator.

Error: ProcessAssertion: Failed to acquire RBS Background assertion 'WebProcess Background Assertion' for process with PID 83552, error: Error Domain=RBSAssertionErrorDomain Code=3 "Target is not running or required target entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"Background" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}

Code:

 loadInterstitialAd() {
    AdMob.prepareInterstitial({
      adId: this.adInfo.interstitialId
    });
    AdMob.addListener('onInterstitialAdLoaded', this.onInterstitialAdLoaded);
    AdMob.addListener('onInterstitialAdOpened', this.onInterstitialAdOpened);
    AdMob.addListener('onInterstitialAdClosed', this.onInterstitialAdClosed);
 }

 showInterstitialAd() {
    AdMob.showInterstitial();
 }

  private onInterstitialAdLoaded = (info: any) => {
   console.log('Ad loaded');
  }

  private onInterstitialAdOpened = (info: any) => {
   console.log('Ad opened');
  }

  private onInterstitialAdClosed = (info: any) => {
   console.log('Ad closed');
  }

Ionic info

Ionic:

   Ionic CLI                     : 6.13.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.5.1
   @angular-devkit/build-angular : 0.1000.8
   @angular-devkit/schematics    : 10.0.8
   @angular/cli                  : 10.0.8
   @ionic/angular-toolkit        : 2.3.3

Capacitor:

   Capacitor CLI   : 2.4.4
   @capacitor/core : 2.4.4

Utility:

   cordova-res : 0.15.3
   native-run  : 1.3.0

System:

   NodeJS : v14.16.0 (/usr/local/Cellar/node@14/14.16.0_1/bin/node)
   npm    : 6.14.11
   OS     : macOS Catalina

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
vanessagcommented, Apr 6, 2021

@joaolnpr I am by no means an expert on Google AdMob but yes, I think your app has to be listed. Sounds like a Google AdMob problem not related to this plugin though. Maybe try contacting the Google AdMob support if you are still having those issues.

0reactions
rdlabocommented, Apr 23, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

xcode doesn't show compiler errors… | Apple Developer Forums
Here are no solutions, but 4 things to look at: 1. Sometimes Xcode is just very, very slow in getting error messages to...
Read more >
Why is my AdMob interstitial working fine in Xcode Simulator ...
You are attempting to present your interstitial before it has a chance to load. Your timer fires func presentInterstitial after one second.
Read more >
Get Started with the ironSource Network with Multiple ...
Once the onInterstitialAdClosed function is fired, you will be able to load a new Interstitial ad. Instance ID. Once you save the defined...
Read more >
Easy Mobile - Many-in-one package for mobile games | Page 12
Assets/EasyMobile/Editor/EM_MenuManager.cs(21,28): error CS0103: The name 'EM_BuiltinObjectCreator' does not exist in the current context
Read more >
ironSource Mobile Archives - Page 43 of 67
ironSource provides an error code mechanism to help you understand any error you may ... Interstitial Ad. Once the onInterstitialAdClosed function is fired, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found