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

Error 0x8a15003f on "winget upgrade" (The source data is corrupted or tampered) #4224

Open NotTwerp opened 8 months ago

NotTwerp commented 8 months ago

Brief description of your issue

When trying to use winget upgrade --all, I get the following error message:

[...]
55 upgrades available.
2 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
An unexpected error occurred while executing the command: 
0x8a15003f : The source data is corrupted or tampered

Steps to reproduce

  1. Execute winget upgrade --all

Expected behavior

Installing available package updates

Actual behavior

Error 0x8a15003f : The source data is corrupted or tampered

Environment

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

Windows: Windows.Desktop v10.0.22631.3235
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10582.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
Installer Downloads                %USERPROFILE%\Downloads

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

Log File

2024-03-02 19:53:51.106 [CLI ] Starting installer selection.
2024-03-02 19:53:51.106 [CLI ] Installer [X86,msi,Machine,en-US] not applicable: Installed package type 'exe' is not compatible with installer type msi, or with accepted type(s) unknown
2024-03-02 19:53:51.106 [CLI ] Installer [X64,msi,Machine,en-US] not applicable: Installed package type 'exe' is not compatible with installer type msi, or with accepted type(s) unknown
2024-03-02 19:53:51.106 [CLI ] Installer [Arm64,msi,Machine,en-US] not applicable: Installed package type 'exe' is not compatible with installer type msi, or with accepted type(s) unknown
2024-03-02 19:53:51.106 [CLI ] Installer [Arm64,msi,Machine,en-US] not applicable: Machine is not compatible with Arm64
2024-03-02 19:53:51.107 [REPO] Downloading manifest
2024-03-02 19:53:51.107 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/manifests/m/Microsoft/Edge/119.0.2151.72/77be
2024-03-02 19:53:51.610 [CORE] Download request status success.
2024-03-02 19:53:51.610 [CORE] Download size: 3002
2024-03-02 19:53:51.611 [CORE] Download hash: cce256484e630930c943175a12171cb2148d9d5d5acf0c4e9542e0d3cf381721
2024-03-02 19:53:51.611 [CORE] Download completed.
2024-03-02 19:53:51.611 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\SQLiteIndexSource.cpp(156)\WindowsPackageManager.dll!00007FF99944ECC2: (caller: 00007FF99944DE86) Exception(33) tid(2b0) 8A15003F 
2024-03-02 19:53:51.611 [REPO] Downloading manifest failed, waiting a bit and retrying: https://cdn.winget.microsoft.com/cache/manifests/m/Microsoft/Edge/119.0.2151.72/77be
2024-03-02 19:53:52.121 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/manifests/m/Microsoft/Edge/119.0.2151.72/77be
2024-03-02 19:53:52.121 [CORE] Download request status success.
2024-03-02 19:53:52.121 [CORE] Download size: 3002
2024-03-02 19:53:52.121 [CORE] Download hash: cce256484e630930c943175a12171cb2148d9d5d5acf0c4e9542e0d3cf381721
2024-03-02 19:53:52.121 [CORE] Download completed.
2024-03-02 19:53:52.122 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\SQLiteIndexSource.cpp(156)\WindowsPackageManager.dll!00007FF99944ECC2: (caller: 00007FF99944DE86) Exception(34) tid(2b0) 8A15003F 
2024-03-02 19:53:52.122 [CLI ] Caught wil::ResultException: C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\SQLiteIndexSource.cpp(156)\WindowsPackageManager.dll!00007FF99944ECC2: (caller: 00007FF99944DE86) Exception(34) tid(2b0) 8A15003F 

Note

I've already tried:

none of which made any difference.

github-actions[bot] commented 8 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

denelon commented 8 months ago

Have you tried winget source update?

I suspect the Pre-Indexed package cache is out of date. If that doesn't work, you can try removing it and refreshing.

Microsoft.Winget.Source_8wekyb3d8bbwe is the package identifier for the WinGet community source index.

NotTwerp commented 8 months ago

winget source update doesn't work either.

How do I remove/refresh the cache?

denelon commented 8 months ago

Try uninstalling the source using winget uninstall Microsoft.Winget.Source_8wekyb3d8bbwe. Then run winget source update.

NotTwerp commented 8 months ago

I did that and now I get this:

2 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.

An unexpected error occurred while executing the command:
Bad optional access

Logs:

2024-03-04 19:52:58.218 [CLI ] Starting installer selection.
2024-03-04 19:52:58.218 [CLI ] Installer [Arm64,burn,Unknown,] not applicable: Machine is not compatible with Arm64
2024-03-04 19:52:58.218 [CLI ] Installer [X64,burn,Unknown,] is current best choice
2024-03-04 19:52:58.218 [CLI ] Installer [X64,burn,Unknown,] is better [strong] than [X86,burn,Unknown,] due to: Machine Architecture
2024-03-04 19:52:58.218 [CLI ] Completed installer selection.
2024-03-04 19:52:58.218 [CLI ] Selected installer Architecture: 2
2024-03-04 19:52:58.218 [CLI ] Selected installer URL: https://dotnetcli.azureedge.net/dotnet/Runtime/3.1.32/dotnet-runtime-3.1.32-win-x64.exe
2024-03-04 19:52:58.218 [CLI ] Selected installer InstallerType: burn
2024-03-04 19:52:58.218 [CLI ] Selected installer Scope: Unknown
2024-03-04 19:52:58.218 [CLI ] Selected installer Language: 
2024-03-04 19:52:58.218 [CLI ] Manifest fields: Name [Microsoft .NET Runtime 3.1], Version [3.1.32]
2024-03-04 19:52:58.219 [CLI ] Market Filter created with market: **
2024-03-04 19:52:58.219 [CLI ] Locale Comparator created with Required Locales: [] , Preferred Locales: [en-US] , IsInstalledLocale: 0
2024-03-04 19:52:58.219 [CLI ] Architecture Comparator created with allowed architectures: [X64, X86, Neutral]
2024-03-04 19:52:58.222 [REPO] Attempting to open pinning database: C:\Users\<me>\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db
2024-03-04 19:52:58.222 [CLI ] Terminating context: 0x8a15002b at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:bc
2024-03-04 19:52:58.223 [CLI ] Market Filter created with market: **
2024-03-04 19:52:58.223 [CLI ] Locale Comparator created with Required Locales: [] , Preferred Locales: [en-US] , IsInstalledLocale: 0
2024-03-04 19:52:58.223 [CLI ] Architecture Comparator created with allowed architectures: [X64, X86, Neutral]
2024-03-04 19:52:58.226 [REPO] Attempting to open pinning database: C:\Users\<me>\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db
2024-03-04 19:52:58.226 [CLI ] Terminating context: 0x8a15002b at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:bc
2024-03-04 19:52:58.226 [CLI ] Caught std::exception: Bad optional access
denelon commented 8 months ago

That looks like it might be related to:

exoosh commented 2 months ago

Seeing the same now after the recent issue where bootmgr would suddenly be able to unseal the Bitlocker master and volume keys and prompt for the recover key.

I tried your suggestion as well:

Try uninstalling the source using winget uninstall Microsoft.Winget.Source_8wekyb3d8bbwe. Then run winget source update.

And after the winget source update I ran winget upgrade and am met again with the same error as before:

>winget upgrade
An unexpected error occurred while executing the command:
0x8a15003f : The source data is corrupted or tampered
>winget --info
Windows Package Manager v1.8.1911
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.4780
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.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
Installer Downloads                %USERPROFILE%\Downloads

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                        Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Enabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

Please note that my first instinct was to run winget source reset --force, which also didn't help.

@NotTwerp were you ever able to resolve this?


Excerpt from the logs (last few lines leading up to and showing the failure):

