Skip to content
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

[Problem/Bug]: Upgrading using Chocolatey broken #4581

Open
JensGJ opened this issue May 22, 2024 · 3 comments
Open

[Problem/Bug]: Upgrading using Chocolatey broken #4581

JensGJ opened this issue May 22, 2024 · 3 comments
Assignees
Labels
bug Something isn't working regression Something used to work but doesn't anymore

Comments

@JensGJ
Copy link

JensGJ commented May 22, 2024

What happened?

For several months the upgrade of Webview2 has failed due to a checksum error. The maintainer of the package at Chocolatey claims that this is a vendor issue so it cannot be fixed in the package.

I would like to keep my version of the webview2 runtime updated using the Chocolatey package manager - just as I do with the +100 other packages I have installed with Chocolatey. So now I try to reach out to you hoping that you will be able to make a change that can get the webview2 package running smoothly within the Chocolatey ecosystem again.

You can see the package managers pinned comment about the issue here:
http://disq.us/p/2ye5dur

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

125.0.2535.51

SDK Version

No response

Framework

Other

Operating System

Windows 11

OS Version

10.0.22621.0

Repro steps

> choco upgrade webview2-runtime -y
Chocolatey v2.2.2
3 validations performed. 2 success(es), 1 warning(s), and 0 error(s).

Validation Warnings:

  • System Cache directory is not locked down to administrators.
    Remove the directory 'C:\ProgramData\ChocolateyHttpCache' to have
    Chocolatey CLI create it with the proper permissions.

Upgrading the following packages:
webview2-runtime
By upgrading, you accept licenses for the packages.

You have webview2-runtime v122.0.2365.80 installed. Version 123.0.2420.81 is available based on your source(s).
[NuGet] One or more unresolved package dependency constraints detected in the Chocolatey lib folder. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'rdm 2024.1.29 constraint: webview2-runtime (>= 120.0.0)'
Progress: Downloading webview2-runtime 123.0.2420.81... 100%

webview2-runtime v123.0.2420.81 [Approved]
webview2-runtime package files upgrade completed. Performing other installation steps.
File appears to be downloaded already. Verifying with package checksum to determine if it needs to be redownloaded.
Hashes match.
Hashes match.
Installing webview2-runtime...
ERROR: Running ["C:\Users\jgj.it\AppData\Local\Temp\chocolatey\webview2-runtime\123.0.2420.81\MicrosoftEdgeWebView2RuntimeInstallerX86.exe" /silent /install ] was not successful. Exit code was '-2147219187'. See log for possible error messages.
The upgrade of webview2-runtime was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\webview2-runtime\tools\chocolateyinstall.ps1'.
See log for details.

Chocolatey upgraded 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

  • webview2-runtime (exited -2147219187) - Error while running 'C:\ProgramData\chocolatey\lib\webview2-runtime\tools\chocolateyinstall.ps1'.
    See log for details.`

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Regression in newer Runtime

Last working version (if regression)

122.0.2365.80

@JensGJ JensGJ added the bug Something isn't working label May 22, 2024
@github-actions github-actions bot added the regression Something used to work but doesn't anymore label May 22, 2024
@LiangTheDev
Copy link
Member

The error code shown above is '-2147219187', which should mean "Higher version already installed.". As the note for the package states "This is an automatically updated package.", there is no need to manually update the package.

For the issue of version of the setup file not updated while its payload changes, it is a known issue. I'll contact Edge deployment team to see whether they are open to make changes.

Some details, there are actually 2 products in the setup file: the Edge Update that does the install/auto update of Edge WebView2 Runtime, and the Edge WebView2 Runtime offline payload. The version of the setup file is currently set to the version of Edge Update. As the version of Edge Update itself does not changed as often as WebView2 Runtime, the version of the setup file doesn't change while WebView2 Runtime payload changes.

FWIW, WebView2 Runtime is included as part of the operating system for Windows 11 and there is no need to install it.

@JensGJ
Copy link
Author

JensGJ commented May 23, 2024

Thanks for the reply.

I tried to uninstall the package - but it fails due to a dependency from another package that I use (rdm). I can work around the issue by pinning the webview2-runtime package which will instruct Chocolatey to exclude the package from updates or continue to accept that the webview2 package as the only one of my currently 154 installed packages produces and error when I run my update script.

I hope that at some point the issue will be solved.

@LiangTheDev
Copy link
Member

As WebView2 Runtime will auto update by itself and it is updated roughly every week, it is very likely that any version that you got from the package is out dated and you would hit this "Higher version already installed." error if you try to install it. Excluding the package from updates might be always necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Something used to work but doesn't anymore
Projects
None yet
Development

No branches or pull requests

4 participants