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
23.02k stars 1.43k forks source link

0x8a15000f : Data required by the source is missing #1348

Closed EurekaChen closed 1 year ago

EurekaChen commented 3 years ago

install version v1.0.11692 run: winget search edge get:

无法打开源; 如果问题仍然存在,请尝试“source reset”命令。
执行此命令时发生意外错误:
0x8a15000f : Data required by the source is missing
denelon commented 3 years ago

@EurekaChen what happens when you run winget source reset?

This is usually caused by a temporary network issue downloading the source package.

You might try changing your settings for the network downloader.

    "network": {"downloader": "wininet"}
EurekaChen commented 3 years ago

same after winget source reset and same after insert "network": {"downloader": "wininet"} in settings.json vist https://winget.azureedge.net/cache get:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<script/>
<script/>
<Code>ResourceNotFound</Code>
<Message>The specified resource does not exist. RequestId:4d9be7ed-201e-0064-0e25-8b2bb1000000 Time:2021-08-07T00:45:45.8777912Z</Message>
</Error>
plekhov commented 3 years ago

Same problem.

Windows Package Manager v1.0.11692

Windows: Windows.Desktop v10.0.19043.1151
Пакет: Microsoft.DesktopAppInstaller v1.12.11692.0

And the same response from https://winget.azureedge.net/cache

The output of the command winget source list

Name Argument
-----------------------------------------
winget https://winget.azureedge.net/cache
ItzLevvie commented 3 years ago

Make sure you don't have any firewalls blocking the winget.azureedge.net and azureedge.net subdomain and domain. Most "privacy" tools for Windows block this by default.

Perhaps try booting up Windows Sandbox or other virtual machine software and see if it's reproducible there. If it's not reproducible, then the issue comes from your host machine and is likely caused by the above.

Also, https://winget.azureedge.net/cache - without /source.msix added to the end of the URL - is not meant to be accessible, so seeing ResourceNotFound is expected here, as long as doing ping winget.azureedge.net causes no issues and that the website is online and not offline.

If you go to https://winget.azureedge.net/cache/source.msix and install the source.msix file, does any error pop up on your screen? And what happens when you do winget search edge if it's installed?

plekhov commented 3 years ago

If you go to https://winget.azureedge.net/cache/source.msix and install the source.msix file, does any error pop up on your screen? And what happens when you do winget search edge if it's installed?

Okay... I'm an install source.msix without a problem on my computer and then run winget search edge. Works perfectly! Thanks!

But I'm a little confused. I'm taken a msixbundle from here https://github.com/microsoft/winget-cli/releases/tag/v1.0.11692 and installed it. For what need source.msix? And why package don't work without separate install source.msix?

EurekaChen commented 3 years ago

ping winget.azureedge succesuful. visit https://winget.azureedge.net/cache/source.msix and I get download "source.zip" I rename source.zip to source.msix and install it. now run winget search edge ,it work! But with warning: "尝试更新源时失败:winget“

ItzLevvie commented 3 years ago

visit https://winget.azureedge.net/cache/source.msix and I get download "source.zip" I rename source.zip to source.msix and install it.

This might be why it wasn't able to install it since the file format is meant to be in .msix rather than in .zip.

For what need source.msix? And why package don't work without separate install source.msix?

This is because the .msixbundle only includes the Windows Package Manager and the source.msix file is not included in that.

By default, the Windows Package Manager has a source set up to the winget-pkgs repository where if you run winget source update or winget search Microsoft.Edge on your PC it's actually meant to automatically download the source.msix file from https://winget.azureedge.net/cache/source.msix and install it but for some reason it's failing and therefore you're getting an error saying that the data is missing.

source.msix is where all of the manifest data from the winget-pkgs repository are stored so that commands like winget search and winget upgrade will work. Without it, you won't be able to download anything as it can't find the manifest database to to download the application you want.

So the workaround to this issue is to keep on manually installing it from https://winget.azureedge.net/cache/source.msix until perhaps an engineer takes a look at this?

EurekaChen commented 3 years ago

What‘s the problem here: When I visit the same url "https://winget.azureedge.net/cache/source.msix" , in some computer it get "source.zip" and in other computer it will be "source.msix", so winget fail when get "source.zip".

and run winget install inkscape get

尝试更新源时失败: winget
执行此命令时发生意外错误:
InternetOpenUrl() failed.
0x80072f7d : unknown error
clovett commented 3 years ago

See if the solution I posted here works for you: https://github.com/microsoft/winget-cli/issues/998

NPittinger commented 2 years ago

Experiencing this issue now. Found the root cause to be that https://winget.azureedge.net/cache/source.msix is returning a 404 error. A 404 error should be communicated to the user in a more direct way than a generic "data is missing" message.

Edit - additional info:

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

Windows: Windows.Desktop v10.0.22000.348
Package: Microsoft.DesktopAppInstaller v1.16.13405.0

Edit 2 - https://winget.azureedge.net/cache/source.msix is no longer returning a 404 error, and winget functionality is restored on my system. Probably a temporary issue server-side. Should still be better communicated to the end user.

askender commented 2 years ago

https://github.com/microsoft/winget-cli/issues/1656 I solved it by:

  1. change permission of C:\Windows\Temp C:\Users\%USERNAME%\AppData\Local\Temp\WinGet
  2. run *.Winget.msix (in C:\Users\%USERNAME%\AppData\Local\Temp\WinGet ) by click it.

Then, I can use winget install -e --id vim.vim You can find more apps here: https://winget.run/ This issue is a big problem.

Icatme commented 2 years ago

ping winget.azureedge succesuful. visit https://winget.azureedge.net/cache/source.msix and I get download "source.zip" I rename source.zip to source.msix and install it. now run winget search edge ,it work! But with warning: "尝试更新源时失败:winget“

open Internet options, switch to advance tab, enable "tls 1.2"

Hypertext-Assassin-RSS commented 1 year ago

Had The Same Error i have slove it by going to this location 👇 C:\Users%USERNAME%\AppData\Local\Temp\WinGet

image and I installed Microsoft.Winget.Source_8wekyb3d8bbwe this package

still i get the error of Failed in attempting to update the source: winget but the packges intalling image

leedapeng commented 1 year ago

谢谢各位的帖子,让我从一个小白不断摸索成长,你们坚持的精神感染了我,本来我打算从做系统的,可是我没放弃,你们每个人的建议我都尝试过,可是总失效,最后,一条奇葩的命令改变了这种现状:winget uninstall winget
winget uninstall winget winget uninstall winget 重要的命令说三遍!! 屏幕截图(1)

Inf-Sub commented 1 year ago

i also have this problem on windows 11 pro 0x8a15000f : Data required by the source is missing

winget source list
Name     Argument
-----------------------------------------------------
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
winget  https://cdn.winget.microsoft.com/cache

"winget source reset" - did not help

winget -v
v1.3.2691
Adrydevmateo commented 1 year ago

Guys they fixed it! 😊😊😊

Inf-Sub commented 1 year ago

thanks, everything is working now but when I pressed cancel when demanding admin rights, I got an error, the text of which is not readable.

2022-11-08_14-44-22

manu08manu commented 1 year ago

Guys they fixed it! 😊😊😊

Have they? I am still having this issue in UK

leedapeng commented 1 year ago

Guys they fixed it! 😊😊😊

Have they? I am still having this issue in UK you can try winget uninstall winget, maybe it work!~

Masamune3210 commented 1 year ago

Caching will likely be a bit weird until things fully settle down and proliferate

A9G-Data-Droid commented 1 year ago

It is not fixed in the US either.

denelon commented 1 year ago

@A9G-Data-Droid can you run winget source reset --force --verbose-logs from an administrator prompt and share the logs? This will remove the "winget" and "msstore" sources and add them back so the PreIndexed package ("winget" source) can be "reset" back to a good state.

A9G-Data-Droid commented 1 year ago

Sure, @denelon. How would you like me to share the logs with you?

PS C:\WINDOWS\system32> winget source reset --force --verbose-logs
Resetting all sources...Done
PS C:\WINDOWS\system32> winget update --all
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
Failed when searching source: winget
An unexpected error occurred while executing the command:
0x8a15000f : Data required by the source is missing
PS C:\WINDOWS\system32> winget --version
v1.4.2161-preview
denelon commented 1 year ago

If you can find the latest one, you can add it to the GitHub issue by drag & drop, or if you are concerned about sharing the file you can https://aka.ms/winget-feedback/ and share the link to the feedback report.

A9G-Data-Droid commented 1 year ago

Thanks @denelon, I have a full feedback ticket for you here: https://aka.ms/AAipess

It contains a zip file with 3 log files relative to the commands I ran above.

jeff922 commented 1 year ago

I see this issue on Windows 11 specifically when running winget from an Administrator command prompt. If the command prompt is not run as Administrator, the issue does not occur for me.

My specific error when running as Admin: Failed when searching source: winget An unexpected error occurred while executing the command: 0x8a15000f : Data required by the source is missing

quantenemitter commented 1 year ago

In my case, I could resolve the issue as follows:

  1. Log-in with local administrator
  2. powershell -> winget source update
vani-lu commented 1 year ago

Update: I accidentally fixed it. I set my vpn on, log into non-admin powershell session, and run winget source update, it successfully update the winget source. winget search also works.

It's not fixed in China. The mstore source works, but the winget source cannot be updated even after successful reset.

I am using Windows 程序包管理器(预览) v1.4.3132-preview. If I update the sources, the winget source update get cancelled.

 winget source update --verbose-logs
正在更新所有源...
正在更新源: msstore...
完成
正在更新源: winget...
已取消

If I search for edge, it only got results from mstore:

 winget search edge
尝试更新源时失败: winget
"msstore"源要求在使用前查看以下协议。
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
源要求将当前计算机的 2 个字母的地理区域发送到后端服务才能正常工作,(例如"US")。

是否同意所有源协议条款?
[Y] 是  [N] 否: Y
搜索源时失败;结果将不包括在内: winget
名称                                   ID             版本    源
----------------------------------------------------------------------
Microsoft Edge Browser                 XPFFTQ037JWMHS Unknown msstore
CADENAS Parts for Solid Edge           9NBLGGH4PRQP   Unknown msstore
Solid Edge Mobile Viewer               9NBLGGH10W4F   Unknown msstore
Remote Tools for Microsoft Edge (Beta) 9P6CMFV44ZLT   Unknown msstore
Microsoft Edge DevTools Preview        9MZBFRMZ0MNJ   Unknown msstore
EDGE INTELLIGENT SYSTEM                9NBLGGH4WL8M   Unknown msstore
Commvault Edge                         9WZDNCRDCX0T   Unknown msstore
MATSUKO-EDGE                           9P6QJGZFJ04M   Unknown msstore
MCVisu.edge                            9PCLRNN47D6T   Unknown msstore
ContinuumEdge                          9NBLGGH6HL6L   Unknown msstore

Downloading the source.msix from https://winget.azureedge.net/cache/source.msix does not work either. The file seems to be empty (0 byte) and I cannot open it.

jeff922 commented 1 year ago

Attempted the winget source update from Powershell as Admin, but I still get the error on my system:

Tried: winget source reset --force then

PS C:\Windows\System32> winget source update Updating all sources... Updating source: msstore... Done Updating source: winget... 0% Done PS C:\Windows\System32> winget upgrade all Failed when searching source: winget An unexpected error occurred while executing the command: 0x8a15000f : Data required by the source is missing

Verbose logs from: winget upgrade all --verbose-logs

2022-11-26 09:51:39.856 [CORE] WinGet, version [1.3.2691], activity [{61717FE3-FEB8-4F81-86E1-D42AD4AC7450}] 2022-11-26 09:51:39.856 [CORE] OS: Windows.Desktop v10.0.22621.819 2022-11-26 09:51:39.856 [CORE] Command line Args: "C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps\winget.exe" upgrade all --verbose-logs 2022-11-26 09:51:39.856 [CORE] Package: Microsoft.DesktopAppInstaller v1.18.2691.0 2022-11-26 09:51:39.856 [CORE] IsCOMCall:0; Caller: winget-cli 2022-11-26 09:51:39.862 [CLI ] WinGet invoked with arguments: 'upgrade' 'all' '--verbose-logs' 2022-11-26 09:51:39.862 [CLI ] Found subcommand: upgrade 2022-11-26 09:51:39.862 [CLI ] Leaf command to execute: root:upgrade 2022-11-26 09:51:39.864 [CORE] Setting action: Get, Type: Secure, Name: admin_settings 2022-11-26 09:51:39.864 [CORE] Admin settings was not found 2022-11-26 09:51:39.864 [CLI ] Executing command: upgrade 2022-11-26 09:51:39.864 [CORE] Setting action: Get, Type: Secure, Name: user_sources 2022-11-26 09:51:39.872 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata 2022-11-26 09:51:39.872 [YAML] Detected UTF-8 2022-11-26 09:51:39.872 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped. 2022-11-26 09:51:39.872 [REPO] Default source requested, multiple sources available, adding all to source references. 2022-11-26 09:51:39.872 [REPO] Adding to source references msstore 2022-11-26 09:51:39.872 [REPO] Adding to source references winget 2022-11-26 09:51:39.872 [CORE] Setting action: Get, Type: Secure, Name: user_sources 2022-11-26 09:51:39.872 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata 2022-11-26 09:51:39.872 [YAML] Detected UTF-8 2022-11-26 09:51:39.872 [REPO] Multiple sources available, creating aggregated source. 2022-11-26 09:51:39.872 [REPO] Adding to aggregated source: msstore 2022-11-26 09:51:39.872 [REPO] Custom header not found. 2022-11-26 09:51:39.872 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information 2022-11-26 09:51:39.872 [REPO] Http GET request details: GET / HTTP/1.1

Content-Type: application/json

User-Agent: winget-cli WindowsPackageManager/1.3.2691 DesktopAppInstaller/Microsoft.DesktopAppInstaller v1.18.2691.0

quantenemitter commented 1 year ago

For clarification In my case, just running PowerShell with a "normal" user, but selecting "as Administrator" did not help. I literally meant: Start the windows-session as local Administrator. My last log-in as local admin was quite a while ago. So while logging in, I got greeted with the typical "Please wait. We're running updates for you." After that, I ran PowerShell (within the admin-session) and the problem disappeared.

Since then, I'm able to do a "winget source update" as a normal user. I'm living in Germany.

