MicrosoftEdge / MicrosoftEdge/WebView2Feedback
Restarting multiple WPF webview results in exception when calling EnsureCoreWebView2Async
@champnic is already working on this.
Since Jan 11, 2022.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
Restarting multiple WPF processes each containing a single webview (single browser process) results in error when calling EnsureCoreWebView2Async.
Version
SDK: 1.0.1054.31
Runtime: 94.0.992.50
Framework: WPF
OS: Win10
Repro Steps
Start multiple WPF apps each containing a single webview instance.
On startup of each navigate to a web page.
Shutdown all the apps programmatically and start them again.
They will fail once restarted with exception:
System.Runtime.InteropServices.COMException (0x800700AA): The requested resource is in use. (Exception from HRESULT: 0x800700AA)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Web.WebView2.Wpf.WebView2.<>c__DisplayClass27_0.<g__Init|0>d.MoveNext()
Additional context
It does not happen when each has a separate user data folder but that is way too much overhead as we can have many apps.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.