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.75k stars 1.41k forks source link

winget upgrade/list not showing any result #2060

Closed johntony366 closed 2 years ago

johntony366 commented 2 years ago

image

https://user-images.githubusercontent.com/88877609/161116829-7c93b23f-6557-40ed-bf11-4997da1e08e1.mp4

Fresh install of Windows 11 Pro. As shown in the image, winget list and winget upgrade are not resulting in any output. Every time, the slash icon rotates for around 23 seconds and then nothing happens. I have tried restarting which did not fix my issue. Currently at a loss for what to try next. I did find a similar unresolved issue here: https://www.reddit.com/r/windowsinsiders/comments/sijael/winget_upgradelist_not_showing_any_result/

johntony366 commented 2 years ago

Logs for winget list command

2022-03-31 23:22:03.443 [CORE] WinGet, version [1.2.10271], activity [{9EAC7572-1719-4034-81D6-0DD6EE1F5F93}]
2022-03-31 23:22:03.444 [CORE] OS: Windows.Desktop v10.0.22000.593
2022-03-31 23:22:03.444 [CORE] Command line Args: "C:\Users\John\AppData\Local\Microsoft\WindowsApps\winget.exe" list
2022-03-31 23:22:03.444 [CORE] Package: Microsoft.DesktopAppInstaller v1.17.10271.0
2022-03-31 23:22:03.444 [CORE] IsCOMCall:0; Caller: winget-cli
2022-03-31 23:22:03.450 [CLI ] WinGet invoked with arguments: 'list'
2022-03-31 23:22:03.450 [CLI ] Found subcommand: list
2022-03-31 23:22:03.452 [CLI ] Leaf command to execute: root:list
2022-03-31 23:22:03.452 [CLI ] Executing command: list
2022-03-31 23:22:03.455 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped.
2022-03-31 23:22:03.455 [REPO] Default source requested, multiple sources available, adding all to source references.
2022-03-31 23:22:03.455 [REPO] Adding to source references msstore
2022-03-31 23:22:03.455 [REPO] Adding to source references winget
2022-03-31 23:22:03.455 [REPO] Source past auto update time [5 mins]; it has been at least 15 mins
2022-03-31 23:22:03.456 [REPO] Source past auto update time [5 mins]; it has been at least 600 mins
denelon commented 2 years ago

@johntony366,

Can you try winget source update --verbose-logs? It looks like the cache is stale. I'm wondering if there is a network issue.

johntony366 commented 2 years ago

Yep, that fixed it. Thanks!

2022-04-01 06:44:00.795 [CORE] WinGet, version [1.2.10271], activity [{DFBDD26D-E9A1-4DCB-9339-09C61B6E5EBA}]
2022-04-01 06:44:00.796 [CORE] OS: Windows.Desktop v10.0.22000.593
2022-04-01 06:44:00.796 [CORE] Command line Args: "C:\Users\John\AppData\Local\Microsoft\WindowsApps\winget.exe" source update --verbose-logs
2022-04-01 06:44:00.796 [CORE] Package: Microsoft.DesktopAppInstaller v1.17.10271.0
2022-04-01 06:44:00.796 [CORE] IsCOMCall:0; Caller: winget-cli
2022-04-01 06:44:00.802 [CLI ] WinGet invoked with arguments: 'source' 'update' '--verbose-logs'
2022-04-01 06:44:00.803 [CLI ] Found subcommand: source
2022-04-01 06:44:00.804 [CLI ] Found subcommand: update
2022-04-01 06:44:00.804 [CLI ] Leaf command to execute: root:source:update
2022-04-01 06:44:00.804 [CLI ] Executing command: update
2022-04-01 06:44:00.806 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2022-04-01 06:44:00.806 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2022-04-01 06:44:00.807 [YAML] Detected UTF-8
2022-04-01 06:44:00.807 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped.
2022-04-01 06:44:00.824 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2022-04-01 06:44:00.824 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2022-04-01 06:44:00.824 [YAML] Detected UTF-8
2022-04-01 06:44:00.824 [REPO] Named source requested, found: msstore
2022-04-01 06:44:00.826 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2022-04-01 06:44:00.826 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2022-04-01 06:44:00.826 [YAML] Detected UTF-8
2022-04-01 06:44:00.826 [REPO] Named source to be updated, found: msstore
2022-04-01 06:44:00.827 [CORE] Setting action: Set, Type: Standard, Name: sources_metadata
2022-04-01 06:44:00.929 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2022-04-01 06:44:00.929 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2022-04-01 06:44:00.929 [YAML] Detected UTF-8
2022-04-01 06:44:00.930 [REPO] Named source requested, found: winget
2022-04-01 06:44:00.931 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2022-04-01 06:44:00.931 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2022-04-01 06:44:00.931 [YAML] Detected UTF-8
2022-04-01 06:44:00.931 [REPO] Named source to be updated, found: winget
2022-04-01 06:44:03.102 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2022-04-01 06:44:03.102 [CORE] Found matching extension.
2022-04-01 06:44:03.107 [CORE] Downloading to path: C:\Users\John\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2022-04-01 06:44:03.109 [CORE] Started applying motw to C:\Users\John\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2022-04-01 06:44:03.112 [CORE] Finished applying motw
2022-04-01 06:44:03.112 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/source.msix
2022-04-01 06:44:03.527 [CORE] Download request status success.
2022-04-01 06:44:03.527 [CORE] Download size: 3526907
2022-04-01 06:44:04.954 [CORE] Download completed.
2022-04-01 06:44:04.954 [CORE] Starting AddPackage operation #0: file:///C:/Users/John/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix SkipSmartScreen: 1
2022-04-01 06:44:04.959 [CORE] Begin waiting for operation #0
2022-04-01 06:44:04.959 [CORE] Begin blocking for operation #0
2022-04-01 06:44:06.063 [CORE] Successfully completed #0
2022-04-01 06:44:06.076 [CORE] Setting action: Set, Type: Standard, Name: sources_metadata
2022-04-01 06:44:06.077 [CLI ] Leaf command succeeded: root:source:update
MS-Manikandan commented 2 years ago

