How to disable WebView for MobileAds?

136 views
Skip to first unread message

Bruce Lv

unread,
Dec 8, 2022, 11:19:00 PM12/8/22
to Google Mobile Ads SDK Developers
 I am investigating a crash on Android which is related with WebView and increased a lot from September. I found the MobileAds will create WebView when MobileAds.initialize is called. I wonder if it is possible to turn off the creation of WebView for MobileAds?

The crash is:

Fatal Exception: java.lang.RuntimeException Failed to create lock file /data/user/0/com.duolingo/app_webview/webview_data.lock

The callstack of MobileAds.initialize WebView is:

<init>:234, RandomAccessFile (java.io) b:9, AwDataDirLock (org.chromium.android_webview) i:34, Xu0 b:18, Xu0 k:2, Xu0 h:2, WebViewChromiumFactoryProvider (com.android.webview.chromium) init:14, WebViewChromium (com.android.webview.chromium) <init>:443, WebView (android.webkit) <init>:363, WebView (android.webkit) <init>:345, WebView (android.webkit) <init>:332, WebView (android.webkit) <init>:322, WebView (android.webkit) <init>:1, zzcpi (com.google.android.gms.internal.ads) zza:4, zzcoy (com.google.android.gms.internal.ads) zza:8, zzcpb (com.google.android.gms.internal.ads) <init>:3, zzbuw (com.google.android.gms.internal.ads) zzi:1, zzbvt (com.google.android.gms.internal.ads) run:-1, zzbvc (com.google.android.gms.internal.ads) execute:2, zzcjj (com.google.android.gms.internal.ads) execute:1, zzcjl (com.google.android.gms.internal.ads) zzd:2, zzbvt (com.google.android.gms.internal.ads) zzb:4, zzbvt (com.google.android.gms.internal.ads) zzb:2, zzbwl (com.google.android.gms.internal.ads) zzb:26, zze (com.google.android.gms.ads.internal) zza:1, zze (com.google.android.gms.ads.internal) zzk:15, zzcuu (com.google.android.gms.internal.ads) zzl:13, zzbjq (com.google.android.gms.internal.ads) initialize:3, MobileAds (com.google.android.gms.ads)

Bruce Lv

unread,
Dec 8, 2022, 11:20:53 PM12/8/22
to Google Mobile Ads SDK Developers

Mobile Ads SDK Forum Advisor

unread,
Dec 9, 2022, 1:07:18 PM12/9/22
to google-adm...@googlegroups.com
Hi Bruce,

Thank you for reaching out to us.

With regard to your concern, please do note that webview is part of the initialization process of the Mobile Ads SDK. The process occurs during 1st ad request or the 1st MobileAds.initialize() call and I'm afraid that your cannot disable this. 

As per the crash that you're encountering, could you please provide the following details (via reply privately to author option) for us to check this further?
  • AdMob App ID
  • Ad Unit being use
  • Sample app where the issue is reproducible 
  • Affected devices
  • Percentage occurrence of the crash
  • SDK version

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=5004Q00002h17MeQAI&entry.80707362=00160127

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._5004Q2h17Me:ref
Reply all
Reply to author
Forward
0 new messages