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.28k stars 1.45k forks source link

winget source update failed #3090

Open deeplee opened 1 year ago

deeplee commented 1 year ago

Brief description of your issue

I use windows terminal and powershell 7.3.3 session then run winget.exe source update --verbose-logs but output 正在更新所有源... 正在更新源: msstore... 完成 正在更新源: winget... ████████████████████████▏ 5.00 MB / 6.20 MB 已取消

Steps to reproduce

only innput this command winget.exe source update --verbose-logs

Expected behavior

all source update succeed

Actual behavior

souce winget update canced

logs see: 2023-03-20 13:04:10.394 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/source.msix 2023-03-20 13:04:13.025 [CORE] Download request status success. 2023-03-20 13:04:13.025 [CORE] Download size: 6510029 2023-03-20 13:05:30.934 [FAIL] D:\a_work\1\s\external\pkg\src\AppInstallerCommonCore\Downloader.cpp(104)\WindowsPackageManager.dll!00007FFBA5CA1F0A: (caller: 00007FFBA5CA2A69) Exception(1) tid(2f08) 80072EE2 Msg:[InternetReadFile() failed.]

2023-03-20 13:05:30.946 [FAIL] D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(53)\WindowsPackageManager.dll!00007FFBA5E27F41: (caller: 00007FFBA5CF237C) LogHr(1) tid(2f08) 80072EE2 Msg:[D:\a_work\1\s\external\pkg\src\AppInstallerCommonCore\Downloader.cpp(104)\WindowsPackageManager.dll!00007FFBA5CA1F0A: (caller: 00007FFBA5CA2A69) Exception(1) tid(2f08) 80072EE2 Msg:[InternetReadFile() failed.] ]

2023-03-20 13:05:30.946 [REPO] Source add/update failed, waiting a bit and retrying: winget 2023-03-20 13:08:00.490 [FAIL] WindowsPackageManager.dll!00007FFBA5E1BD12: ReturnHr(1) tid(2f08) 80072EFF Msg:[winrt::hresult_error: 无法找到与此错误代码关联的文本。]

2023-03-20 13:08:00.491 [FAIL] D:\a_work\1\s\external\pkg\src\AppInstallerCommonCore\MsixInfo.cpp(312)\WindowsPackageManager.dll!00007FFBA5C92785: (caller: 00007FFBA5D0440F) Exception(2) tid(2f08) 80072EFF 2023-03-20 13:08:00.491 [FAIL] D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(663)\WindowsPackageManager.dll!00007FFBA5E27B6E: (caller: 00007FFBA5C3008D) LogHr(3) tid(2f08) 80072EFF Msg:[D:\a_work\1\s\external\pkg\src\AppInstallerCommonCore\MsixInfo.cpp(312)\WindowsPackageManager.dll!00007FFBA5C92785: (caller: 00007FFBA5D0440F) Exception(2) tid(2f08) 80072EFF ]

2023-03-20 13:08:00.491 [REPO] Failed to update source: winget 2023-03-20 13:08:00.491 [CLI ] Leaf command succeeded: root:source:update

Environment

❯ winget --info
Windows 程序包管理器 v1.4.10173
版权所有 (C) Microsoft Corporation。保留所有权利。

Windows: Windows.Desktop v10.0.22621.1265
系统体系结构: X64
软件包: Microsoft.DesktopAppInstaller v1.19.10173.0

日志: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

用户设置: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json

链接
----------------------------------------------------------------------------
隐私声明             https://aka.ms/winget-privacy
许可协议             https://aka.ms/winget-license
第三方声明           https://aka.ms/winget-3rdPartyNotice
主页                 https://aka.ms/winget
Windows 应用商店条款 https://www.microsoft.com/en-us/storedocs/terms-of-sale
stephengillie commented 1 year ago

Related:

BrandonWanHuanSheng commented 1 year ago

Does the connection has been resolved.

BrandonWanHuanSheng commented 1 year ago

I found out the certificate in winget.

BrandonWanHuanSheng commented 1 year ago

http://cdn.winget.microsoft.com/cache/source.msix is the winget source file. All the source root directory is cdn.winget.microsoft.com/cache

stephengillie commented 1 year ago

http://cdn.winget.microsoft.com/cache/source.msix is the winget source file. All the source root directory is cdn.winget.microsoft.com/cache

I check the root (https://cdn.winget.microsoft.com/) every day to make sure the certificate hasn't expired. Please note that you've linked to the HTTP URL for the WinGet source.msix file, which presents an HTML 404 response page, while HTTPS provides the file. Likewise, browsing the root directory presents an HTML 404 response page to HTTP, while HTTPS gets a storage-level XML "Resource Not Found" response.

Tarrowren commented 1 year ago

The download of source.msix is so slow that it stops after a short while and eventually times out😢

candrapersada commented 1 year ago

The download from github releases download speed of 180 KB/s for exe files that are over 100 MB in size and stops when it reaches 89 or 94 MB.

nexplorer-3e commented 1 year ago

Related:

Though MS says they have fixed the problem by check out repo to new CDN, there still may be difficult to access in some countries.

I solved the problem by checking out the source to USTC mirror. Help here If you are in China, try it out.