capacitor-community / admob

Community plugin for using Google AdMob
MIT License
216 stars 68 forks source link

error show admob interstitialAds Error: No ad config. #123

Closed brightchip closed 3 years ago

brightchip commented 3 years ago

No matter what I try it throws error: error show admob interstitialAds Error: No ad config.

I tried enabled the test deviceId

  let ss = await AdMob.initialize({
        requestTrackingAuthorization: true,
        testingDevices: ['91C3D9E1EED47C6F0DBCDEA3C30CC77A'],
        initializeForTesting: true,
    });`

and then tried to use the test ads Id like:

        AdMob.addListener(InterstitialAdPluginEvents.Loaded, (info) => {
            console.log('InterstitialAdPluginEvents info', info)
                // Subscribe prepared interstitial
        });

        const options = {
            adId: 'ca-app-pub-3940256099942544/1033173712', 
            // isTesting: true
            // npa: true
        };
        await AdMob.prepareInterstitial(options);
        await AdMob.showInterstitial();`

They always give me same error : D/Capacitor: Sending plugin error: {"save":false,"callbackId":"45181843","pluginId":"AdMob","methodName":"prepareInterstitial","success":false,"error":{"message":"No ad config."}}

distante commented 3 years ago

I can not reproduce this and the demo project is working. Can you please create a repro where this problem happens?

MayaHanna commented 3 years ago

Same problem

distante commented 3 years ago

Guys please, It just took a little bit to google this https://stackoverflow.com/a/64311609/1255819

gilzonme commented 2 years ago

Guys please, It just took a little bit to google this https://stackoverflow.com/a/64311609/1255819

@distante how can I implement your solution in capacitor