I have same issue, I executed this command winget source update --verbose-logs and winget list but it didn't output anything for me. image

denelon commented 2 years ago

@ManikandanMani can you share your logs?

MS-Manikandan commented 2 years ago

@denelon, thanks for reaching out, now i executed winget source update --verbose-logs and it updated the sources, then executing winget upgrade works as expected.

chylex commented 2 years ago

Ran into the same issue, the logs show that at least one of the updates was "Done" but it didn't actually do anything. Before the second update finished, I realized that Wireguard VPN launched at boot and had an old invalid configuration, so I didn't have access to the internet.

I would expect winget source update (especially with --verbose-logs) to tell me that it can't connect, instead of silently failing and not updating the local cache.

obrazek

brainz80 commented 2 years ago

Having same issue as chylex. Running winget source update --verbose-logs winget fails(?) silently during Updating source: winget...

ktrNozomi commented 2 years ago

@brainz80 I use winget source list and winget source remove winget to remove the stuck source, then everything works... It appears that this cache doesn't exist: https://winget.azureedge.net/cache.

hueldoeu commented 1 year ago

@johntony366,

Can you try winget source update --verbose-logs? It looks like the cache is stale. I'm wondering if there is a network issue.

"winget source update" has helped me but everytime on one damn PC of one of my customers, only god knows why, winget wont "source update" in the beginning when i command "winget upgrade" to see, which program needs to be updated

hueldoeu commented 1 year ago

"winget source update" has helped me but everytime on one damn PC of one of my customers, only god knows why, winget wont "source update" in the beginning when i command "winget upgrade" to see, which program needs to be updated

winget source reset --force helped me winget source reset --force

Shashank5665 commented 8 months ago

tried everything above, still not fixed

bolandross commented 8 months ago

tried everything above, still not fixed

Same here, any ideas?

hueldoeu commented 8 months ago

tried everything above, still not fixed

Same here, any ideas?

format c: newly fresh win10/11/12/... install

bolandross commented 8 months ago

Unfortunately, I am experiencing this problem on a fresh installed Windows 11 😅

ChristopheL77 commented 7 months ago

I had the same issue, then I updated App Installer from the store and it started to work.

image

Aetherinox commented 7 months ago

Yup, this issue is getting rather annoying, brand new fresh install, winget does nothing but spin. And I've done the recommendations above. It just spins until I kill it. System has internet (obviously).

ChristopheL77 commented 7 months ago

Did you update app installer (get updates then update) in Windows store ?

Le jeu. 28 déc. 2023, 00:59, Aetherx @.***> a écrit :

Yup, this issue is getting rather annoying, brand new fresh install, winget does nothing but spin. And I've done the recommendations above. It just spins until I kill it. System has internet (obviously).

— Reply to this email directly, view it on GitHub https://github.com/microsoft/winget-cli/issues/2060#issuecomment-1870700440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6PDPEFORVUBJQVXEMUCVDYLSY5HAVCNFSM5SGD5O2KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBXGA3TAMBUGQYA . You are receiving this because you commented.Message ID: @.***>