-
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
What all conditions results in ERROR_INVALID_STATE when sharing same user data folder across two webviews #1213
Comments
Hey @santoshsampath - DPI awareness is the most common error of this type. I believe it's any change that would create a different command-line when launching the browser process will run into this issue. @LiangTheDev Do you know if we have this documented in detail somewhere or an easy way to see when this might occur? |
Ok thanks command line is a good hint, will compare them in procmon and find out what I can find |
Command line is what we really check. So, verify that is a good way. |
It was indeed. The only difference was --webview-exe-version= was present for one of the app but not other one. It seems to be picking product version from the host binary for this. But anyway thanks for the hint it was really useful. |
This is actually a very special case and a bug in WebView2. |
Made a change in WebView2 runtime, will be available in Edge WebView2 Runtime 92 when it is released. |
This should be fixed in all runtimes 92.0.872.0+. Thanks! |
In the Share User data folders it is mentioned that same options to be provided for ICoreWebView2Environment.
When I was trying out this in two apps, I found that even if we pass same userData folder to CreateCoreWebView2EnvironmentWithOptions, it fails with the same error when we try to create webview using CreateCoreWebview2Controller, if DPI awareness of both apps sharing webview do not match.
I also received same error when trying to use webview in one of existing project. I then created new project similar to "Getting started for C++" and error is not seen.
I wanted to know what are the other variables to look for when sharing webview2 in two apps?
Is there a way to look for diagnostic logs to know what caused CreateCoreWebview2Controller to fail with this error so that I can fix my project settings correctly.
The text was updated successfully, but these errors were encountered: