-
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
Timeout Exception when CoreWebView2 initialization #2888
Comments
One way WebView2 initialization could time out is if the control is not in WPF UI tree. Could you try to ensure that the control is added into the UI (it could still be not really visible to the user) and see whether that makes it to work? |
I think it should be added into the UI tree, because I can see the website loaded successfully if I run it by Windows user A. it only throw timeout exception when I run it by Windows user B. Here is the code that I add it into the UI tree.
ViewModel:
|
From the code shared in your initial post, I see that you are creating a new WebView with Do you see any files created under the specified user data folder? If there are some files created, then it means that we started WebView initialization. Otherwise, we are waiting for something else. The only thing I can see that we wait before start processing for the control to be in UI tree so that we can have the parent hwnd for the WebView2. |
Yes, there is folder called 'EBWebVew' created under the user data folder, and there are many subfolders under the 'EBWebVew'
Sorry for showing incomplete code, here is my full code about WebView2 Initialization: Interface:
Service:
ViewModel:
App.xaml.cs
MainWindow.xaml.cs
|
Could you take a performance trace for the repro for triage? How to take the performance trace: #1540 (comment). As the resulted etl file could be large, please share it via some cloud drive. As the latest Edge WebView2 Runtime logs more event, if you could get a trace with the latest runtime, that would be even more helpful. The fact that there are files created under the EBWebView folder, and you didn't mention that you have to wait for a long time to get the timeout error thrown, suggest that it is something else. |
Sorry, I am not able to take the performance trace as the server is for internal use. I will try to get the latest runtime to see if it is helpful.
In fact, I have to wait for long time (around 2 mins) to get the timeout error. |
So, it is really a timeout. Without a trace, I'll have to brainstorm. |
The webview2 initialization works fine after I upgraded the runtime version to 104.0.1293.54. it seems the new runtime version solve this issue, that is great! Thank you for you help! |
Description:
There are already some webview2 instances(run it by windows user A) running in my server. They work fine.
Now I deploy a new webview2 app and run it by user B. When the coreWebView2 is initializing, I get the Timeout exception. But if I run it by user A, it works fine.
Could you give some advises? or is there any way to get more internal logs?
I noted the #2054 . In my app, the userDataFolder is different for each WebView2 instance, so I think it maybe different case.
Here is my code:
Exception:
Version:
Microsoft SDK Version: 1.0.1020.30
Microsoft RT Version: 95.0.1020.53
The text was updated successfully, but these errors were encountered: