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

winget upgrade --all gets cancelled if winget needs to be updated #4283

Open
sba923 opened this issue Mar 18, 2024 · 6 comments
Open

winget upgrade --all gets cancelled if winget needs to be updated #4283

sba923 opened this issue Mar 18, 2024 · 6 comments
Labels
Command-Upgrade Issue related to WinGet Upgrade Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@sba923
Copy link

sba923 commented Mar 18, 2024

Brief description of your issue

If winget upgrade --all is run and winget needs upgrading, the whole command is aborted.

Steps to reproduce

On a system where winget v1.22.10582.0 is install, run winget upgrade --all.

The upgrade process will start, then abort after reaching winget.

Expected behavior

winget should either update itself last, or defer the update after the whole command has been run. Or even better: update itself first, then proceed with the rest of the updates.

Actual behavior

PS> winget upgrade --all; Remove-UselessDesktopShortcuts.ps1
Name                                              Id                                Version       Available      Source
-----------------------------------------------------------------------------------------------------------------------
Creative App version 1.16.15.00                   CreativeTechnology.CreativeApp    1.16.15.00    1.16.16.00     winget
FileMenu Tools 8.4                                LopeSoft.FileMenuTools            8.4           8.4.1          winget
KDiff3                                            KDE.KDiff3                        1.10.6        1.10.7         winget
MKVToolNix 82.0.0 (64-bit)                        MoritzBunkus.MKVToolNix           82.0.0        83.0.0         winget
MediaInfo 23.11                                   MediaArea.MediaInfo.GUI           23.11         24.01          winget
App Installer                                     Microsoft.AppInstaller            1.22.10582.0  1.22.10661.0   winget
WinDbg                                            Microsoft.WinDbg                  1.2308.2002.0 1.2402.24001.0 winget
Oh My Posh version 19.11.7                        JanDeDobbeleer.OhMyPosh           19.11.7       19.17.2        winget
iMazing                                           DigiDNA.iMazing                   2.17.17.0     2.17.18.0      winget
Microsoft .NET SDK 6.0.419 (x64)                  Microsoft.DotNet.SDK.6            6.0.419       6.0.420        winget
Microsoft .NET SDK 6.0.321 (x64)                  Microsoft.DotNet.SDK.6            6.0.321       6.0.420        winget
Microsoft Visual C++ 2015-2022 Redistributable (… Microsoft.VCRedist.2015+.x86      14.38.33135.0 14.40.33617.1  winget
Microsoft Visual Studio Code (User)               Microsoft.VisualStudioCode        1.87.0        1.87.2         winget
Microsoft .NET SDK 7.0.203 (x64)                  Microsoft.DotNet.SDK.7            7.0.203       7.0.407        winget
Go Programming Language amd64 go1.22.0            GoLang.Go                         1.22.0        1.22.1         winget
MobaXterm                                         Mobatek.MobaXterm                 23.6.0.5186   24.0.0.5204    winget
Microsoft .NET SDK 7.0.314 (x64)                  Microsoft.DotNet.SDK.7            7.0.314       7.0.407        winget
PowerToys (Preview) x64                           Microsoft.PowerToys               0.78.0        0.79.0         winget
Microsoft Visual C++ 2015-2022 Redistributable (… Microsoft.VCRedist.2015+.x64      14.38.33135.0 14.40.33617.1  winget
Microsoft Windows Desktop Runtime - 6.0.27 (x64)  Microsoft.DotNet.DesktopRuntime.6 6.0.27        6.0.28         winget
Microsoft Windows Desktop Runtime - 6.0.27 (x86)  Microsoft.DotNet.DesktopRuntime.6 6.0.27        6.0.28         winget
Microsoft .NET SDK 7.0.313 (x64)                  Microsoft.DotNet.SDK.7            7.0.313       7.0.407        winget
Microsoft Windows Desktop Runtime - 7.0.16 (x64)  Microsoft.DotNet.DesktopRuntime.7 7.0.16        7.0.17         winget
23 upgrades available.
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
1 package(s) have pins that prevent upgrade. Use the 'winget pin' command to view and edit pins. Using the --include-pinned argument may show more results.

Installing dependencies:
This package requires the following dependencies:
  - Packages
      Microsoft.UI.Xaml.2.8 [>= 8.2310.30001.0]
(1/19) Found Creative App [CreativeTechnology.CreativeApp] Version 1.16.16.00
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://files.creative.com/creative/bin/apps/swureleases/win/creativeapp/release/CreativeAppSetup_1.16.16.00.exe
  ██████████████████████████████  76.7 MB / 76.7 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(2/19) Found FileMenu Tools [LopeSoft.FileMenuTools] Version 8.4.1
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://www.lopesoft.com/fmtools/FileMenuTools-setup.exe
  ██████████████████████████████  11.6 MB / 11.6 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(3/19) Found KDiff3 [KDE.KDiff3] Version 1.10.7
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://download.kde.org/stable/kdiff3/kdiff3-1.10.7-windows-x86_64.exe
  ██████████████████████████████  66.8 MB / 66.8 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(4/19) Found MKVToolNix [MoritzBunkus.MKVToolNix] Version 83.0.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.
Downloading https://mkvtoolnix.download/windows/releases/83.0/mkvtoolnix-64-bit-83.0-setup.exe
  ██████████████████████████████  25.3 MB / 25.3 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(5/19) Found MediaInfo [MediaArea.MediaInfo.GUI] Version 24.01
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://mediaarea.net/download/binary/mediainfo-gui/24.01.1/MediaInfo_GUI_24.01.1_Windows.exe
  ██████████████████████████████  6.33 MB / 6.33 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(6/19) Found App Installer [Microsoft.AppInstaller] Version 1.22.10661.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...
  ████████████████████████████▌   95%
Successfully installed. Restart the application to complete the upgrade.

Cancelled
22 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.

Environment

Windows Package Manager v1.7.10661
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3235
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10661.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
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                %USERPROFILE%\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

(version info is obviously not the version that was in effect when the problem occurred)
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Mar 18, 2024

This comment was marked as off-topic.

@denelon
Copy link
Contributor

denelon commented Mar 19, 2024

After running the command, what are the results of winget -v? This behavior appears to be working correctly. I routinely upgrade WinGet like this, and the rest of the upgrades that can succeed, will succeed.

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Mar 19, 2024
@sba923
Copy link
Author

sba923 commented Mar 19, 2024

I hate to say, but I can't repro right now since winget doesn't need to be updated anymore....

@denelon denelon added the Command-Upgrade Issue related to WinGet Upgrade label Mar 29, 2024
@sba923
Copy link
Author

sba923 commented Mar 30, 2024

Repro'ed today:

PS> winget upgrade --all
Name                             Id                                Version       Available     Source
-----------------------------------------------------------------------------------------------------
AutoHotkey                       AutoHotkey.AutoHotkey             2.0.11        2.0.12        winget
HWiNFO64                         REALiX.HWiNFO                     7.72          8.00          winget
Microsoft Edge                   Microsoft.Edge                    122.0.2365.92 123.0.2420.65 winget
App Installer                    Microsoft.AppInstaller            1.22.10661.0  1.22.10861.0  winget
Dev Home (Preview)               Microsoft.DevHome                 0.1101.416.0  0.1201.442.0  winget
Windows Terminal Preview         Microsoft.WindowsTerminal.Preview 1.20.10572.0  1.20.10822.0  winget
Windows Terminal                 Microsoft.WindowsTerminal         1.19.10573.0  1.19.10821.0  winget
Mozilla Firefox (x64 cs)         Mozilla.Firefox                   123.0.1       124.0.1       winget
Oh My Posh version 19.18.0       JanDeDobbeleer.OhMyPosh           19.18.0       19.18.1       winget
Ubisoft Connect                  Ubisoft.Connect                   150.1.11037   151.1.0.11048 winget
Vim 9.1 (x64)                    vim.vim                           9.1.0104      9.1.0211      winget
Microsoft .NET SDK 6.0.321 (x64) Microsoft.DotNet.SDK.6            6.0.321       6.0.420       winget
Logi Options+                    Logitech.OptionsPlus              1.66.531337   1.68.542186   winget
Microsoft .NET SDK 7.0.203 (x64) Microsoft.DotNet.SDK.7            7.0.203       7.0.407       winget
Wireshark                        WiresharkFoundation.Wireshark     4.2.3.0       4.2.4         winget
Microsoft .NET SDK 7.0.314 (x64) Microsoft.DotNet.SDK.7            7.0.314       7.0.407       winget
16 upgrades available.
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
1 package(s) have pins that prevent upgrade. Use the 'winget pin' command to view and edit pins. Using the --include-pinned argument may show more results.

Installing dependencies:
This package requires the following dependencies:
  - Packages
      Microsoft.UI.Xaml.2.8 [>= 8.2310.30001.0]
      Microsoft.WindowsAppRuntime.1.5
(1/14) Found AutoHotkey [AutoHotkey.AutoHotkey] Version 2.0.12
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/AutoHotkey/AutoHotkey/releases/download/v2.0.12/AutoHotkey_2.0.12_setup.exe
  ██████████████████████████████  2.86 MB / 2.86 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(2/14) Found HWiNFO [REALiX.HWiNFO] Version 8.00
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://sourceforge.net/projects/hwinfo/files/Windows_Installer/hwi64_800.exe/download
  ██████████████████████████████  12.6 MB / 12.6 MB
Successfully verified installer hash
Starting package install...
Successfully installed

(3/14) Found App Installer [Microsoft.AppInstaller] Version 1.22.10861.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...
  ████████████████████████████▌   95%
Successfully installed. Restart the application to complete the upgrade.

Cancelled
22 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.

winget -v now returns v1.7.10861

@denelon is there anything you want me to check before running winget upgrade --all again, restarting the machine, ...?

here are today's logs up to the repro: wingetlogs20240330.zip

@dmitrybarabash
Copy link

I encountered the same problem today on my work laptop. winget -v returns v1.7.10861.

At the same time, on the other laptop, everything upgraded fine and winget -v returns v1.7.11132.

@sba923
Copy link
Author

sba923 commented Apr 27, 2024

Occured on my three Windows 11 boxes with the latest update:

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Upgrade Issue related to WinGet Upgrade Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

3 participants