googleads / googleads-mobile-unity

Official Unity Plugin for the Google Mobile Ads SDK
https://developers.google.com/admob/unity
Apache License 2.0
1.37k stars 1.08k forks source link

Using WebView from more than one process at once with the same data directory is not supported. https://crbug.com/558377 #1072

Closed sebastian-dudzic closed 1 year ago

sebastian-dudzic commented 4 years ago

Hi,

I'm using newest AdMob sdk 4.1.0 for Unity. I've noticed new crashes.

Using WebView from more than one process at once with the same data directory is not supported. https://crbug.com/558377

Fatal Exception: java.lang.Error FATAL EXCEPTION [main] Unity version : 2018.4.5f1 Device model : samsung SM-G955F Caused by java.lang.RuntimeException Using WebView from more than one process at once with the same data directory is not supported. https://crbug.com/558377 org.chromium.android_webview.AwBrowserProcess.b (PG:11) Pm.l (PG:33) Om.run (PG:2) OI0.f (PG:11) NI0.run (Unknown Source:2) android.os.Handler.handleCallback (Handler.java:873) android.os.Handler.dispatchMessage (Handler.java:99) android.os.Looper.loop (Looper.java:214) android.app.ActivityThread.main (ActivityThread.java:7050) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)

One particular crash was on Samsung Galaxy S8+, Android 9.

I have read about problems with multiple web views run on a single process but I think it's a problem in SDK. Am I doing something wrong?

We are using multiple placements in app, both for interstitials and rewarded videos (but only one at a time of course). We are not using any banners.

Thanks in advance :)

qbit86 commented 4 years ago

Any updates on this? We have the same issue in Google Play Console.

Unity 2018.4.10f1
GoogleMobileAds-v4.2.1

artyom-kolesnikov commented 4 years ago

This issue started to reproduce in the latest version of our game according to reports from Crashlytics. In this version we made some changes that can be related:

Affected devices: Galaxy S10+ and Galaxy S9

We are using Unity 2018.4.12f1

stowy commented 4 years ago

This is a webview related crash, unfortunately I'm not sure that the Unity plugin can do anything to avoid this since we only wrap the Android Google Mobile Ads SDK, which utilizes webviews.

ghost commented 4 years ago

I have the same problem

qbit86 commented 4 years ago

Still reproduces in GoogleMobileAds-v5.1.0.

@stowy

since we only wrap the Android Google Mobile Ads SDK, which utilizes webviews.

Well, then could you please ask that other team to address this issue? I mean: you are at Google, they are at Google, you know.

ishnu47 commented 4 years ago

Hello, I also got these crashes recently, and getting increasing.

Fatal Exception: java.lang.RuntimeException: Using WebView from more than one process at once with the same data directory is not supported. https://crbug.com/558377 : Current process com.myapp (pid 17262), lock owner com.myapp (pid 13666)
       at org.chromium.android_webview.AwDataDirLock.b(chromium-TrichromeWebViewGoogle.aab-stable-1:30)
       at de.i(chromium-TrichromeWebViewGoogle.aab-stable-1:36)
       at ce.run(chromium-TrichromeWebViewGoogle.aab-stable-1:2)
       at iC.g(chromium-TrichromeWebViewGoogle.aab-stable-1:11)
       at gC.run(:2)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:237)
       at android.app.ActivityThread.main(ActivityThread.java:7811)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)

Here is my environment:

caibaolin commented 4 years ago

In order to improve app stability and data integrity in Android 9, apps cannot share a single WebView data directory among multiple processes. Typically, such data directories store cookies, HTTP caches, and other persistent and temporary storage related to web browsing. If your app must use instances of WebView in more than one process, you must assign a unique data directory suffix for each process, using the WebView.setDataDirectorySuffix() method

qbit86 commented 4 years ago

@caibaolin

If your app must use instances of WebView in more than one process

I don't even know what WebView actually is. I only use Google Mobile Ads via Unity plugin. I don't have any intents of explicit using WebView whatever it stands for.