-
Notifications
You must be signed in to change notification settings - Fork 55
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
Webview2 fails to initialize #4179
Comments
Hi - do I understand the issue correctly - you are not able to initialize WebView2 at all? Have you looked into our SampleApp? |
Yes I have. The issue has been reported from our customer end. We are able to initialize WebView2 but at times it fails which we can't figure out. Mostly after relaunch of application. |
I see. So |
@vbryh-msft C:\webview_test>wpr -start WebView2_CPU.wprp -filemode
C:\webview_test>wpr -stop trace.etl "trace"
Cannot change thread mode after it is set.
Profile Id: RunningProfile
Error code: 0x80010106
C:\webview_test> Run on OS:
|
@fdzatdtv This blog says that when facing that error you need Please use the insider version of ADK Windows Performance Toolkit, build 19650 or later - have you tried to update wpr? Also - have you checked that you are not starting webview2 with different configuration from the same user data folder? |
@vbryh-msft Hi, I also encountered this problem, The scenario is as follows: We have been launching webview2 with the same configuration from the same user data folder |
We have a class for initializing all the webview2 instances with the same environment and UDF. In addition, we synchronize all the inits to not run into a concurrent init. For the case of cross-process inits we have proved that there aren't any. Some of our applications have their own UDF to not disturb other applications. @vbryh-msft It's not acceptable to require an insider version of the ADK since this requires to be member of the insider programm and to install software that is not public available. Please provide an alternative wprp file we can work with. |
@vbryh-msft My wpr version is: Microsoft Windows Performance Recorder Version I tried your wprp file, but it fails too: D:\tmp\wpr_test>wpr -start WebView2.wprp -filemode
D:\tmp\wpr_test>wpr -stop trace.etl "trace"
Cannot change thread mode after it is set.
Profile Id: RunningProfile
Error code: 0x80010106
D:\tmp\wpr_test> |
I ran the wpr trace. It seems like it worked and I have a 292 MB trace.etl file. What do I do with it? ☺ |
I should add that my app works just fine on Windows 11. 👍 |
What happened?
Basically two types of exception occurs .The crashes are very in consistent.
One =>during Intialization of window
Inner Exception-> System.Runtime.InteropServices.COMException (0x8007139F): The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F) at Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Controller.add_AcceleratorKeyPressed(ICoreWebView2AcceleratorKeyPressedEventHandler eventHandler, EventRegistrationToken& token) at Microsoft.Web.WebView2.Core.CoreWebView2Controller.add_AcceleratorKeyPressed(EventHandler`1 value)
Two=>during closing of window
Inner Exception-> System.Runtime.InteropServices.COMException (0x8007139F): The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F) at Microsoft.Web.WebView2.Core.Raw.ICoreWebView2.ExecuteScript(String javaScript, ICoreWebView2ExecuteScriptCompletedHandler handler) at Microsoft.Web.WebView2.Core.CoreWebView2.d__133.MoveNext()
Importance
Blocking. My app's basic functions are not working due to this issue.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
119.0.2151.72
SDK Version
1.0.1418.22
Framework
WPF
Operating System
Windows 10
OS Version
10.0.19045
Repro steps
there is no steps.
Repros in Edge Browser
Not Applicable
Regression
Don't know
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered: