When I show an interstitial ad, close it, then try load a new one, onAdFailedToLoad is called with the following:
Error: Something happened internally; for instance, an invalid response was received from the ad server.
Works fine on Android, but on iOS it keeps giving this error when trying to show the second interstitial.
Anyone have any ideas?
export default class Page {
interstitial = null;
static InterstitialPreload(){
this.interstitial = firebase.admob().interstitial(settings.admob_ad_unit_id_interstitial);
this.interstitial.on('onAdLoaded', () => {
console.warn('Advert ready to show.'); //ad is shown via .show in another function
});
this.interstitial.on('onAdOpened', () => {
console.warn('Advert opened.');
});
this.interstitial.on('onAdClosed', () => {
console.warn('onAdClosed');
setTimeout(function(){
Page.InterstitialPreload();
},2000);
});
this.interstitial.on('onAdFailedToLoad', (err) => {
console.warn('onAdFailedToLoad: '+err);
console.error(err);
});
//}
this.interstitial_request = new firebase.admob.AdRequest();
this.interstitial_request.addKeyword('dagligkrydsen-interstitial');//.addKeyword('bar');
// Load the advert with our AdRequest
this.interstitial.loadAd(this.interstitial_request.build());
}
}
Almost two years forward, still facing this issue.
and
Note that I am using this with Admob test IDs for IOS.