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-CLI Issue - winget upgrade Not Showing Results #5202

Closed
davidldennison opened this issue Feb 13, 2025 · 5 comments · Fixed by #5204
Closed

Winget-CLI Issue - winget upgrade Not Showing Results #5202

davidldennison opened this issue Feb 13, 2025 · 5 comments · Fixed by #5204
Labels
In-PR Issue related to a PR Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@davidldennison
Copy link

Brief description of your issue

When running:

winget source update --verbose && winget upgrade --include-unknown --include-pinned --verbose

the command initially shows available upgrades. However, after subsequent executions, no results are displayed, even though no updates were performed in between. Running winget source update --verbose does not resolve the issue.

Updates were not performed in between running "winget upgrade" commands, so they should still appear - however they do not.

Extensive logs and system diagnostics can be found on the Microsoft Feedback Hub here: https://aka.ms/AAug4te

Image

Steps to reproduce

  1. Run: winget source update --verbose && winget upgrade --include-unknown --include-pinned --verbose
  2. The first execution correctly lists available updates.
  3. Run the same command again without installing any updates.
  4. No upgrade results appear, despite multiple attempts and source updates.

Expected behavior

winget upgrade should consistently display available upgrades whenever updates are detected.

Actual behavior

After one or two successful runs, winget upgrade intermittently fails to list any upgradeable packages, even though they should still be available.

Environment

Windows 11 Canary Insider Program - Build 27788.rs_prerelease.250131-1609

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

Windows: Windows.Desktop v10.0.27788.1000
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.25.280.0

Winget Directories
---------------------------------------------------------------------------------------------------------------------------------------------
Logs                               C:\Users\david\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      C:\Users\david\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    C:\Users\david\AppData\Local\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       C:\
Portable Package Root              C:\
Portable Package Root (x86)        C:\
Installer Downloads                C:\Users\david\Downloads
Configuration Modules              C:\Users\david\AppData\Local\Microsoft\WinGet\Configuration\Modules

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


Group Policy                                                       State
--------------------------------------------------------------------------
Enable Windows Package Manager                                     Enabled
Enable Windows Package Manager Settings                            Enabled
Enable Windows App Installer Experimental Features                 Enabled
Enable Windows App Installer Local Manifest Files                  Enabled
Enable Windows App Installer Hash Override                         Enabled
Enable Windows App Installer Local Archive Malware Scan Override   Enabled
Enable Windows Package Manager command line interfaces             Enabled
Enable Windows Package Manager Configuration                       Enabled
Set Windows Package Manager Source Auto Update Interval In Minutes 5

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Enabled
LocalArchiveMalwareScanOverride           Enabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Feb 13, 2025
@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 Feb 13, 2025
@davidldennison
Copy link
Author

I downgraded to the most recent previous version, and the error still occurs. I just installed the latest release, and also getting the same error. In Reliability Monitor I get the following:

Source
winget.exe

Summary
Stopped working

Date
‎2/‎13/‎2025 6:01 PM

Status
Report sent

Description
Faulting Application Path: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.25.300.0_x64__8wekyb3d8bbwe\winget.exe

Problem signature
Problem Event Name: MoAppCrash
Package Full Name: Microsoft.DesktopAppInstaller_1.25.300.0_x64__8wekyb3d8bbwe
Application Name: praid:winget
Application Version: 1.25.300.0
Application Timestamp: 67ad46c9
Fault Module Name: WindowsPackageManager.dll
Fault Module Version: 1.25.300.0
Fault Module Timestamp: 67ad46c3
Exception Code: c0000005
Exception Offset: 00000000003a62c3
OS Version: 10.0.27788.2.0.0.256.48
Locale ID: 1033
Additional Information 1: 7435
Additional Information 2: 74352c7811dbe68ba449ea367911d8ef
Additional Information 3: 41a3
Additional Information 4: 41a3052d9136562fc4ea3d27d46c9e6f

