Admob initialize causes an exception

660 views
Skip to first unread message

Amos

unread,
Sep 6, 2022, 2:21:27 AM9/6/22
to Google Mobile Ads SDK Developers
Hi

I get the following exception in my crashlytics dashboard for this line of code:
MobileAds.initialize(this, initializationStatus -> {
});

Caused by java.lang.UnsupportedOperationException
       at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:242)
       at android.webkit.WebSettings.getDefaultUserAgent(WebSettings.java:1355)
       at com.google.android.gms.ads.internal.util.zzs.zzc(com.google.android.gms:play-services-ads@@21.1.0:9)
       at com.google.android.gms.internal.ads.zzcer.zzr(com.google.android.gms:play-services-ads@@21.1.0:17)
       at com.google.android.gms.internal.ads.zzcnf.zzC(com.google.android.gms:play-services-ads@@21.1.0:9)
       at com.google.android.gms.internal.ads.zzcnf.zza(com.google.android.gms:play-services-ads@@21.1.0:1)
       at com.google.android.gms.ads.internal.ClientApi.zzg(com.google.android.gms:play-services-ads@@21.1.0:2)
       at com.google.android.gms.ads.internal.client.zzao.zzb(com.google.android.gms:play-services-ads-lite@@21.1.0:2)
       at com.google.android.gms.ads.internal.client.zzav.zze(com.google.android.gms:play-services-ads-lite@@21.1.0:1)
       at com.google.android.gms.ads.internal.client.zzav.zzd(com.google.android.gms:play-services-ads-lite@@21.1.0:9)
       at com.google.android.gms.ads.internal.client.zzed.zzy(com.google.android.gms:play-services-ads-lite@@21.1.0:3)
       at com.google.android.gms.ads.internal.client.zzed.zzm(com.google.android.gms:play-services-ads-lite@@21.1.0:8)
       at com.google.android.gms.ads.MobileAds.initialize(com.google.android.gms:play-services-ads-lite@@21.1.0:3)
       at com.appname.appname.MainActivity.onCreate(MainActivity.java:40)
       at android.app.Activity.performCreate(Activity.java:7998)
       at android.app.Activity.performCreate(Activity.java:7978)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
       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:2066)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:223)
       at android.app.ActivityThread.main(ActivityThread.java:7651)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

I see this twice for model: sdk_gwear_g3_x86. Is it because gwear does not support this thing and I can ignore it? The app is not built for wear, just mobile phones. Am I missing something else?

The exception seems to be coming from an automation testing of Google itself after publishing a new app which is not yet listed in play store.
Thanks

Mobile Ads SDK Forum Advisor

unread,
Sep 6, 2022, 2:14:27 PM9/6/22
to amos....@gmail.com, google-adm...@googlegroups.com

Hi there,

Thanks for reaching out to the GMA Forum.

Since you are using the model sdk_gwear_g3_x86, then it appears that it could be used for the smart watches devices. Also, it appears that the gwear is not supported for the Google Mobile Ads SDK. You may refer to below screenshot of our documentation that shows supported devices / platforms. 

 

 

The said crash might have resulted due to implementing Mobile Ads SDK with gwear platform (unsupported). Let me know if you have further questions.

Regards,

Google Logo
Yasar
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2dvhm9:ref

Amos

unread,
Sep 6, 2022, 2:26:17 PM9/6/22
to Google Mobile Ads SDK Developers
Thanks for a quick reply.
I'm not using the model sdk_gwear_g3_x86 :) 
The exception seems to be coming from an automation testing of Google itself after publishing a new app which is not yet listed in play store. Which leads to a question, why do they do that? :)
Assume this is the case (Google automation test with this model as part of it's app testing before approval), can I just ignore it?
Thanks

Mobile Ads SDK Forum Advisor

unread,
Sep 7, 2022, 5:43:29 AM9/7/22
to amos....@gmail.com, google-adm...@googlegroups.com

Hi Amos,

Thank you for your response.

For us to further check this crashes, can you provide us the follow details below? You can provide the following details via Reply privately to author option or directly provide it to the link below.

  • Sample app project
  • Steps to replicate
  • SDK version used
  • Device name and versions affected
  • App ID

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

 

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=5004Q00002dvhm9QAA&entry.80707362=00121636

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
Princess Pamela
Mobile Ads SDK Team
 


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