MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Unable to use Fixed Runtime from UNC Path

Open
#1,478 6 comments 1 reaction 1 assignee View on GitHub

@champnic is already working on this.

Since Jul 7, 2021.

feature request priority-low tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description
I'm trying to create a WinForm using the WebView2 control. This is built in an old version of .Net as it's a plugin for a proprietary piece of software. Having said that, everything works well on my development environment and I wished to make this available in our production WVD environment. As the WebView runtime is not available, I decided to use the Fixed Runtime version as it is easiest for me to deploy.

The behaviour that I am experiencing, is that if I use a UNC path for the BrowserExecutableFolder, then I get an exception relating to the control being disposed. Actually, using the UNC path from my development environment has the same issue. If I point the BrowserExecutableFolder to the same fixed runtime on the local drive of my dev environment then it works perfectly. Any ideas why I can't use the fixed runtime from a UNC path?

System.InvalidOperationException
HResult=0x80131509
Message=CoreWebView2 members cannot be accessed after the WebView2 control is disposed.
Source=Microsoft.Web.WebView2.Core
StackTrace:
at Microsoft.Web.WebView2.Core.CoreWebView2Controller.MoveFocus(CoreWebView2MoveFocusReason reason)
at Microsoft.Web.WebView2.WinForms.WebView2.OnGotFocus(EventArgs e)
at System.Windows.Forms.Control.InvokeGotFocus(Control toInvoke, EventArgs e)
at System.Windows.Forms.Control.WmSetFocus(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Microsoft.Web.WebView2.WinForms.WebView2.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Inner Exception 1:
COMException: The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F)

Version
SDK: WebView2 v1.0.864.35
Runtime: 91.0.864.59.x86
Framework: WinForms
OS: Windows 10

Repro Steps
With the WebView2 control on a WinForm.
Download the Fixed runtime and extract it to a network share.
Set BrowserExecutableFolder to the UNC path for the runtime.
Exception happens when this.ShowDialog(initPluginData.Owner); is executed

Scenario: AB#34322708

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.