winget-cli: "Failed in attempting to update the source: winget"
Brief description of your issue
Since yesterday evening (around 5pm - UTC+2), I’ve been getting the error Failed in attempting to update the source: winget
whenever I try a command like winget upgrade
.
Steps to reproduce
Run winget upgrade
.
Expected behavior
That the winget source works.
Actual behavior
Failed in attempting to update the source: winget
Current Location: Dunkerque, France The problem doesn’t seem to be present on my computers in Arlon, Belgium or Capellen, Luxembourg.
Logs:
2023-09-27 09:26:00.429 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\MsixInfo.cpp(313)\WindowsPackageManager.dll!00007FFD55151415: (caller: 00007FFD552B65F4) Exception(1) tid(938) 8051100F
2023-09-27 09:26:00.429 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(53)\WindowsPackageManager.dll!00007 FFD553E9136: (caller: 00007FFD552B2907) LogHr(1) tid(938) 8051100F Msg:[PreIndexedPackageInfo failed on primary location -- D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\MsixInfo.cpp(313)\WindowsPackageManager.dll!00007 FFD55151415: (caller: 00007FFD552B65F4) Exception(1) tid(938) 8051100F ]
2023-09-27 09:26:00.459 [FAIL] WindowsPackageManager.dll!00007FFD553BFB12: ReturnHr(1) tid(938) 801901AD Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\HttpStream\HttpClientWrapper.cpp(52)\WindowsPackageManager.dll!00007 FFD553B6E0E: (caller: 00007FFD550FB960) Exception(2) tid(938) 801901AD ]
2023-09-27 09:26:00.459 [FAIL] WindowsPackageManager.dll!00007FFD55155EE7: LogHr(2) tid(938) 801901AD
2023-09-27 09:26:00.460 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(64)\WindowsPackageManager.dll!00007 FFD553E9193: (caller: 00007FFD552B2907) LogHr(3) tid(938) 801901AD Msg:[PreIndexedPackageInfo failed on alternate location -- winrt::hresult_error: The text associated with this error code could not be found].
2023-09-27 09:26:00.460 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(66)\WindowsPackageManager.dll!00007FFD552B6745: (caller: 00007FFD552B2907) Exception(3) tid(938) 8051100F
2023-09-27 09:26:00.460 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(53)\WindowsPackageManager.dll!00007 FFD553E69B1: (caller: 00007FFD5529D6C2) LogHr(4) tid(938) 8051100F Msg:[D:\a\_work1\\s\external\pkg\src\sAppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(66)\WindowsPackageManager.dll!00007 FFD552B6745: (caller: 00007FFD552B2907) Exception(3) tid(938) 8051100F ]
2023-09-27 09:26:00.460 [REPO] Source add/update failed, waiting a bit and retrying: winget
2023-09-27 09:26:02.498 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\MsixInfo.cpp(313)\WindowsPackageManager.dll!00007FFD55151415: (caller: 00007FFD552B65F4) Exception(4) tid(938) 8051100F
2023-09-27 09:26:02.498 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(53)\WindowsPackageManager.dll!00007 FFD553E9136: (caller: 00007FFD552B2907) LogHr(5) tid(938) 8051100F Msg:[PreIndexedPackageInfo failed on primary location -- D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\MsixInfo.cpp(313)\WindowsPackageManager.dll!00007 FFD55151415: (caller: 00007FFD552B65F4) Exception(4) tid(938) 8051100F ]
2023-09-27 09:26:02.672 [FAIL] WindowsPackageManager.dll!00007FFD553BFB12: ReturnHr(2) tid(938) 801901AD Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\HttpStream\HttpClientWrapper.cpp(52)\WindowsPackageManager.dll!00007 FFD553B6E0E: (caller: 00007FFD550FB960) Exception(5) tid(938) 801901AD ]
2023-09-27 09:26:02.672 [FAIL] WindowsPackageManager.dll!00007FFD55155EE7: LogHr(6) tid(938) 801901AD
2023-09-27 09:26:02.672 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(64)\WindowsPackageManager.dll!00007 FFD553E9193: (caller: 00007FFD552B2907) LogHr(7) tid(938) 801901AD Msg:[PreIndexedPackageInfo failed on alternate location -- winrt::hresult_error: The text associated with this error code could not be found].
2023-09-27 09:26:02.672 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(66)\WindowsPackageManager.dll!00007FFD552B6745: (caller: 00007FFD552B2907) Exception(6) tid(938) 8051100F
2023-09-27 09:26:02.672 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(562)\WindowsPackageManager.dll!00007 FFD553E5F74: (caller: 00007FFD55176B2F) LogHr(8) tid(938) 8051100F Msg:[D:\a\_work1\\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(66)\WindowsPackageManager.dll!00007 FFD552B6745: (caller: 00007FFD552B2907) Exception(6) tid(938) 8051100F ]
2023-09-27 09:26:02.672 [REPO] Failed to update source: winget
Environment
Gestionnaire de package Windows v1.6.2631
Copyright (c) Microsoft Corporation. Tous droits réservés.
Windows: Windows.Desktop v10.0.22621.2361
Architecture du système : X64
Package : Microsoft.DesktopAppInstaller v1.21.2631.0
Répertoires Winget
-----------------------------------------------------------------------------------------------------------------------------------------
Journaux %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
Paramètres utilisateurs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Répertoire des liens portables (utilisateur) %LOCALAPPDATA%\Microsoft\WinGet\Links
Répertoire des liens portables (ordinateur) C:\Program Files\WinGet\Links
Racine de package portable (utilisateur) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Racine du package portable C:\Program Files\WinGet\Packages
Racine de package portable (x86) C:\Program Files (x86)\WinGet\Packages
Téléchargements du programme d’installation D:\Users\Lusiiky\Downloads
Liens
---------------------------------------------------------------------------------------------
Déclaration de confidentialité https://aka.ms/winget-privacy
Contrat de licence https://aka.ms/winget-license
Avis de tiers https://aka.ms/winget-3rdPartyNotice
Page d’accueil https://aka.ms/winget
Conditions générales du Windows Store https://www.microsoft.com/en-us/storedocs/terms-of-sale
Paramètre administrateur État
---------------------------------------------------
LocalManifestFiles Désactivé
BypassCertificatePinningForMicrosoftStore Désactivé
InstallerHashOverride Désactivé
LocalArchiveMalwareScanOverride Désactivé
About this issue
- Original URL
- State: open
- Created 9 months ago
- Reactions: 20
- Comments: 47 (3 by maintainers)
Hey all, we’re clearly experiencing CDN issues. We have been working to retire the original CDN due to other challenges with certificate rotation from the past. We have several folks on-call actively working on this.
This issue affected me as well. A brand new Windows 11 installation didn’t help.
This seems to have fixed the issue for me. Thanks!
it works fine when i updated winget to v1.6.2771 manually
It’s already dead, our scripts are useless. Updating all sources… Updating source: msstore…
Done Updating source: winget… Cancelled
check this solution What resolved “Failed in attempting to update the source: winget” for me:
Download this file: https://cdn.winget.microsoft.com/cache/source.msix (e.g. with Edge) Open the Downloads folder Right-click, choose install, follow the wizard to install the package.
No clue why this is necessary. Source list remains the same:
PS C:> winget source list Name Argument
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0 winget https://cdn.winget.microsoft.com/cache
Yes, I did run the command mention at the top here: https://github.com/microsoft/winget-cli/issues/3652#issue-1907725867
But I was running a more recent version anyways (1.5? 1.6.??).
FWIW, here’s my current workaround:
This issue is back. How the heck does this issue keep coming back to haunt us?
This seems to fix the issue. But why though?
https://cdn.winget.microsoft.com/cache returns 404 for me
Some folks here (especially the ones that get a
Canceled
) may be suffering from a regional CDN issue.The only thing that worked for me (and I suspect will work for lots of people): use a VPN to another region, as mentioned in https://github.com/microsoft/winget-cli/issues/1826#issuecomment-1305894692
These regional CDN issues rarely get resolved quickly because “works for me” for most Microsoft employees.
Try the below:
delete %TEMP%\WinGet Download from https://cdn.winget.microsoft.com/cache/source.msix and install open CMD with elevated privilege: run >>> winget source reset --force
winget source update
winget upgrade --all
@sba923 your script worked… thanks!
Now there’s version 7.3.9 but winget doesn’t have it yet… 😄
No idea why but I was apparently in the same situation, working fine now after updating via scoop.
Good lord, thank you for saving me from this issue lol.
For a couple of weeks ago we experienced the exact problem and by that time we used
v1.1.xxxx and the change of CDN could be reason. We recently rolled out Winget
v1.6.2701``and the issue was gone.However, last Friday (October 6th) I tried
winget upgrade
and the issue was back withFailed in attempting to update the source: winget
I upgraded manually to Wingetv1.6.2771
and it started to work.Why does this happen?
Even though we tries and want to upgrade Winget regularly, we are an enterprise within financing sector so such breaking changes are not acceptable. Note: msstore is blocked for us.
Can confirm, manually updating to 1.6.2771 using the msixbundle solved the issue. The winget source URL stays the same.
It looks like the issue is back. At least for devices/users located in India.
Same issue here:
When I had this problem, the Microsoft Store was also inaccessible. It’s because I installed a software similar to Security Assistant, which turned off the TLS option in Internet Options.
This actually worked for me. I didn’t care to find and restart the App Installer process, so I just rebooted the PC instead. Now it works without issue for me. Thank you.
I had this issue until I realized I had installed winget via scoop. Once I did
scoop update winget
(and thenwinget source reset --force
andwinget source update
just to be sure but they may not be needed) then all was working well again.this should probably be closed as a duplicate of #3652
This also happens on a fresh Windows 10 install which I’m currently using. Apparently the problem is not a client issue, rather servers seems to be down at the moment.