[Solved] AdMob rewarded video doesn't show


#1
  • Cocoon Version:
    2.1.0

  • Basic description of the problem:
    Showing test banner works fine, but showing test or real video ad doesn’t work. Throws silent error.

  • Device info:
    Sony Xperia XA2, Android 8.0.0

  • Error log
    W/System.err: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    W/System.err: at com.ludei.ads.cordova.AdServicePlugin$1.run(AdServicePlugin.java:56)
    at android.os.Handler.handleCallback(Handler.java:789)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6590)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
    Caused by: java.lang.RuntimeException: Empty AdUnit
    at com.ludei.ads.admob.AdServiceAdMob.createRewardedVideo(AdServiceAdMob.java:61)
    at com.ludei.ads.cordova.AdServicePlugin.createRewardedVideo(AdServicePlugin.java:143)
    … 9 more

  • Testcase:
    Cocoon.Ad.AdMob.configure({
    android: {
    rewardedVideo: “ca-app-pub-3940256099942544/5224354917”
    }
    });

Cocoon.Ad.AdMob.createRewardedVideo();

  • Webview engine(s):
    Canvas+

  • Used plugins (if relevant):
    AdMob native Ads for Android

  • Framework/game engine (if relevant):
    Phaser


#2

The problem is that rewarded video takes ID from interstitial instead of rewardedVideo. So this works now: interstitial: “ca-app-pub-3940256099942544/5224354917”


#3

you better hide your admob ads id


#4

Thanks, but it’s just a testing ID available here: Test Ads - Sample ad units. So it’s alright.


#5

I have a question… I have make an game using cocoon.io and added admob plugin. But not finding any place to insert my ads id. Where to find the ads id?


#6

make sure you’ve using CocoonAdmob plugin, click on that plugin, you’ll find the parameter at the left window.