winget-cli: winget source update is not available
Brief description of your issue
When I run this command, the terminal is stuck at the following screen
It only shows the path where I am and the process cannot be ended
log
2022-01-27 03:02:11.971 [CORE] WinGet, version [1.2.3411-preview], activity [{BE59B699-D786-4CB8-9F77-6E011F6EF80F}]
2022-01-27 03:02:11.972 [CORE] OS: Windows.Desktop v10.0.19044.1503
2022-01-27 03:02:11.972 [CORE] Command line Args: "C:\Users\29422\AppData\Local\Microsoft\WindowsApps\winget.exe" source update
2022-01-27 03:02:11.972 [CORE] Package: Microsoft.DesktopAppInstaller v1.17.3411.0
2022-01-27 03:02:11.972 [CORE] IsCOMCall:0; Caller: winget-cli
2022-01-27 03:02:11.990 [CLI ] WinGet invoked with arguments: 'source' 'update'
2022-01-27 03:02:11.990 [CLI ] Found subcommand: source
2022-01-27 03:02:11.990 [CLI ] Found subcommand: update
2022-01-27 03:02:11.990 [CLI ] Leaf command to execute: root:source:update
2022-01-27 03:02:11.990 [CLI ] Executing command: update
2022-01-27 03:02:11.993 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped.
2022-01-27 03:02:12.013 [REPO] Named source requested, found: msstore
2022-01-27 03:02:12.014 [REPO] Named source to be updated, found: msstore
2022-01-27 03:02:12.126 [REPO] Named source requested, found: winget
2022-01-27 03:02:12.129 [REPO] Named source to be updated, found: winget
Steps to reproduce
1.run windows terminal 2.Input winget source update 3.press enter
Expected behavior
command will run normally and end
Actual behavior
It gets stuck and shows strange things
Environment
Windows Package Manager (Preview) v1.2.3411-preview
Windows: Windows.Desktop v10.0.19044.1503
程序包: Microsoft.DesktopAppInstaller v1.17.3411.0
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (6 by maintainers)
I have exactly the same issue like you, and actually EVERY winget command would get stuck.
This solution works for me. Change the dns server to 4.2.2.2 and 4.2.2.1 and retry. (or some other dns servers I guess)
Reason for this: I ran
after runing the command
Then I checked the logs and found things below:
It said it lacked some extension and kept retrying to download it. The [FAIL] says InternetReadFile() fails. I copied the url https://winget.azureedge.net/cache/source.msix and tried to download it manually but it failed. I’d tried to use some proxy and didn’t work. Well, it reminds me of an annoying problem of Chinese Internet so I tried to specify the dns server and it worked. Rerunning winget commands again with
--verbose-logs
now gives the following logwhich says the winget has found the matching extension. I’ve tried to install, update source, upgrade with DHCP set and they are still fine.
Conclusion Internet issue.
This worked for me, running 1.5.1. My situation is a little unique in that the system I’m running it on, I don’t have admin rights with the account I’m logged in as. However, I do have an account I can open a powershell window with admin rights. Additionally, the MS Store has been removed. In the elevated prompt, running as a different, it was unable to get the winget source (but was able to pull the msstore source). The regular account was able to get pull the winget source. Downloading the source.msix and installing it in the elevated prompt using Add-AppxPackage -Path source.msix seemed to resolve the issue.
Update_PS_winget.zip
Created a PowerShell script that will update PowerShell and Winget to the latest on systems with this issue.
Well, I updated the system today, and the problem was solved, I think it may be a problem with the system components
I tried, but it didn’t solve the problem