winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Nothing on https://cdn.winget.microsoft.com/cache/source.msix - can't update winget source

Open estomagado opened this issue 1 year ago • 14 comments

Brief description of your issue

This has been discussed before here https://github.com/microsoft/winget-cli/issues/1656

But there is a twist now: source file is unavailable for download.

Steps to reproduce

Reproducing the error

I try to update the sources and get this error:

1. Any use of `winget `gives `Failed in attempting to update the source: winget`
2. `winget source update --name winget` gives a `CANCELLED` response
3. Winget will still try to run an upgrade or install and is sometimes successful

My guess for number 3 is that the successful tries download things from the MS Store source, but when the pacage comes from the winget source things get interrupted.

Expected behavior

That I can update the sources the usual way.

An if I try manually, that the file is available for download.

Actual behavior

winget source update --name winget gives a CANCELLED response.

Trying the solution on [#1656]

Anyway, one of the solutions given in [#1656] was to manually download the source file from https://cdn.winget.microsoft.com/cache/source.msix

The thing is that, now, there is nothing there to download anymore. I get a blank page and no file is downloaded. Microsoft is moving things around, perhaps?

If I try just https://cdn.winget.microsoft.com/cache/

I get

<Error> <Code>ResourceNotFound</Code> <Message> The specified resource does not exist. RequestId:ce799ef1-601e-0060-7d77-a9ec45000000 Time:2025-04-09T17:49:06.5926181Z </Message> </Error>

And if I try just https://cdn.winget.microsoft.com/ I get a 404:

Page not found Oops! We weren't able to find your Azure Front Door Service configuration. If it's a new configuration that you recently created, it might not be ready yet. You should check again in a few minutes. If the problem persists, please contact Azure support

Environment

Windows 11 24H2 Home Single Language
Compilation 26100.3775
Experience 1000.26100.66.0

winget --info
Windows Package Manager v1.10.340
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.26100.3775
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.25.340.0
Winget Directories
-------------------------------------------------------------------------------------------------------
Logs                                       %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb…
User Settings                              %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb…
Portable Links Directory (User)            %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine)         C:\Program Files\WinGet\Links
Portable Package Root (User)               %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root                      C:\Program Files\WinGet\Packages
Portable Package Root (x86)                C:\Program Files (x86)\WinGet\Packages
Installer Downloads                        %USERPROFILE%\Downloads
Configuration Modules                      %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules
Links
-------------------------------------------------------------------------------
Privacy Policy         https://aka.ms/winget-privacy
License Agreement      https://aka.ms/winget-license
Third Party Notices    https://aka.ms/winget-3rdPartyNotice
Home page              https://aka.ms/winget
Windows Store Terms    https://www.microsoft.com/en-us/storedocs/terms-of-sale
Administrator Settings                     State
------------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

estomagado avatar Apr 09 '25 18:04 estomagado

We've found some similar issues:

  • #3744 , similarity score: 81%

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

similar-issues-ai[bot] avatar Apr 09 '25 18:04 similar-issues-ai[bot]

We've found some similar issues:

* [Winget source down - 0KB cache file from CDN #3744](https://github.com/microsoft/winget-cli/issues/3744) , similarity score: 81%

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

Not the same. It's not a 0k file now, there is no filename being downloaed. File is now missing.

estomagado avatar Apr 09 '25 18:04 estomagado

Install the v2 version.

https://cdn.winget.microsoft.com/cache/source2.msix

felipebraga avatar Apr 09 '25 18:04 felipebraga

Install the v2 version.

https://cdn.winget.microsoft.com/cache/source2.msix

That's neat, but why is it not referenced anywhere?

This should be on the Readme.md

estomagado avatar Apr 09 '25 18:04 estomagado

@estomagado,

Manually downloading the index is a troubleshooting step as opposed to a typical scenario. I just checked and it's not documented in our troubleshooting guide. I'm going to use this issue to track adding the information regarding the index.

There are also some cases we've seen users get a 404 on the correct URL. If you open an "In Private" browser, you should be able to download the latest index.

denelon avatar Apr 09 '25 18:04 denelon

TO ALL WHO WOULD FIND THIS IN THE FUTURE

I was able to update the winget source using the correct filename and the following PoweShell command:

Add-AppxPackage https://cdn.winget.microsoft.com/cache/source2.msix

There are other options suggested in the pinned issue [#3652] that I did no test, but may help someone. Do just ONE of them, not both!

  • You can manually download the file from https://cdn.winget.microsoft.com/cache/source2.msix and use Add-AppxPackage locally
  • winget install -s msstore --id 9NBLGGH4NNS1

https://github.com/microsoft/winget-cli/issues/3652

I'm not closing this issue as @denelon wants to update documentation.

estomagado avatar Apr 09 '25 18:04 estomagado

The command above:

Add-AppxPackage https://cdn.winget.microsoft.com/cache/source2.msix

does not fix the issue permanently. It seems that every time winget wants to update source, it fails and I have to run it again to fix it. It works fine for as long as winget wants it to. I can't seem to reproduce it. I thought maybe it was needed on every system restart, but not really.

For instance, just recently I wanted to install gimp, so I ran winget search gimp which returned Failed in attempting to update the source: winget , so I had to fix the sources thingy again.

Sorry if I'm not being very detailed, but this has been happening since last night, just after I got the new W11 build installed. Now I'm running a fresh W11 Pro install and it happens all the same.

kutulhu avatar Apr 09 '25 20:04 kutulhu

TO ALL WHO WOULD FIND THIS IN THE FUTURE

I was able to update the winget source using the correct filename and the following PoweShell command:

Add-AppxPackage https://cdn.winget.microsoft.com/cache/source2.msix

There are other options suggested in the pinned issue [#3652] that I did no test, but may help someone. Do just ONE of them, not both!

* You can manually download the file from https://cdn.winget.microsoft.com/cache/source2.msix and use `Add-AppxPackage` locally

* `winget install -s msstore --id 9NBLGGH4NNS1`

#3652

I'm not closing this issue as @denelon wants to update documentation.

Nothing worked for me.

SalahAdDin avatar Apr 10 '25 04:04 SalahAdDin

Missing the --force flag

 winget install -s msstore --id 9NBLGGH4NNS1 --force

close and re-open terminal

stephaneerard avatar Apr 11 '25 01:04 stephaneerard

PS D:\Profile\Downloads> winget install -s msstore --id 9NBLGGH4NNS1 --force The msstore source requires that you view the following agreements before using. Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").

Do you agree to all the source agreements terms? [Y] Yes [N] No: y Found App Installer [9NBLGGH4NNS1] Version Unknown This package is provided through Microsoft Store. winget may need to acquire the package from Microsoft Store on behalf of the current user. Agreements for App Installer [9NBLGGH4NNS1] Version Unknown Version: Unknown Publisher: Microsoft Corporation Publisher Url: http://www.microsoft.com/ Publisher Support Url: mailto:[email protected] License: http://go.microsoft.com/fwlink/?LinkID=530144 Privacy Url: http://go.microsoft.com/fwlink/?LinkID=521839 Copyright: (c) 2016 Microsoft Corporation Agreements: Category: System Components Pricing: Free Free Trial: No Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction Seizure Warning: https://aka.ms/microsoft-store-seizure-warning Store License Terms: https://aka.ms/microsoft-store-license

The publisher requires that you view the above information and accept the agreements before installing. Do you agree to the terms? [Y] Yes [N] No: y Starting package install... ▌ 2% Failed to install or upgrade Microsoft Store package. Error code: 0x80070005 PS D:\Profile\Downloads>

user4302 avatar Aug 03 '25 20:08 user4302

uninstalling Microsoft.DesktopAppInstaller

and installing using Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe from https://learn.microsoft.com/en-us/windows/package-manager/winget/

fixed all issues

user4302 avatar Aug 03 '25 21:08 user4302

I encountered this issue on my company's computer. I occasionally took my computer home and used the home WIFI. Recently I found winget update can respond normally.

Considering I have encountered SSL-related issues many times due to my company's proxy intercepting the SSL traffic, I suspect it is related. Although I forgot if I ran winget at home, it might be because winget updates something in the normal network.

Just to provide some references, although it may not be helpful.

zl6977 avatar Sep 02 '25 14:09 zl6977

I encountered this issue on my company's computer. I occasionally took my computer home and used the home WIFI. Recently I found winget update can respond normally.

Considering I have encountered SSL-related issues many times due to my company's proxy intercepting the SSL traffic, I suspect it is related. Although I forgot if I ran winget at home, it might be because winget updates something in the normal network.

Just to provide some references, although it may not be helpful.

Open a new issue for it.

SalahAdDin avatar Sep 03 '25 03:09 SalahAdDin

I encountered this issue on my company's computer. I occasionally took my computer home and used the home WIFI. Recently I found winget update can respond normally. Considering I have encountered SSL-related issues many times due to my company's proxy intercepting the SSL traffic, I suspect it is related. Although I forgot if I ran winget at home, it might be because winget updates something in the normal network. Just to provide some references, although it may not be helpful.

Open a new issue for it.

Thank you for caring. But I think no need to open a new one. I just want to give some clues to those winget users who are bothered by this issue. This issue may be related to their company proxy. I believe my experience is not related to winget developers, as it is a specific case.

zl6977 avatar Sep 03 '25 07:09 zl6977