-
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
Error loading Webview2Loader from UNC path #3465
Comments
Hi @Mark-IDB, it seems like an outlook add-in scenario, and you have mentioned you won't want to use |
Currently, fixed version runtime cannot be run from a network location or UNC path, and please see this. Hope it can give you more details. Thanks |
Hello @ElyssaJyu , 1 if you use outlook 365, rename the webview2loader.dll in C:\Program Files (x86)\Microsoft Office\root\Office16. The addin will use this file if it can't be found on the unc path. (outlook 2016 doesn't have this file so the problem is always present) I hope this example will help you locating the problem. Thanks for the reply! |
@Mark-IDB Is there a reason you don't want to try the setLoaderDllFolderPath function? |
@champnic if i have to use setLoaderDllFolderPath it wil be a last solution to the problem. Because:
|
Thanks for the info. I've added this bug to our backlog to investigate fixing. |
This is fixed in the latest prerelease SDK: 1.0.1988-prerelease Thanks! |
@champnic if the addin is loaded from an unc path(!) the webview2 component cannot find the webview2loader.dll. |
I can confirm it still does not work. Also, just to clarify: this has nothing to do with outlook. A simple WinForms application that opens a hardcoded page is all that is needed to reproduce this bug. |
@ThomasReinhardt We're tracking this in #4081. I was unable to reproduce outside of a VSTO, so if you can provide a sample or repro steps that demonstrated the issue for you that would be helpful. |
Description
This problem occurs not on every machine.
We have several VSTO applications which use Webview2. After an update of webview2 a number of users reported the application giving an error that webview2 could not be loaded. Our applications are started from a network share and because of the vsto there is a shadow cache created locally.
In version 1.0.1020.30 the webview2loader was loaded from the share (as seen in process explorer). But after upgrading it could not find the webview2loader.
Version
SDK: 1.0.1722.45
Runtime: Evergreen 112.0.1722.68
Framework: WinForms (vsto)
OS: Win10, Win11
Repro Steps
I found a way to easily reproduce the exception with an winform program.
The attached zipfile contains a winform project. Open the BrowserForm.cs. In the InitializeWebView2Async is a CoreWebView2Environment.SetLoaderDllFolderPath(path);
If the path is an UNC (ex: \\computer-name\Releases\OutlookTest\runtimes\win-x86\native) the Initialisation will give an exception. If the path is a local path (ex: D:\Releases\OutlookTest\runtimes\win-x86\native) it will continue loading.
The UNC is the same location as the local path so the Webview2loader is the same file.
In our VSTO i don't call (or want) the setLoaderDllFolderPath to be executed. It should automatically load the webview2loader from the unc path. Just as the 1.0.1020.30 did.
Start the app and click on the button 'test webview2'
UNC location or local path should make no difference.
In the 1.0.1020.30 version the SetLoaderDllFolderPath is not present. May be this change caused this behaviour/bug?
![image](https://user-images.githubusercontent.com/123632450/236775686-dee3504e-beb9-4c77-8c87-5b8f561897fa.png)
![image](https://user-images.githubusercontent.com/123632450/236775730-97001f2d-ea03-474f-9890-55163e319884.png)
Screenshots
Additional context
Example project.
WebView2Test.zip
AB#44716307
The text was updated successfully, but these errors were encountered: