microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.36k stars 1.45k forks source link

The update process fails although the package was successfully updated. #4550

Open ne-tlw opened 5 months ago

ne-tlw commented 5 months ago

Brief description of your issue

Winget Log file shows that a package has been successfully installed. In the next line, the installation is marked as failed and a new installation of the package (instead of the update) is attempted. Here are three examples. The issue occurs with packages of all kind but not with all packages. Three examples attached. Actually, the update has been finished successfully.

Steps to reproduce

Winget upgrade --id KeePassXCTeam.KeePassXC --accept-package-agreements --accept-source-agreements -h Winget upgrade --id TeamViewer.TeamViewer --accept-package-agreements --accept-source-agreements -h Winget upgrade --id Microsoft.EdgeWebView2Runtime --accept-package-agreements --accept-source-agreements -h

Expected behavior

Upgrade finshed successfully.

Actual behavior

Upgrade fails and Winget tries to upgrade packages at every run.

08:12:23 - Updating KeePassXC from 2.7.7 to 2.7.8... 08:12:23 - ########## WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID 'KeePassXCTeam.KeePassXC' ########## 08:12:23 - -> Running: Winget upgrade --id KeePassXCTeam.KeePassXC --accept-package-agreements --accept-source-agreements -h Successfully installed 08:13:18 - -> An upgrade for KeePassXC failed, now trying an install instead... 08:13:18 - -> Running: Winget install --id KeePassXCTeam.KeePassXC --accept-package-agreements --accept-source-agreements --force -h Successfully installed 08:13:34 - ########## WINGET UPGRADE PROCESS FINISHED FOR APPLICATION ID 'KeePassXCTeam.KeePassXC' ########## 08:13:34 - KeePassXC update failed

08:08:15 - Updating TeamViewer from 15.53.6 to 15.53.7... 08:08:15 - ########## WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID 'TeamViewer.TeamViewer' ########## 08:08:15 - -> Running: Winget upgrade --id TeamViewer.TeamViewer --accept-package-agreements --accept-source-agreements -h Successfully installed 08:09:29 - -> An upgrade for TeamViewer failed, now trying an install instead... 08:09:29 - -> Running: Winget install --id TeamViewer.TeamViewer --accept-package-agreements --accept-source-agreements --force -h Successfully installed 08:10:47 - ########## WINGET UPGRADE PROCESS FINISHED FOR APPLICATION ID 'TeamViewer.TeamViewer' ########## 08:10:47 - TeamViewer update failed.

08:10:48 - Updating Microsoft Edge WebView2-Laufzeit from 124.0.2478.80 to 124.0.2478.97... 08:10:48 - ########## WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID 'Microsoft.EdgeWebView2Runtime' ########## 08:10:48 - -> Running: Winget upgrade --id Microsoft.EdgeWebView2Runtime --accept-package-agreements --accept-source-agreements -h 08:10:52 - -> An upgrade for Microsoft Edge WebView2-Laufzeit failed, now trying an install instead... 08:10:52 - -> Running: Winget install --id Microsoft.EdgeWebView2Runtime --accept-package-agreements --accept-source-agreements --force -h Successfully installed 08:12:03 - ########## WINGET UPGRADE PROCESS FINISHED FOR APPLICATION ID 'Microsoft.EdgeWebView2Runtime' ########## 08:12:03 - Microsoft Edge WebView2-Laufzeit update failed.

Environment

Windows-Paket-Manager v1.7.11261
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.19045.4412
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.22.11261.0

WinGet-Verzeichnisse
-----------------------------------------------------------------------------------------------------------------------------------------
Protokolle                                   %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
Benutzereinstellungen                        %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Verzeichnis für portierbare Links (Benutzer) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portables Linkverzeichnis (Computer)         C:\Program Files\WinGet\Links
Portierbarer Paketstamm (Benutzer)           %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portierbarer Paketstamm                      C:\Program Files\WinGet\Packages
Portierbares Paketstamm (x86)                C:\Program Files (x86)\WinGet\Packages
Installationsprogrammdownloads               %USERPROFILE%\Downloads

Links
-----------------------------------------------------------------------------------------
Datenschutzerklärung              https://aka.ms/winget-privacy
Lizenzvereinbarung                https://aka.ms/winget-license
Hinweise von Drittanbietern       https://aka.ms/winget-3rdPartyNotice
Startseite                        https://aka.ms/winget
Windows Store-Nutzungsbedingungen https://www.microsoft.com/en-us/storedocs/terms-of-sale

Administratoreinstellung                  Status
-----------------------------------------------------
LocalManifestFiles                        Deaktiviert
BypassCertificatePinningForMicrosoftStore Deaktiviert
InstallerHashOverride                     Deaktiviert
LocalArchiveMalwareScanOverride           Deaktiviert
github-actions[bot] commented 5 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

ne-tlw commented 5 months ago

https://github.com/microsoft/winget-cli/issues/1075

stephengillie commented 5 months ago

1075

I'm not sure that it's the same situation - that appears to be the "upgrade always available" situation, while this is a successful install that's reported as a failure.

I've seen and approved several of these, probably all 3 reported here. I haven't been sure what to do, when the application is working, but the package manager reports a failure, without giving a clear indication of what failed.

denelon commented 5 months ago

I'm not sure if this is an issue with WinGet. I'm suspicious these installers might not be correctly reporting the information to the registry for Apps and Features version, or something might be running which interferes. If I could get a solid reproduction process, it would be easier to verify.