2024-08-28 10:32:25.494 [REPO]   Checking match with package id: Microsoft.DotNet.AspNetCore.6
2024-08-28 10:32:25.494 [REPO]   Checking match with package id: Microsoft.DotNet.AspNetCore.3_1
2024-08-28 10:32:25.494 [REPO]   Checking match with package id: Microsoft.DotNet.AspNetCore.5
2024-08-28 10:32:25.494 [REPO]   Checking match with package id: Microsoft.DotNet.AspNetCore.7
2024-08-28 10:32:25.494 [REPO]   Checking match with package id: Microsoft.DotNet.AspNetCore.8
2024-08-28 10:32:25.494 [REPO]  ... adding available package: Microsoft.DotNet.AspNetCore.6
2024-08-28 10:32:25.495 [CORE] Getting upstream file from remote: https://cdn.winget.microsoft.com/cache/packages/Microsoft.DotNet.AspNetCore.6/29f7b91a/versionData.mszyml
2024-08-28 10:32:25.495 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/packages/Microsoft.DotNet.AspNetCore.6/29f7b91a/versionData.mszyml
2024-08-28 10:32:25.506 [CORE] Download request status success.
2024-08-28 10:32:25.506 [CORE] Download size: 1626
2024-08-28 10:32:25.507 [CORE] Download hash: e1dadcbc56ed4ec39b232dfd72f6afdca1078704e9a7d0a6fabd6e4f492a43d3
2024-08-28 10:32:25.507 [CORE] Download completed.
2024-08-28 10:32:25.507 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\FileCache.cpp(58)\WindowsPackageManager.dll!00007FF9ABE52EC4: (caller: 00007FF9ABE52445) Exception(1) tid(498) 8A15003F 
2024-08-28 10:32:25.507 [CORE] Getting upstream file failed, waiting a bit and retrying: https://cdn.winget.microsoft.com/cache/packages/Microsoft.DotNet.AspNetCore.6/29f7b91a/versionData.mszyml
2024-08-28 10:32:26.012 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/packages/Microsoft.DotNet.AspNetCore.6/29f7b91a/versionData.mszyml
2024-08-28 10:32:26.013 [CORE] Download request status success.
2024-08-28 10:32:26.013 [CORE] Download size: 1626
2024-08-28 10:32:26.013 [CORE] Download hash: e1dadcbc56ed4ec39b232dfd72f6afdca1078704e9a7d0a6fabd6e4f492a43d3
2024-08-28 10:32:26.013 [CORE] Download completed.
2024-08-28 10:32:26.013 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\FileCache.cpp(58)\WindowsPackageManager.dll!00007FF9ABE52EC4: (caller: 00007FF9ABE52445) Exception(2) tid(498) 8A15003F 
2024-08-28 10:32:26.013 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\FileCache.cpp(228)\WindowsPackageManager.dll!00007FF9ABE880DF: (caller: 00007FF9ABE51DF7) LogHr(1) tid(498) 8A15003F     Msg:[GetUpstreamFile failed on source: https://cdn.winget.microsoft.com/cache -- C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\FileCache.cpp(58)\WindowsPackageManager.dll!00007FF9ABE52EC4: (caller: 00007FF9ABE52445) Exception(2) tid(498) 8A15003F ] 

2024-08-28 10:32:26.014 [CLI ] Caught wil::ResultException: C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\FileCache.cpp(58)\WindowsPackageManager.dll!00007FF9ABE52EC4: (caller: 00007FF9ABE52445) Exception(2) tid(498) 8A15003F 
NotTwerp commented 2 months ago

@exoosh No, I wasn't. I've tried everything I could think of (though not that recently), so I might just have to reinstall or try again now.

exoosh commented 2 months ago

@exoosh No, I wasn't. I've tried everything I could think of (though not that recently), so I might just have to reinstall or try again now.

Give the method from here a try. It worked for me in the end.