I'm not an expert. But I thought this might help.

jeff922 commented 1 year ago

@quantenemitter This resolved my issue. Thanks for your advice.

In summary, when running on my local non-admin account. If I launch Powershell by Running as Admin, I received the error above even after running the following: winget source reset --force winget source update winget upgrade all (this should have been "winget upgrade --all"

After completely logging out of my non-admin account and logging in as Administrator (not Run As Administrator), I opened Powershell as Admin and ran the above three commands again. The commands worked without any errors.

I logged out of Administrator and returned to my local non-admin account. Now I can run the above commands without error.

I hope this works for others also.

gloriousabsenceofskill commented 1 year ago

None of the above works for me. When doing winget source update, updating the winget source is cancelled. The source.msix files I've downloaded have been zero bytes.

PS C:\Windows\System32> Invoke-WebRequest 'https://winget.azureedge.net/cache/source.msix'

StatusCode        : 200
StatusDescription : OK
Content           : {}
RawContent        : HTTP/1.1 200 OK
                    Accept-Ranges: bytes
                    Age: 4557
                    Date: Mon, 28 Nov 2022 14:48:43 GMT
                    ETag: 0x8DAD14508DB3CFA
                    Server: ECAcc
                    Server: (dcb/7ED3)
                    X-Cache: HIT
                    x-ms-blob-type: BlockBlob
                    x-ms-lease-s…
Headers           : {[Accept-Ranges, System.String[]], [Age, System.String[]], [Date, System.String[]], [ETag,
                    System.String[]]…}
RawContentLength  : 0
RelationLink      : {}
Name    Argument
-----------------------------------------------------
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
winget  https://cdn.winget.microsoft.com/cache
steven@HP15:~$ host cdn.winget.microsoft.com
cdn.winget.microsoft.com is an alias for winget.azureedge.net.
winget.azureedge.net is an alias for winget.ec.azureedge.net.
winget.ec.azureedge.net is an alias for scdn283e9.wpc.14d639.nucdn.net.
scdn283e9.wpc.14d639.nucdn.net is an alias for sni1gl.wpc.nucdn.net.
sni1gl.wpc.nucdn.net has address 152.195.19.97
sni1gl.wpc.nucdn.net has IPv6 address 2606:2800:11f:1cb7:261b:1f9c:2074:3c
denelon commented 1 year ago

We've largely gotten past the issue with the zero-byte file being returned by the CDN. I'm going to go ahead and close this issue as resolved. We've created the following Issue to track improving the error message as well as logging:

A9G-Data-Droid commented 1 year ago

Improve the error message? What about resolution of the original issue? Did I miss the solution that closes this issue?

If the issue is a 404 on the server end, it's still happening in the US.

From today:

PS C:\WINDOWS\system32> winget.exe --version
v1.4.10173
PS C:\WINDOWS\system32> winget.exe source reset --force
Resetting all sources...Done
PS C:\WINDOWS\system32> winget.exe source update
Updating all sources...
Updating source: msstore...
Done
Updating source: winget...
                                  0%
Done
PS C:\WINDOWS\system32> winget.exe upgrade --all
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
Failed when searching source: winget
An unexpected error occurred while executing the command:
0x8a15000f : Data required by the source is missing
denelon commented 1 year ago

@A9G-Data-Droid can you run winget upgrade --all --verbose-logs and share the log file?

I don't believe we were having a 404 related issue with the CDN. The issue was a zero-byte file being served for the source.msix "PreIndexed Cache" file:

A9G-Data-Droid commented 1 year ago

I'm not sure if you got the logs from my last feedback ticket. This new one is a 12MB file that I need to sanitize before posting publicly.

Real quick, I can dump something that appears to be important to you. I'm seeing a few exceptions here.

2023-01-24 09:16:02.900 [CORE] WinGet, version [1.4.10173], activity [{3DADBFE8-C76E-4C76-8DFB-FCF40B5D602D}]
2023-01-24 09:16:02.900 [CORE] OS: Windows.Desktop v10.0.19044.2486
2023-01-24 09:16:02.901 [CORE] Command line Args: "C:\Users\...\AppData\Local\Microsoft\WindowsApps\winget.exe" upgrade --all --verbose-logs
2023-01-24 09:16:02.901 [CORE] Package: Microsoft.DesktopAppInstaller v1.19.10173.0
2023-01-24 09:16:02.901 [CORE] IsCOMCall:0; Caller: winget-cli
2023-01-24 09:16:02.912 [CLI ] WinGet invoked with arguments: 'upgrade' '--all' '--verbose-logs'
2023-01-24 09:16:02.914 [CLI ] Found subcommand: upgrade
2023-01-24 09:16:02.914 [CLI ] Leaf command to execute: root:upgrade
2023-01-24 09:16:02.923 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2023-01-24 09:16:02.923 [CORE] Admin settings was not found
2023-01-24 09:16:02.924 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2023-01-24 09:16:02.924 [CORE] Admin settings was not found
2023-01-24 09:16:02.925 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2023-01-24 09:16:02.925 [CORE] Admin settings was not found
2023-01-24 09:16:02.925 [CLI ] Executing command: upgrade
2023-01-24 09:16:02.926 [REPO] Additional sources GP is not enabled.
2023-01-24 09:16:02.926 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2023-01-24 09:16:02.927 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2023-01-24 09:16:02.927 [CORE] Admin settings was not found
2023-01-24 09:16:02.928 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G2 : PublicKey
  Microsoft Azure TLS Issuing CA 01 : Subject | Issuer
    sfdataservice.microsoft.com : Subject | Issuer
2023-01-24 09:16:02.928 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2023-01-24 09:16:02.928 [YAML] Detected UTF-8
2023-01-24 09:16:02.928 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped.
2023-01-24 09:16:02.928 [REPO] Default source requested, multiple sources available, adding all to source references.
2023-01-24 09:16:02.928 [REPO] Adding to source references msstore
2023-01-24 09:16:02.928 [REPO] Adding to source references winget
2023-01-24 09:16:02.928 [REPO] Multiple sources available, creating aggregated source.
2023-01-24 09:16:02.928 [REPO] Adding to aggregated source: msstore
2023-01-24 09:16:02.928 [REPO] Custom header not found.
2023-01-24 09:16:02.928 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2023-01-24 09:16:02.929 [REPO] Http GET request details:
GET / HTTP/1.1

Content-Type: application/json

User-Agent: winget-cli WindowsPackageManager/1.4.10173 DesktopAppInstaller/Microsoft.DesktopAppInstaller v1.19.10173.0

2023-01-24 09:16:03.115 [REPO] Response status: 200
2023-01-24 09:16:03.115 [REPO] Response details:
HTTP/1.1 200 OK

Cache-Control: max-age=0, no-cache, no-store

Connection: keep-alive

Content-Length: 853

Content-Type: application/json; charset=utf-8

Date: Tue, 24 Jan 2023 17:16:03 GMT

Expires: Tue, 24 Jan 2023 17:16:03 GMT

MS-CV: T0no94bdckaSCGX/.0

Pragma: no-cache

Server: Microsoft-HTTPAPI/2.0

X-OSG-Served-By: Torus-EastAsia_Legacy00000E_1.0.0.0

{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataResponse, StoreEdgeFD","Data":{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataData, StoreEdgeFD","SourceIdentifier":"StoreEdgeFD","SourceAgreements":{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.SourceAgreements, StoreEdgeFD","AgreementsIdentifier":"StoreEdgeFD","Agreements":[{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageManifest.AgreementDetail, StoreEdgeFD","AgreementLabel":"Terms of Transaction","AgreementUrl":"https://aka.ms/microsoft-store-terms-of-transaction"}]},"ServerSupportedVersions":["1.0.0","1.1.0"],"RequiredQueryParameters":["market"],"RequiredPackageMatchFields":["market"]}}
2023-01-24 09:16:03.115 [REPO] Custom header not found.
2023-01-24 09:16:03.115 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2023-01-24 09:16:03.115 [REPO] Http GET request details:
GET / HTTP/1.1

Content-Type: application/json

User-Agent: winget-cli WindowsPackageManager/1.4.10173 DesktopAppInstaller/Microsoft.DesktopAppInstaller v1.19.10173.0

2023-01-24 09:16:03.128 [REPO] Response status: 200
2023-01-24 09:16:03.128 [REPO] Response details:
HTTP/1.1 200 OK

Cache-Control: max-age=0, no-cache, no-store

Connection: keep-alive

Content-Length: 853

Content-Type: application/json; charset=utf-8

Date: Tue, 24 Jan 2023 17:16:03 GMT

Expires: Tue, 24 Jan 2023 17:16:03 GMT

MS-CV: T0no94bdckaSCGX/.0

Pragma: no-cache

Server: Microsoft-HTTPAPI/2.0

X-OSG-Served-By: Torus-EastAsia_Legacy00000E_1.0.0.0

{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataResponse, StoreEdgeFD","Data":{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataData, StoreEdgeFD","SourceIdentifier":"StoreEdgeFD","SourceAgreements":{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.SourceAgreements, StoreEdgeFD","AgreementsIdentifier":"StoreEdgeFD","Agreements":[{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageManifest.AgreementDetail, StoreEdgeFD","AgreementLabel":"Terms of Transaction","AgreementUrl":"https://aka.ms/microsoft-store-terms-of-transaction"}]},"ServerSupportedVersions":["1.0.0","1.1.0"],"RequiredQueryParameters":["market"],"RequiredPackageMatchFields":["market"]}}
2023-01-24 09:16:03.128 [REPO] Adding to aggregated source: winget
2023-01-24 09:16:03.146 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2023-01-24 09:16:03.146 [REPO] Package not found Microsoft.Winget.Source_8wekyb3d8bbwe
2023-01-24 09:16:03.147 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(205)\WindowsPackageManager.dll!00007FF82C954D7A: (caller: 00007FF82C94145E) Exception(1) tid(3d24) 8A15000F 
2023-01-24 09:16:03.147 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(564)\WindowsPackageManager.dll!00007FF82CA77793: (caller: 00007FF82C838E1D) LogHr(1) tid(3d24) 8A15000F     Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(205)\WindowsPackageManager.dll!00007FF82C954D7A: (caller: 00007FF82C94145E) Exception(1) tid(3d24) 8A15000F ] 

