Mediation Test Suite crashes when loading interstitial ads

729 views
Skip to first unread message

Hamid Alaei

unread,
Apr 25, 2021, 4:22:27 AM4/25/21
to Google Mobile Ads SDK Developers
Every time I want to load interstitial ad on mediation test suite, the app crashes. But inside app I have no issue with interstitial ads. Native ads are loaded correctly.
Is mediation test suite not yet compatible with ads 20.0.0?

implementation "com.google.android.gms:play-services-ads:'20.0.0'
implementation 'com.google.ads.mediation:facebook:6.3.0.1'
implementation 'com.google.ads.mediation:mopub:5.16.3.0'
implementation 'com.google.android.ads:mediation-test-suite:1.5.0'

Error:


2021-04-25 12:49:31.625 30987-30987/... E/AndroidRuntime: FATAL EXCEPTION: main
    Process: ..., PID: 30987
    java.lang.RuntimeException: Unable to start activity ComponentInfo{.../com.google.android.ads.mediationtestsuite.activities.ConfigurationItemDetailActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.android.ads.mediationtestsuite.dataobjects.AdUnit.getName()' on a null object reference
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3114)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3257)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7050)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.android.ads.mediationtestsuite.dataobjects.AdUnit.getName()' on a null object reference
        at com.google.android.ads.mediationtestsuite.viewmodels.AdUnitViewModel.getName(AdUnitViewModel.java:30)
        at com.google.android.ads.mediationtestsuite.viewmodels.AdUnitViewModel.getDetailPageTitle(AdUnitViewModel.java:35)
        at com.google.android.ads.mediationtestsuite.activities.ConfigurationItemDetailActivity.onCreate(ConfigurationItemDetailActivity.java:101)
        at android.app.Activity.performCreate(Activity.java:7327)
        at android.app.Activity.performCreate(Activity.java:7318)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3094)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3257)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7050)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

Mobile Ads SDK Forum Advisor Prod

unread,
Apr 26, 2021, 2:55:27 AM4/26/21
to hami...@gmail.com, google-adm...@googlegroups.com

Hi Hamid,

Thank you for reaching out to us.

As per the installation guide of mediation test suite, AdMob 20.0.0 is compatible to mediation test suite 1.5.0. With this, could you please provide us the following details via Reply privately to author option or send it directly to mobileads...@gmail.com?

  • Sample project(if any)
  • Steps to replicate error

Regards,

Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2GHNw7:ref

Hamid Alaei

