-
Notifications
You must be signed in to change notification settings - Fork 57
[Problem/Bug]: FixedVersion webview2 and windows 11 webview2 #5236
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
Comments
can you try doing the same thing without setting the WEBVIEW2_USER_DATA_FOLDER environment variable? |
@Navdeep-ss It doesn't work if we don't set or set the WEBVIEW2_USER_DATA_FOLDER environment variable. |
@Navdeep-ss @sivMSFT Any updates on this? Any workarounds? |
@victorhuangwq I don't get any responses from @Navdeep-ss or @sivMSFT on this issue which is an important one for us . Any idea how to fix this scenario where the fixedversion would be downloaded from the server and pointed to that version? |
will it be possible for you to share a small sample app which reproduce this issue, or probably etl or crash dump for us to investigate more on this issue? |
@Navdeep-ss Attached the sample app which has the downloading capability. Please read the Readme.txt available in the project. |
@Navdeep-ss Please acknowledge that you are able to execute the test app properly. Thanks |
Uh oh!
There was an error while loading. Please reload this page.
What happened?
In our UWP app , We have a feature that allows a user to switch between fixed version of webview2 and the windows 11 default version of webview2.
This works well with the default option of using webview2 that comes with windows 11 - 136.0.3240.64.
If there are any issues with the default version , then user has the option to switch to the tested version available from the server.
We don't want to bundle the fixed version of webview2 libraries to the UWP app installation as the package size becomes huge and users won't install the app. We already has a bundled version in the store and we have to move away from the huge UWP package bundled with webview2.
So we have the tested version 135.0.3179.98 copied to the server as a single zip file. When user selects the fixed version option from the settings,
the webview2 zip file will be streamed and downloaded from the server and the zip file is extracted and copied to the Appdata folder.
And during the start of the app, the environment would be pointed to that folder where it is copied.
string AppPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, _companyName, _appName);
System.Environment.SetEnvironmentVariable("WEBVIEW2_USER_DATA_FOLDER", AppPath);
string fixedPath = Path.Combine(AppPath, "FixedWebView2");
Environment.SetEnvironmentVariable("WEBVIEW2_BROWSER_EXECUTABLE_FOLDER", fixedPath);
In a working environment we would be having multiple instances of webview2 runs at the same time. But in the ondemand fixedversion downloaded , webview2 instances doesn't navigated to the urls and it crashes the app after sometime and is black. I have compared the files downloaded from the server with the files in the Microsoft actual packages and all are same.
Any idea how to fix this fixed version issue?
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
135.0.3179.98
SDK Version
Microsoft.UI.Xaml -2.8.6
Framework
WinUI2/UWP
Operating System
Windows 11
OS Version
No response
Repro steps
Windows.Storage.ApplicationData.Current.LocalFolder.Path
string AppPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, _companyName, _appName);
System.Environment.SetEnvironmentVariable("WEBVIEW2_USER_DATA_FOLDER", AppPath);
string fixedPath = Path.Combine(AppPath, "FixedWebView2");
Environment.SetEnvironmentVariable("WEBVIEW2_BROWSER_EXECUTABLE_FOLDER", fixedPath);
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
No, this never worked
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered: