Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed in attempting to update the source: winget #3525

Open
nirgranth opened this issue Aug 16, 2023 · 4 comments
Open

Failed in attempting to update the source: winget #3525

nirgranth opened this issue Aug 16, 2023 · 4 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@nirgranth
Copy link

nirgranth commented Aug 16, 2023

Brief description of your issue

Failed in attempting to update the source: winget
when running anything

Steps to reproduce

Run a winget command

Expected behavior

No Errors

Actual behavior

Failed in attempting to update the source: winget

Environment

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

Windows: Windows.Desktop v10.0.22621.2134
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.2201.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
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

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Aug 16, 2023
@stephengillie stephengillie added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Aug 17, 2023
@stephengillie
Copy link

@brookst
Copy link

brookst commented Sep 13, 2023

I'm seeing the same. Here's an extract from my logs with a really weird error:

2023-09-13 14:33:55.027 [CORE] Downloading to path: C:\Users\Tim\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2023-09-13 14:33:55.027 [CORE] Started applying motw to C:\Users\Tim\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2023-09-13 14:33:55.028 [CORE] Finished applying motw
2023-09-13 14:33:55.028 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/source.msix
2023-09-13 14:33:55.029 [CORE] Download completed.
2023-09-13 14:33:55.029 [CORE] Starting AddPackage operation #1: file:///C:/Users/Tim/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix SkipSmartScreen: 1
2023-09-13 14:33:55.030 [CORE] Begin waiting for operation #1
2023-09-13 14:33:55.030 [CORE] Begin blocking for operation #1
2023-09-13 14:33:55.034 [CORE] Deployment operation #1: Common::Deployment::MsixvcStagingSession::GetManifestReader in MsixvcStagingSession failed with error 0x80070570.
2023-09-13 14:33:55.034 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFC895B14EF: (caller: 00007FFC895B1B7F) Exception(2) tid(cdd0) 80070570 The file or directory is corrupted and unreadable.
    Msg:[Operation failed: Common::Deployment::MsixvcStagingSession::GetManifestReader in MsixvcStagingSession failed with error 0x80070570.] 

2023-09-13 14:33:55.042 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(671)\WindowsPackageManager.dll!00007FFC8972B49E: (caller: 00007FFC89508C2A) LogHr(2) tid(cdd0) 80070570 The file or directory is corrupted and unreadable.
    Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFC895B14EF: (caller: 00007FFC895B1B7F) Exception(2) tid(cdd0) 80070570 The file or directory is corrupted and unreadable.
    Msg:[Operation failed: Common::Deployment::MsixvcStagingSession::GetManifestReader in MsixvcStagingSession failed with error 0x80070570.] 
] 

2023-09-13 14:33:55.042 [REPO] Failed to update source: winget

The file C:/Users/Tim/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix is 0B but downloading from https://cdn.winget.microsoft.com/cache/source.msix gives an 8MB file which I assume is correct.

The log seems to indicate that the source download was complete. I would have expected some kind of error with the download if it wrote zero bytes of data from the request. It looks like it just tries to parse it regardless and of course can't read anything.

@g0t4
Copy link

g0t4 commented Sep 26, 2023

Sounds like there are currently CDN issues: #3652 (comment)

@HenkPoley
Copy link

HenkPoley commented Sep 27, 2023

What resolved "Failed in attempting to update the source: winget" for me:

  1. Download this file: https://cdn.winget.microsoft.com/cache/source.msix (e.g. with Edge)
  2. Open the Downloads folder
  3. 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: #3652 (comment)

But I was running a more recent version anyways (1.5? 1.6.??).

@github-actions github-actions bot mentioned this issue Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

5 participants