-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: WebView2: Initialization failed due to incompatible environment configurations. #4174
Comments
I discovered another scenario in our automated tests where the problem occurs. I may be able to work around it in my code. Here are the steps; the exact reproduction steps/conditions are hard to specify.
|
Hi, Runtime Channel We do get the same exception (from CreateCoreWebView2Controller) inside the app: After adding WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS (--enable-logging --v=1 --log-file=c:\temp\webview2.log) for better logging, we were able to get more specific information about the issue:
At first it seemed to be quite random, but now we are pretty sure it's happening straight after Evergreen Bootstrapper updates runtime to newer version. If we run our app for the first time, it will crash with this exception. Subsequent runs are fine, up till next runtime update, so it seems the runtime fixes configuration. So the key in our case is auto update causing incompatible configuration. Are there any chances of avoiding this exception? One more important thing:
|
We've switched from very old fixed runtime version 91, to Evergreen. It seems the whole issue is about Evergreen updates vs. old version configuration in UserDataFolder. There is a NewBrowserVersionAvailable event, but it only fires when the app is running old version and new appears on the machine. We still need some guideline on how to handle "Incompatible WebView configuration" errors. |
Hi, The issue happens for us on regular basis. We tried to do everyting to get WebView2 to reinitialize, but no luck. Only the restart of the whole app helps, but this gives terrible user experience. |
What happened?
Hi,
I'm currently facing an issue where I consistently specify the same options for my environment configuration. However, in a few rare cases , I encounter the following error in my output window:
WebView2: Initialization failed due to incompatible environment configurations. Please check if there is already a WebView2 running with the same user data folder but different environment parameters.
In CreateCoreWebView2Controller handler I get the error code ERROR_INVALID_STATE:
"The group or resource is not in the correct state to perform the requested operation. (0x8007139f)"
I'm unsure why this inconsistency is happening despite consistently specifying the same options. If I use one profile folder for each webview, everything works (for my scenario at least)
Edit:
I also try:
to alternate between two profile folders, and everything works.
to put a Sleep(50) before CreateCoreWebView2Controller If the time elapsed since the last call to CreateCoreWebView2Controller (for all WebView) is less than 50 ms, and everything works. 50 ms is arbitrary.
Could you provide guidance on how to identify and resolve this issue?
Thank you.
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
119.0.2151.44
SDK Version
1.0.2151.40
Framework
Win32
Operating System
Windows 10
OS Version
19044.2075
Repro steps
It will be hard to give exact repros steps, here my setup
Regression
Don't know
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered: