java.lang.RuntimeException: Using WebView from more than one process at once
Hey there. My app's bug reporting tool is reporting several crashes around the use of WebView in LocalizationApplicationDelegate.
Unable to create application [application.name]: 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 [process name] (pid 20098), lock owner [process name] (pid 21177)
I'm unfortunately not sure how to reproduce this crash. My best guess is that my application is trying to instantiate a WebView on startup with the same process name as another instance of my app that is in the process of getting killed.
I see that the WebView is used in LocalizationApplicationDelegate like this
class LocalizationApplicationDelegate {
fun onCreate(context: Context) {
WebView(context).destroy()
}
...
}
An WebView object is created and immediately destroyed created and immediately destroyed. I am sure this is the reason of your problem.
For what a WebView is required to handle localization issues?
@oschildt That's right. This was most likely added to address this issue. But unfortunately this workaround introduces an issue of its own with multiple processes being active at once.
Since AndroidX AppCompat has per-app language preferences for backward compatibility. Please migrate this library to AndroidX for more stability, compatibility, and longer support from Google team.
Thank you for your support