unread,
Apr 27, 2021, 6:46:23 AM4/27/21
to Google Mobile Ads SDK Developers
Hello again,
I've just created a public github demo repository to reproduce the crash. It is not but a blank activity project with admob test suite. I used test IDs in this project so its fine for everything to be public. Downgrading test suite to 1.4.+ and play-services-ads to 19.+ fixed it for me.
Steps to reproduce: wait for test suite to launch. Select a rewarded ad (I couldn't find interstitial). Press on load ad. It crashes.

So something is wrong. Please kindly let me know if this is just a test-suite bug or a bug in the main play-services-ads package. In case it is a play-services-ads issue, maybe I need to wait for the next release before I can build my project with admob 20.+?

Thanks.

Mobile Ads SDK Forum Advisor Prod

unread,
Apr 27, 2021, 10:23:31 AM4/27/21
to hami...@gmail.com, google-adm...@googlegroups.com
Hi Hamid,

I work with Pamela and will assist you. Thank you for the project, the app crashes when loading a rewarded ad, downgrading fixed it. Let me bring this up with my team and we will get back to you as soon as possible.

Regards,

Google Logo
Aryeh Baker
Mobile Ads SDK Team
 


 

ref:_00D1U1174p._5004Q2GHNw7:ref

Dilanka Laksiri

unread,
May 1, 2021, 6:05:01 PM5/1/21
to Google Mobile Ads SDK Developers
Every time I want to load interstitial ad on mediation test suite, the app crashes. But inside app I have no issue with interstitial ads.

implementation 'com.google.android.gms:play-services-ads:20.1.0'
implementation 'com.google.android.ads:mediation-test-suite:1.5.0'
implementation 'com.google.ads.mediation:facebook:6.4.0.0'

FATAL EXCEPTION: main
    Process: ..., PID: 22388
    java.lang.RuntimeException: Unable to start activity ComponentInfo{.../com.google.android.ads.mediationtestsuite.activities.ConfigurationItemDetailActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.android.ads.mediationtestsuite.dataobjects.AdUnit.getName()' on a null object reference
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3611)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3775)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2246)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:233)
        at android.app.ActivityThread.main(ActivityThread.java:8010)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.android.ads.mediationtestsuite.dataobjects.AdUnit.getName()' on a null object reference
        at com.google.android.ads.mediationtestsuite.viewmodels.AdUnitViewModel.getName(AdUnitViewModel.java:30)
        at com.google.android.ads.mediationtestsuite.viewmodels.AdUnitViewModel.getDetailPageTitle(AdUnitViewModel.java:35)
        at com.google.android.ads.mediationtestsuite.activities.ConfigurationItemDetailActivity.onCreate(ConfigurationItemDetailActivity.java:101)
        at android.app.Activity.performCreate(Activity.java:8006)
        at android.app.Activity.performCreate(Activity.java:7990)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3584)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3775) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2246) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:233) 
        at android.app.ActivityThread.main(ActivityThread.java:8010) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978) 

Mobile Ads SDK Forum Advisor Prod

unread,
May 3, 2021, 12:52:16 AM5/3/21
to mecd...@gmail.com, google-adm...@googlegroups.com
Hi Dilanka,

The team is now working on a fix regarding this crash. I'll let you know the soonest the fix has been released.

Regards,
Google Logo
Teejay Wennie Pimentel
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2GHNw7:ref

Maksim Pelevin

unread,
Oct 22, 2021, 4:39:56 PM10/22/21
to Google Mobile Ads SDK Developers
Getting the same crash on Unity 2020.3 (android build). The Android plugin has been updated to v2.0.0, but the Unity plugin has not been updated. Maybe this is the problem?

Mobile Ads SDK Forum Advisor

unread,
Oct 25, 2021, 2:12:46 AM10/25/21
to manab...@gmail.com, google-adm...@googlegroups.com

Hello Maksim,

Thank you for reaching out to us.

Can you confirm if you're encountering this to the mediation test suite of Android platform build when loading interstitial ads or you are using the unity on this? The team mentioned that this has been fixed, but since it looks like you are using unity on this, could you please provide the following details via Reply privately to author option or send it directly to mobileads...@gmail.com? Kindly inform us on this thread if you sent it directly to the email provided.

  • Sample app
  • Steps to replicate
  • Full stack trace
  • Version used

Regards,

Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 

 



ref:_00D1U1174p._5004Q2GHNw7:ref

Maksim Pelevin

unread,
Oct 25, 2021, 9:19:25 AM10/25/21
to Google Mobile Ads SDK Developers
I just wanted to point out that the "Mediation test suit Unity plugin" has not been updated since 3 December 2020. https://groups.google.com/g/google-admob-ads-sdk/c/H0OcUJqIQH8/m/XBBMoyv6BgAJ

Mobile Ads SDK Forum Advisor

unread,
Oct 25, 2021, 5:33:02 PM10/25/21
to manab...@gmail.com, google-adm...@googlegroups.com
Hi Maksim,

In looking over the post that you showed us as well as the comments that you have made. You say you have upgraded to 2.0.0 but the link that you showed only goes up to 1.6.0. We would ask if you can share with us via the "Reply to author" button with a sample app for us to review as well as test against. This will help us to see what could be the issue.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2GHNw7:ref
Reply all
Reply to author
Forward
0 new messages