2023-01-24 09:16:03.147 [REPO] Failed to open available source: winget
2023-01-24 09:16:03.318 [CLI ] Checking Source agreements for source: msstore
2023-01-24 09:16:03.322 [REPO] Additional sources GP is not enabled.
2023-01-24 09:16:03.322 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2023-01-24 09:16:03.323 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2023-01-24 09:16:03.323 [CORE] Admin settings was not found
2023-01-24 09:16:03.323 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G2 : PublicKey
  Microsoft Azure TLS Issuing CA 01 : Subject | Issuer
    sfdataservice.microsoft.com : Subject | Issuer
2023-01-24 09:16:03.323 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2023-01-24 09:16:03.323 [YAML] Detected UTF-8
2023-01-24 09:16:03.323 [CLI ] Source agreements satisfied. Source: msstore
2023-01-24 09:16:03.323 [CLI ] Checking Source agreements for source: winget
2023-01-24 09:16:03.325 [REPO] Additional sources GP is not enabled.
2023-01-24 09:16:03.325 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2023-01-24 09:16:03.326 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2023-01-24 09:16:03.326 [CORE] Admin settings was not found
2023-01-24 09:16:03.326 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G2 : PublicKey
  Microsoft Azure TLS Issuing CA 01 : Subject | Issuer
    sfdataservice.microsoft.com : Subject | Issuer
2023-01-24 09:16:03.326 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2023-01-24 09:16:03.326 [YAML] Detected UTF-8
2023-01-24 09:16:03.326 [CLI ] Source agreements satisfied. Source: winget
2023-01-24 09:16:03.326 [REPO] Creating PredefinedInstalledSource with filter [None]
2023-01-24 09:16:03.326 [REPO] Creating new SQLite Index [4294967295.4294967295] at ':memory:'
2023-01-24 09:16:03.326 [SQL ] Opening SQLite connection #1: ':memory:' [6, 0]
2023-01-24 09:16:03.327 [SQL ] Preparing statement #1-1: 
CREATE TABLE [metadata](
    [name] TEXT PRIMARY KEY NOT NULL,
    [value] TEXT NOT NULL)

...12MB of SQL statements later...

2023-01-24 09:16:07.321 [CLI ] Caught wil::ResultException: D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(205)\WindowsPackageManager.dll!00007FF82C954D7A: (caller: 00007FF82C94145E) Exception(1) tid(3d24) 8A15000F 
JohnMcPMS commented 1 year ago

I suspect that the issue is happening during the source update, based on the 0% showing in your output. The logs from winget source update winget would probably be the most helpful to understand why it is failing silently. Alternatively, winget is basically doing this:

  1. Download from https://cdn.winget.microsoft.com/cache/source.msix
  2. PS> Add-AppxPackage

It is possible that this would give more direct logging/errors about my suspicions.

My guess is that something is wedged on the machine related to the Microsoft.Winget.Source package, and that manually removing it would help to unstick it. winget source remove winget would also attempt to remove that package in theory, but I'm not sure that I would trust winget to find the package to remove since it can't find it to use.

A9G-Data-Droid commented 1 year ago

@JohnMcPMS

I suspect that the issue is happening during the source update, based on the 0% showing in your output. The logs from winget source update winget would probably be the most helpful to understand why it is failing silently.

That did give us some different errors in the log that might be helpful.

COMMAND:

PowerShell 7.3.1
PS C:\Windows\System32> winget.exe source update winget --verbose-logs
Updating source: winget...
                                  0%
Done

LOG:

