java.lang.VerifyError when initializing MobileAds

1,114 views
Skip to first unread message

Amanzhol Tulepbayev

unread,
Nov 16, 2022, 3:29:35 AM11/16/22
to Google Mobile Ads SDK Developers
Hi! I'm getting background crashes on this line in my android application:

@WorkerThread
fun initAsync() {
    runCatching {
        MobileAds.initialize(app) // crashes, even though i use runCatching
    }
}

Crash stack trace:

Caused by java.lang.VerifyError: Verifier rejected class com.google.android.gms.common.app.BaseApplicationContext: org.chromium.net.CronetEngine com.google.android.gms.common.app.BaseApplicationContext.getCronetEngine() failed to verify: org.chromium.net.CronetEngine com.google.android.gms.common.app.BaseApplicationContext.getCronetEngine(): [0x22]  can't resolve returned type 'Unresolved Reference: org.chromium.net.CronetEngine' or 'Unresolved Reference: yzw' (declaration of 'com.google.android.gms.common.app.BaseApplicationContext' appears in /data/app/~~SIY9z0IBucHHUFYU_2VoDQ==/com.google.android.gms-qOF3pYujFY2bdDGBsIX0Ng==/base.apk!classes2.dex)
       at ysl.b(:com.google.android.gms@224312045@22.43.12 (190408-483592595))
       at com.google.android.gms.chimera.container.DynamiteLoaderImpl.<init>(:com.google.android.gms@224312045@22.43.12 (190408-483592595):1)
       at java.lang.Class.newInstance(Class.java)
       at com.google.android.gms.dynamite.DynamiteModule.zzg(com.google.android.gms:play-services-basement@@18.1.0:5)
       at com.google.android.gms.dynamite.DynamiteModule.zza(com.google.android.gms:play-services-basement@@18.1.0:28)
       at com.google.android.gms.dynamite.DynamiteModule.getRemoteVersion(com.google.android.gms:play-services-basement@@18.1.0:1)
       at com.google.android.gms.ads.internal.client.zzav.zzd(com.google.android.gms:play-services-ads-lite@@21.3.0:5)
       at com.google.android.gms.ads.internal.client.zzed.zzy(com.google.android.gms:play-services-ads-lite@@21.3.0:3)
       at com.google.android.gms.ads.internal.client.zzed.zzm(com.google.android.gms:play-services-ads-lite@@21.3.0:8)
       at com.google.android.gms.ads.MobileAds.initialize(com.google.android.gms:play-services-ads-lite@@21.3.0:3)
       at APPNAME.launcher.data.GoogleAdsInitDelegate.initAsync(GoogleAdsInitDelegate.kt:38)
       at APPNAME.launcher.data.DefaultAppLaunchInteractor.launchAsyncTasks(DefaultAppLaunchInteractor.kt:104)
       at APPNAME.launcher.data.DefaultAppController$onAppInitializerCreate$1.invokeSuspend(DefaultAppController.kt:66)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
       at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
       at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
       at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

I'm not using r8/proguard

Version that I'm using:
implementation "com.google.android.gms:play-services-ads:21.3.0"

Mobile Ads SDK Forum Advisor

unread,
Nov 16, 2022, 12:24:50 PM11/16/22
to amanz...@gmail.com, google-adm...@googlegroups.com
Hi Amanzhol,

Is the crash reliably reproducible on your end? If so, could you please provide to us at least a sample project so we could further check? Kindly provide it to us via reply privately to author option or by following the steps below.
 

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002gPLf6QAG&entry.80707362=00157280

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.



Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2gPLf6:ref

Amanzhol Tulepbayev

unread,
Nov 17, 2022, 12:09:08 AM11/17/22
to Google Mobile Ads SDK Developers
No, unfortunately it's not reproducible on my side. The crash is rare

Screenshot 2022-11-17 at 11.07.16.png

среда, 16 ноября 2022 г. в 23:24:50 UTC+6, mobileadssdk:

Mobile Ads SDK Forum Advisor

unread,
Nov 17, 2022, 9:30:22 AM11/17/22
to amanz...@gmail.com, google-adm...@googlegroups.com
Hi Amanzhhol,

Thank you for your confirmation and providing additional information to the reported issue. I've raised this to the team for further investigation. I'll update this thread the soonest I hear back from them.

Mobile Ads SDK Forum Advisor

unread,
Jan 23, 2023, 2:27:35 PM1/23/23
to amanz...@gmail.com, google-adm...@googlegroups.com
Hi Amanzhhol,

The team responded back and mentioned that the crash is not happening in SDK code and rather as part of dynamite loading process which they see that issues like this are usually transient/rare. What we recommend as this point is to keep monitoring the crash and let us know if this simnifically increase using the latest version of the SDK.
Reply all
Reply to author
Forward
0 new messages