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
22.5k stars 1.39k forks source link

wiinget always fails to update windows terminal #4530

Open sedan-cell opened 3 weeks ago

sedan-cell commented 3 weeks ago

Brief description of your issue

winget knows to update windows terminal but fails every time it tries without removing windows terminal from the list of updates

Steps to reproduce

  1. winget update --all with windows terminal installed
  2. view output

Expected behavior

windows terminal and dependencies properly updated

Actual behavior

winget always reports an error trying to update windows terminal yet it shows up every day.

> winget update --all
Name             Id                        Version      Available    Source
---------------------------------------------------------------------------
Windows Terminal Microsoft.WindowsTerminal 1.19.11213.0 1.20.11271.0 winget
1 upgrades available.

Installing dependencies:
This package requires the following dependencies:
  - Packages
      Microsoft.UI.Xaml.2.8 [>= 8.2306.22001.0]
(1/1) Found Windows Terminal [Microsoft.WindowsTerminal] Version 1.20.11271.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Starting package install...
Installer failed with exit code: 0x80072efd : unknown error

logs:

2024-06-03 08:21:15.963 [REPO] Opened Pinning Index with version [1.0], last write [2023-09-11 09:45:11.000]
2024-06-03 08:21:16.616 [CLI ] Installer hash verified
2024-06-03 08:21:17.044 [CORE] Starting StagePackageAsync operation #0: https://github.com/microsoft/terminal/releases/download/v1.20.11271.0/Microsoft.WindowsTerminal_1.20.11271.0_8wekyb3d8bbwe.msixbundle
2024-06-03 08:21:17.045 [CORE] Begin waiting for operation #0
2024-06-03 08:21:17.045 [CORE] Begin blocking for operation #0
2024-06-03 08:21:17.121 [CORE] Deployment operation #0: Deployment operation failed.
2024-06-03 08:21:17.121 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFBAFF7BC4F: (caller: 00007FFBAFF7CA60) Exception(12) tid(3968) 80072EFD     Msg:[Operation failed: Deployment operation failed.] 

2024-06-03 08:21:17.121 [CORE] Starting RemovePackage operation #1: Microsoft.WindowsTerminal_3001.20.11271.0_neutral_~_8wekyb3d8bbwe
2024-06-03 08:21:17.125 [CORE] Begin waiting for operation #1
2024-06-03 08:21:17.125 [CORE] Begin blocking for operation #1
2024-06-03 08:21:17.143 [CORE] Deployment operation #1: Windows cannot remove Microsoft.WindowsTerminal_3001.20.11271.0_neutral_~_8wekyb3d8bbwe because the current user does not have that package installed. Use Get-AppxPackage to see the list of packages installed.
2024-06-03 08:21:17.143 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFBAFF7BC4F: (caller: 00007FFBAFF7D24C) Exception(13) tid(3968) 80073CF1 Package was not found.
    Msg:[Operation failed: Windows cannot remove Microsoft.WindowsTerminal_3001.20.11271.0_neutral_~_8wekyb3d8bbwe because the current user does not have that package installed. Use Get-AppxPackage to see the list of packages installed.] 

2024-06-03 08:21:17.143 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(126)\WindowsPackageManager.dll!00007FFBB01087B1: (caller: 00007FFBAFF7EB03) LogHr(1) tid(3968) 80073CF1 Package was not found.
    Msg:[C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFBAFF7BC4F: (caller: 00007FFBAFF7D24C) Exception(13) tid(3968) 80073CF1 Package was not found.
    Msg:[Operation failed: Windows cannot remove Microsoft.WindowsTerminal_3001.20.11271.0_neutral_~_8wekyb3d8bbwe because the current user does not have that package installed. Use Get-AppxPackage to see the list of packages installed.] 
] 

2024-06-03 08:21:17.218 [CLI ] MSIX installer failed: 2147954429
2024-06-03 08:21:17.218 [CLI ] Terminating context: 0x80072efd at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\InstallFlow.cpp:21d
2024-06-03 08:21:17.218 [CLI ] Terminating context: 0x8a15002c at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\InstallFlow.cpp:319

Get-AppxPackage does show:

RunspaceId             : f662712b-ddcc-4fbb-9f09-6efd09a82096
Name                   : Microsoft.WindowsTerminal
Publisher              : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
PublisherId            : 8wekyb3d8bbwe
Architecture           : X64
ResourceId             :
Version                : 1.19.11213.0
PackageFamilyName      : Microsoft.WindowsTerminal_8wekyb3d8bbwe
PackageFullName        : Microsoft.WindowsTerminal_1.19.11213.0_x64__8wekyb3d8bbwe
InstallLocation        : C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.19.11213.0_x64__8wekyb3d8bbwe
IsFramework            : False
PackageUserInformation : {}
IsResourcePackage      : False
IsBundle               : False
IsDevelopmentMode      : False
NonRemovable           : False
Dependencies           : {Microsoft.UI.Xaml.2.8_8.2310.30001.0_x64__8wekyb3d8bbwe}
IsPartiallyStaged      : False
SignatureKind          : Store
Status                 : Ok

so it is installed and winget knows to update but fails every time

Environment

> winget --info
Windows Package Manager v1.7.11261
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3593
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.11261.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                D:\Users\MYUSER\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
github-actions[bot] commented 3 weeks 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.

stephengillie commented 2 weeks ago

Automated error analysis suggests

I'm not entirely sure of the cause, but it seems to involve an issue creating a network connection.