Files that help describe the problem (some files may no longer be available)
minidump.mdmp
WERInternalMetadata.xml
WPR_initiated_DiagTrackMiniLogger_OneTrace_User_Logger_20240808_1_EC_0_inject.etl
WPR_initiated_DiagTrackMiniLogger_OneTrace_User_Logger_20240808_1_EC_0.etl
WPR_initiated_DiagTrackMiniLogger_WPR System Collector_inject.etl
WPR_initiated_DiagTrackMiniLogger_WPR System Collector.etl
memory.csv
sysinfo.txt
WERInternalRequest.xml
AppCompat.txt
WERDataCollectionStatus.txt

Extra information about the problem
Bucket ID: 3d9d18f547f167d401c236bfba3ce92b (1279645441217849643)

What's weird is that if I run an upgrade command directly such as winget upgrade "Microsoft.DotNet.SDK.5" it will perform the upgrade and install.

@denelon as of right now, I can't run any winget upgrade commands or see what's available to update. Variations of winget list --upgrade-available also fail and winget stops working. Would there be a work around you can think of in the meantime? Also, would it be helpful to upload copies of the "temporary files" from Reliability Monitor to the Feedback Hub, or is what I provided sufficient?

It seems there has been an increase in bugs lately, so trying to be as helpful and provide as much as I can for you!

@JohnMcPMS
Copy link
Member

Thank you for using Feedback Hub, it made it much easier to find the issue via the crash reporting infrastructure.

Yes, this bug has been around for a while, but for some reason has only recently started happening. It is dependent on both your local state and the various available package data.

I'm not sure of the exact package(s) that could be leading to this for you, but you may be less likely to hit the issue if you provide a specific source to update from, like winget upgrade -s winget. Iterating over all of your sources this way will be similar to the upgrade you are running (it just won't prefer the latest place you installed something from).

It is strange that it started hitting the crash without anything new being installed on your machine. The crash report that I ultimately dug into (which was not yours) to find the bug indicated Microsoft.PowerShell was related, and the code in question deals with handling multiple installed versions. If you have multiple versions of anything installed and don't need the older ones, removing them may help.

JohnMcPMS added a commit that referenced this issue Feb 14, 2025
Fixes #5202 

## Change
When moving the primary package to a new location, update the index so
any future attempts to reference it target the correct location.
JohnMcPMS added a commit to JohnMcPMS/winget-cli that referenced this issue Feb 14, 2025
Fixes microsoft#5202 

## Change
When moving the primary package to a new location, update the index so
any future attempts to reference it target the correct location.
@davidldennison
Copy link
Author

Here is a list of all the commands I ran from the last winget install up until it didn't work anymore:

2856  winget install -e --id Kubernetes.kubectl
 2857  kubectl version --client
 2858  cd ~
 2859  cd C:\Users\david\
 2860  mkdir .kube
 2861  cd .kube
 2862  New-Item config -type file
 2863  scoop install --global skaffold
 2864  cd C:\
 2865  npm install -g server-wp-mcp
 2866  npx -y @smithery/cli install server-wp-mcp --client claude
 2867  winget upgrade beeradmoore.dlss-swapper
 2868  winget show Google.Chrome.Devs
 2869  winget show Google.Chrome.Dev
 2870  cd C:\Vive
 2871  vivetool /query /id:45189370,47364920
 2872  vivetool /query /id:45189370,47364920,55007914,53472520,55719046,54237977,55241894,53788541,55181820,53460890,54433352,55430721
 2873  vivetool /query /id:45189370,47364920,55007914,53472520,55719046,54237977,55241894,53788541,55181820,53460890,54433352,55430721,54446122
 2874  gh extension install github/gh-copilot --force
 2875  devmgmt.msc
 2876  cd C:\Users\david\Downloads\
 2877  curl -o "Intel Corporation-Bluetooth-23.100.0.4.cab" "https://catalog.s.download.windowsupdate.com/c/msdownload/update/driver/drvs/2024/11/180063e9-b47f-41e0-b612-227b81240d30_8641d6cda3eb872ea9dec0dfb63b04d8bfd20953.cab"
 2878  vivetool /query /id:53818150
 2879  winget show Python.Python.3.13
 2880  git clone --recurse https://github.com/JaleelB/gpt-crawler-ui.git
 2881  pnpm i
 2882  pnpm help
 2883  pnpm self-update
 2884  pnpm update
 2885  pnpm install --help
 2886  npm install -g pnpm@latest
 2887  pnpm --version
 2888  cd gpt-crawler-ui
 2889  pnpm install
 2890  pnpm update puppeteer
 2891  pnpm update puppeteer@latest
 2892  pnpm update -D eslint@latest
 2893  pnpm update -D eslint-config-next@latest
 2894  pnpm update -D @types/node@latest @types/react@latest @types/react-dom@latest tailwindcss@latest
 2895  pnpm update lodash.isequal@latest
 2896  pnpm update react@latest react-dom@latest next@latest framer-motion@latest lucide-react@latest tailwind-merge@latest
 2897  pnpm outdated
 2898  pnpm update @types/express@latest
 2899  pnpm --help
 2900  pnpm list
 2901  pnpm audit
 2902  npm install -g aisdk-mcp-bridge
 2903  pnpm dev
 2904  next dev && npm run server
 2905  pnpm install @tailwindcss/postcss@latest
 2906  winget upgrade JetBrains.Toolbox
 2907  winget upgrade CodingWondersSoftware.DISMTools.Preview
 2908  clink update
 2909  winget search mcp