2023-01-24 10:22:23.449 [CORE] WinGet, version [1.4.10173], activity [{59DF8558-A397-427C-A1F1-426CA739D886}]
2023-01-24 10:22:23.450 [CORE] OS: Windows.Desktop v10.0.19044.2486
2023-01-24 10:22:23.450 [CORE] Command line Args: "C:\Users\...\AppData\Local\Microsoft\WindowsApps\winget.exe" source update winget --verbose-logs
2023-01-24 10:22:23.450 [CORE] Package: Microsoft.DesktopAppInstaller v1.19.10173.0
2023-01-24 10:22:23.450 [CORE] IsCOMCall:0; Caller: winget-cli
2023-01-24 10:22:23.473 [CLI ] WinGet invoked with arguments: 'source' 'update' 'winget' '--verbose-logs'
2023-01-24 10:22:23.475 [CLI ] Found subcommand: source
2023-01-24 10:22:23.475 [CLI ] Found subcommand: update
2023-01-24 10:22:23.475 [CLI ] Leaf command to execute: root:source:update
2023-01-24 10:22:23.475 [CLI ] Executing command: update
2023-01-24 10:22:23.492 [REPO] Additional sources GP is not enabled.
2023-01-24 10:22:23.492 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2023-01-24 10:22:23.494 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2023-01-24 10:22:23.494 [CORE] Admin settings was not found
2023-01-24 10:22:23.494 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G2 : PublicKey
  Microsoft Azure TLS Issuing CA 01 : Subject | Issuer
    sfdataservice.microsoft.com : Subject | Issuer
2023-01-24 10:22:23.494 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2023-01-24 10:22:23.495 [YAML] Detected UTF-8
2023-01-24 10:22:23.495 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped.
2023-01-24 10:22:23.498 [REPO] Additional sources GP is not enabled.
2023-01-24 10:22:23.498 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2023-01-24 10:22:23.500 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2023-01-24 10:22:23.500 [CORE] Admin settings was not found
2023-01-24 10:22:23.500 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G2 : PublicKey
  Microsoft Azure TLS Issuing CA 01 : Subject | Issuer
    sfdataservice.microsoft.com : Subject | Issuer
2023-01-24 10:22:23.500 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2023-01-24 10:22:23.500 [YAML] Detected UTF-8
2023-01-24 10:22:23.501 [REPO] Named source requested, found: winget
2023-01-24 10:22:23.573 [REPO] Additional sources GP is not enabled.
2023-01-24 10:22:23.573 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2023-01-24 10:22:23.576 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2023-01-24 10:22:23.576 [CORE] Admin settings was not found
2023-01-24 10:22:23.576 [CORE] Adding chain to pinning configuration [Microsoft Store Source]:
DigiCert Global Root G2 : PublicKey
  Microsoft Azure TLS Issuing CA 01 : Subject | Issuer
    sfdataservice.microsoft.com : Subject | Issuer
2023-01-24 10:22:23.576 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2023-01-24 10:22:23.576 [YAML] Detected UTF-8
2023-01-24 10:22:23.576 [REPO] Named source to be updated, found: winget
2023-01-24 10:22:24.217 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2023-01-24 10:22:24.237 [CORE] Downloading to path: C:\Users\...\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2023-01-24 10:22:24.261 [CORE] Started applying motw to C:\Users\...\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2023-01-24 10:22:24.271 [CORE] Finished applying motw
2023-01-24 10:22:24.275 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/source.msix
2023-01-24 10:22:24.389 [CORE] Download request status success.
2023-01-24 10:22:24.389 [CORE] Download size: 5859233
2023-01-24 10:22:24.591 [CORE] Download completed.
2023-01-24 10:22:24.592 [CORE] Starting AddPackage operation #0: file:///C:/Users/.../AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix SkipSmartScreen: 1
2023-01-24 10:22:24.626 [CORE] Begin waiting for operation #0
2023-01-24 10:22:24.626 [CORE] Begin blocking for operation #0
2023-01-24 10:22:25.611 [CORE] Deployment operation #0: Deployment Add operation with target volume C: on Package Microsoft.Winget.Source_2023.123.2437.964_neutral__8wekyb3d8bbwe from:   failed with error 0x80073D19. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
2023-01-24 10:22:25.611 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF82C8E9064: (caller: 00007FF82C8E9763) Exception(1) tid(f84) 80073D19 An error occurred because a user was logged off.

    Msg:[Operation failed: Deployment Add operation with target volume C: on Package Microsoft.Winget.Source_2023.123.2437.964_neutral__8wekyb3d8bbwe from:   failed with error 0x80073D19. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.] 

2023-01-24 10:22:25.626 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(53)\WindowsPackageManager.dll!00007FF82CA77F41: (caller: 00007FF82C94237C) LogHr(1) tid(f84) 80073D19 An error occurred because a user was logged off.

    Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF82C8E9064: (caller: 00007FF82C8E9763) Exception(1) tid(f84) 80073D19 An error occurred because a user was logged off.

    Msg:[Operation failed: Deployment Add operation with target volume C: on Package Microsoft.Winget.Source_2023.123.2437.964_neutral__8wekyb3d8bbwe from:   failed with error 0x80073D19. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.] 
] 

