-
Notifications
You must be signed in to change notification settings - Fork 39
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
(webview2-runtime) only uses x86, not x64 #223
Comments
Thanks for raising this issue! The packages within this repository are maintained in my spare time. My spare time, like yours is important. Please help me not to waste it. To help me, and to have the issue resolved more quickly, please see CONTRIBUTING for how to raise a pull request to resolve the issue yourself. Thank you. |
I'm not sure how to best handle this. At first I was going to modify the install script for this, but would that affect uninstall? If we use the url/url64, then it'll install x64 by default, which may not be what we want to do either. chocolateyinstall.ps1
$ErrorActionPreference = 'Stop'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$packageArgsX86 = @{
packageName = $env:ChocolateyPackageName
unzipLocation = $toolsDir
fileType = 'EXE'
url = 'https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/b87a52b9-351d-4b15-af14-70a878199712/MicrosoftEdgeWebView2RuntimeInstallerX86.exe'
softwareName = 'Microsoft Edge WebView2*'
checksum = '0ECB676812C9372A14203E3949394DF3CA736E4E8D3F2784767154AB32572EEF'
checksumType = 'sha256'
silentArgs = '/silent /install'
validExitCodes= @(0)
}
$packageArgsX64 = @{
packageName = $env:ChocolateyPackageName
unzipLocation = $toolsDir
fileType = 'EXE'
url = 'https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/fa577566-d918-4acc-ad0d-d81c60c9d6ba/MicrosoftEdgeWebView2RuntimeInstallerX64.exe'
softwareName = 'Microsoft Edge WebView2*'
checksum = '06C56C8E4D03D59ADF12B173DA81BEBDCB6A688449DE7E8402ED39CB4709B327'
checksumType = 'sha256'
silentArgs = '/silent /install'
validExitCodes= @(0)
}
Install-ChocolateyPackage @packageArgsX86
Install-ChocolateyPackage @packageArgsX64 I noticed that the icon is 117x117 px, and of course the Choco recommended size is at least 128x128 px. Here is an svg you could use.
Here's how Also noticed that |
Installing both x86 and x85 of 125.0.2535.67From my testing, you cannot have both the x86 and x64 versions of the software installed (I created a new branch) If you have the package installed with Note the installer being downloaded is the x86 one (emphasis mine):
You can find out what is installed using the Chocolatey helper (Note the If you then install the package again (to use your architecture specific version - in my case x64) using Note the installer being downloaded is the x64 one (emphasis mine):
Using the Chocolatey helper Notice the I'm going to try to install the older version (which will install x86) and then try to do an upgrade (which will use the x64 installer) and see what happens. |
Upgrade from 125.0.2535.541 x86 to 125.0.2535.67 x64I installed the latest version from the chocolatey Community Repository (which is currently 125.0.2535.51 (I forgot to take a screenshot of that before rebooting the VM). But I did grab the text of the output of
Note the Running And
Note the new version number and |
Installing 125.0.2535.67 x64
Note the |
The questions I'm left with are:
@dandudley you raised issue #195 so I'm hoping that you may also be able to help with the questions above? Until I understand more about what the installers are doing, I'm going to put this on hold. |
Thanks for for checking this out. I'm out of town but will look at it closer on Tuesday. Preliminary Googling shows a possible answer of x86 and x64 being installed when x64 is installed, but not sure. Given the other facts this may be the case. Will let you know. |
I'll pull on that thread for a bit. If that is the case then all the fancy code I was going to put in to detect if x86 version was already installed, is not needed! |
From this GitHub issue:
On that basis, the updated package in the branch should work as expected and won't cause issues for anybody who already has a previous (x86) version installed (which is my biggest concern). As the new version has been published today, we have a bit of time to sort this out before the next version is likely to be released. So I'll wait to hear back before moving forward. |
Alright I just had some time to test this out (almost 3 AM now!!!) Downloading WebView2 from: https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section I created the following builds of the same application (
This is the target CPU area of Visual Studio, as referenced above. Under application properties > Compile. MessagesForWeb x86Installed MessagesForWeb x64Installed MessagesForWeb AnyCPU (prefer 32-bit)Installed Installed MessageForWeb AnyCPU
Tested using Windows Sandbox along with various builds of MessagesForWeb. Here are the compiled builds in ZIP format but you can compile from source if you prefer. Note that even though there are 'runtimes' in each build, you still have to install WebView2 for the machine for the application to run. The application opens after installing. If it runs successfully, you should see a QR code appear. Note that the application closes to a system tray icon. Right-click on the icon and exit to exit. In summary, when using x86 or x64 targeted builds, using either the x86 or x64 installer of WebView2 appears to run the application as expected. Therefore we can assume that the x86 may install (or allow to work) the x64 version. However, if the application targets AnyCPU or AnyCPU (prefer 32-bit), the application may need to be restarted before it will run. I tried replicating this a few times and got mixed results. I think there may be a delay in registering some of the components which is why it sometimes doesn't work at first. When I originally opened this issue, this type of 'blank canvas' situation is exactly what I had happen with some of my WebView2 apps. Except 3 of the apps had the same thing happen. I even experienced the issue with lencx/ChatGPT which isn't mine and not built using Visual Studio (but still uses WebView2). Was finally able to fix everything after I tried some fenagling to repair/reinstall. My gut feeling tells me this is some type of upgrade bug or component registration delay. Long story short, it does appear that x86 or x64 will work with each other, although to me it seems that x64 should be the default option as all modern machines are 64-bit. I think we're good since everything does eventually work but may require a few application restarts. Hope this helps! |
@asheroto that is awesome. Thank you for such a thorough test. I've added a note to the package description and pointed it to your comment. I've also merged the branch in with the changes. |
Happy to help! Excellent idea on the package description. That should clear up any oddball situations, I hope! 😊 Also I appreciate your responsiveness. |
Checklist
(<PACKAGENAME>) <ISSUE SUMMARY>
.Chocolatey Version
2.2.2
Chocolatey License
None
Package Version
125.0.2535.51
Current Behaviour
I started having issues with WebView2. Wasn't sure what happened. Then I realized that Chocolatey had updated WebView2, but my x64 installation was not actually updated. After updating manually with x64, my WebView2 programs began to function again. It appears that if you only update the x86 and you have an application that targets x64 CPUs, then those programs may break, so both must be installed.
Upon checking the install script, I found that only the x86 package is installed via Choco. Maybe they only had an x86 package to begin with, not sure. Now several architectures are supported.
The Evergreen Standalone installer section is what we're after:
https://developer.microsoft.com/en-us/microsoft-edge/webview2?ch=1&form=MA13LH#download
You could use the Bootstrapper, but then the checksum will change when Microsoft updates it, of course.
Expected Behaviour
Install x86 and x64 as Windows 10/11 supports both, or x64 by default and make available the
--forcex86
param.https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/fa577566-d918-4acc-ad0d-d81c60c9d6ba/MicrosoftEdgeWebView2RuntimeInstallerX64.exe
Steps To Reproduce
Environment
Chocolatey Log
Anything else?
I will submit a PR to assist.
The text was updated successfully, but these errors were encountered: