microsoft / microsoft/winget-cli

'winget upgrade --all' hangs

Open
#5,119 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Upgrade Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

'winget upgrade --all' hangs (even if there are no packages to update), nothing happens after the initial output:

 ~#@❯ winget upgrade --all
Es wurde kein installiertes Paket gefunden, das den Eingabekriterien entspricht.
1 Pakete verfügen über Pins, die ein Upgrade verhindern. Verwenden Sie den Befehl "winget pin", um Pins anzuzeigen und zu bearbeiten. Wenn Sie das --include-pinned-Argument verwenden, werden möglicherweise weitere Ergebnisse angezeigt.

The logs contains a lot of the following sequences:

2025-01-08 16:45:51.322 [REPO] ... opening existing pinning database
2025-01-08 16:45:51.322 [REPO] Opening database for Read at 'C:\Users\xxx\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db'
2025-01-08 16:45:51.322 [REPO] Opened Pinning Index with version [1.0], last write [2024-12-06 19:07:50.000]
2025-01-08 16:45:51.322 [CLI ] Terminating context: 0x8a15002b at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:be
Steps to reproduce

winget upgrade --all

Expected behavior

The command should update all outdated packages and complete afterwards

Actual behavior

The command does not return.

Environment
~#@❯ winget --info
    Windows-Paket-Manager (Vorschau) v1.10.40-preview
    Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.22631.4460
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.25.40.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
ProxyCommandLineOptions                   Deaktiviert
DefaultProxy                              Deaktiviert

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the termination path reported in external/pkg/src/AppInstallerCLICore/Workflows/UpdateFlow.cpp and reproduce the hang with winget upgrade --all on the stated environment. Trace why the command does not return after the no-updates and pinned-packages output; done means the command completes and preserves the expected upgrade behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.