2023-01-24 10:22:25.626 [REPO] Source add/update failed, waiting a bit and retrying: winget
2023-01-24 10:22:27.779 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2023-01-24 10:22:27.794 [CORE] Downloading to path: C:\Users\...\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2023-01-24 10:22:27.812 [CORE] Started applying motw to C:\Users\...\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2023-01-24 10:22:27.819 [CORE] Finished applying motw
2023-01-24 10:22:27.823 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/source.msix
2023-01-24 10:22:27.919 [CORE] Download request status success.
2023-01-24 10:22:27.919 [CORE] Download size: 5859233
2023-01-24 10:22:28.115 [CORE] Download completed.
2023-01-24 10:22:28.115 [CORE] Starting AddPackage operation #1: file:///C:/Users/.../AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix SkipSmartScreen: 1
2023-01-24 10:22:28.116 [CORE] Begin waiting for operation #1
2023-01-24 10:22:28.116 [CORE] Begin blocking for operation #1
2023-01-24 10:22:28.411 [CORE] Successfully completed #1
2023-01-24 10:22:28.428 [CORE] Setting action: Set, Type: Standard, Name: sources_metadata
2023-01-24 10:22:28.439 [CLI ] Leaf command succeeded: root:source:update
stefanfritsch commented 1 year ago

@JohnMcPMS, thanks for the manual solution, that worked.

Using winget fails just as it does for A9G-Data-Droid.

A9G-Data-Droid commented 1 year ago

thanks for the manual solution, that worked.

What worked? Your comment is unclear. Are you still seeing the same failure or is it fixed?

NOTE: I get different errors if I run winget or winget.exe which is odd.

Plain winget:

winget source remove winget
Windows Package Manager (Preview) v1.5.101-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Unrecognized command:

OR winget.exe

PS C:\Windows\System32> winget.exe source remove winget
Removing source: winget...
An unexpected error occurred while executing the command:
Operation failed: Deployment Remove operation with target volume C: on Package Microsoft.Winget.Source_2023.123.2437.964_neutral__8wekyb3d8bbwe from:   failed with error 0x80073D19. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
0x80073d19 : An error occurred because a user was logged off.
stefanfritsch commented 1 year ago

His suggestion to download the source as an msix and installing it with add-appxpackage.

A9G-Data-Droid commented 1 year ago

His suggestion to download the source as an msix and installing it with add-appxpackage.

Thanks Stefan, this is just an endless chain of failures over the course of troubleshooting. Check this out:

PowerShell 7.3.1
PS C:\temp> Add-AppxPackage .\source.msix
Add-AppxPackage: The 'Add-AppxPackage' command was found in the module 'Appx', but the module could not be loaded due to the following error: [Operation is not supported on this platform. (0x80131539)]
For more information, run 'Import-Module Appx'.
PS C:\temp> Import-Module Appx
Import-Module: Operation is not supported on this platform. (0x80131539)
mdanish-kh commented 1 year ago

@A9G-Data-Droid Try running the command in "Windows PowerShell" (not to be confused with PowerShell 7 / PowerShell Core)

A9G-Data-Droid commented 1 year ago

That error led me to this issue which recommends flag -usewindowspowershell

PowerShell 7.3.1
PS C:\temp> import-module appx -usewindowspowershell
WARNING: Module appx is loaded in Windows PowerShell using WinPSCompatSession remoting session; please note that all input and output of commands from this module will be deserialized objects. If you want to load this module into PowerShell please use 'Import-Module -SkipEditionCheck' syntax.
PS C:\temp> Add-AppxPackage .\source.msix
PS C:\temp> winget upgrade --all

$$$

This is the first time I've ever seen winget upgrade --all function properly. What a day to be alive. I've always wanted a Windows package manager and this give me hope that it could be a stable thing some day.

ItsFated commented 1 year ago

谢谢各位的帖子,让我从一个小白不断摸索成长,你们坚持的精神感染了我,本来我打算从做系统的,可是我没放弃,你们每个人的建议我都尝试过,可是总失效,最后,一条奇葩的命令改变了这种现状:winget uninstall winget winget uninstall winget winget uninstall winget 重要的命令说三遍!! 屏幕截图(1)

Its work for me too, thank you.

A9G-Data-Droid commented 1 year ago

I just sat down at a different computer today and found the issue running as admin still exists in v1.5.2201

If downloading the source.msix and installing it is the fix, why doesn't winget do that? I had to come back to this thread to remember how to fix this problem.

niisenpai commented 1 year ago

1656 I solved it by:

  1. change permission of C:\Windows\Temp C:\Users%USERNAME%\AppData\Local\Temp\WinGet
  2. run *.Winget.msix (in C:\Users%USERNAME%\AppData\Local\Temp\WinGet ) by click it.

Then, I can use winget install -e --id vim.vim You can find more apps here: https://winget.run/ This issue is a big problem.

this really helped thanks a lot

nielssiebert commented 11 months ago

Try this in the powershell:

Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe

Worked for me

nikoscbr commented 11 months ago

Try this in the powershell:

Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe

Worked for me

This is the only solution that worked for me ! It solved the issue. Winget works correctly now.

OldakCZ commented 11 months ago

In my case, I could resolve the issue as follows:

  1. Log-in with local administrator
  2. powershell -> winget source update

Worked for me!