I'm guessing npm or pnpm wouldn't cause issues, but I did update to the latest version of Python 3.13 at command 2879 in this timeline. Could that be the issue as I know that there is an app execution alias, so maybe a compatibility issue with the latest version?

Interesting you mention different versions installed as I did have multiple versions of CodingWondersSoftware.DISMTools installed, but uninstalling didn't fix it.

Also interesting is the Powershell issue. I had installed the latest PS Preview and enabled Windows Update and ever since then, Programs and Features would show two different versions. Uninstalled other version, still winget didn't work. I could uninstall PS and reinstall to see if that helps?

@davidldennison
Copy link
Author

Could it be my configuration by any chance? Here it is:

{
    "$schema": "https://aka.ms/winget-settings.schema.json",
    "experimentalFeatures": {
        "experimentalCmd": true,
        "experimentalArg": true,
        "experimentalMSStore": true,
        "dependencies": true,
        "download": true,
        "windowsFeature": true,
        "storeDownload": true,
        "openLogsArgument":true,
        "zipInstall": true,
        "directMSI": true,
        "resume": true,
        "configuration03": true,
        "configureSelfElevate": true,
        "sideBySide": true,
        "storeDownload": true,
        "configureExport": true,
        "fonts": true,
        "indexV2": true
    },
    "visual": {
        "progressBar": "rainbow",
        "anonymizeDisplayedPaths": false
    },
    "source": {
        "autoUpdateIntervalInMinutes": 5
    },
    "installBehavior": {
        "disableInstallNotes": false,
        "skipDependencies": false,
        "includePreviewVersions": true,
        "allowPrerelease": true,
        "allowExperimental": true,
        "preferences": {
            "locale": [
                "en-US"
            ],
            "architectures": [
                "x64",
                "x86",
                "neutral"
            ],
            "installerTypes": [
                "msix",
                "msi",
                "exe",
                "msstore",
                "wix",
                "nullsoft",
                "zip",
                "inno",
                "burn",
                "portable"
            ]
        }
    },
    "uninstallBehavior": {
        "purgePortablePackage": true
    },
    "downloadbehavior": {
        "defaultDownloadDirectory": "C:\\Users\\david\\Downloads"
    },
    "network": {
        "downloader": "wininet"
    },
    "telemetry": {
        "disable": false
    },
    "logging": {
        "level": "verbose",
        "channels": [
            "all"
        ]
    },
    "interactivity": {
        "disable": false
    }
}

@JohnMcPMS
Copy link
Member

No, I don't think your config is to blame. We should be able to get a build out this week with the fix for this issue.

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

Successfully merging a pull request may close this issue.

3 participants