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

Error while trying to list installed packages or upgrade them (Win 11)

Open Camatius opened this issue 2 years ago • 5 comments

Brief description of your issue

Error when trying to upgrade, list or install anything with winget.

Steps to reproduce

Don't have any exact steps - from the events in last time it could possibly be connected to computer migration from one company domain to another (new user in windows which is in every other aspect identical to previous one) - but I don't have info about the exact steps of migration...

Expected behavior

Winget should be able to work with any profile on the Windows...

Actual behavior

I'm getting error: Failed when opening source(s); try the 'source reset' command if the problem persists. An unexpected error occurred while executing the command: 0x800f024b : The hash for the file is not present in the specified catalog file. The file is likely corrupt or the victim of tampering.

Environment

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

Windows: Windows.Desktop v10.0.22621.2215
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

Camatius avatar Aug 28 '23 13:08 Camatius

I know there are sometimes issues when trying to use winget from a different user account than the user who installed it (depending on how it was installed). I don't quite remember which issue contains the details, but if I can find it, I'll link it.

Are you able to try installing winget manually on your profile, either by using Add-AppxPackage https://aka.ms/getwinget or downloading and running the package from https://aka.ms/getwinget?

Trenly avatar Aug 28 '23 14:08 Trenly

I'm sorry, i didn't catch the notification for your message.

Yes. Actually I've tried it but doesn't understand the result. Installation process run and ended without any errors. In manual installer I see information that App is already installed with version 1.20.2201, when I try to run it. But it doesn't make any change to winget behaviour.

image

Camatius avatar Sep 18 '23 07:09 Camatius

I've a similiar Issue, which is connected to this, resulting in the same error. https://github.com/marticliment/WingetUI/issues/1544

LittleFreak avatar Nov 02 '23 14:11 LittleFreak

I received the same error after migrating a local user account to an Entra ID (formerly Azure AD) account. I was able to resolve it with the following Powershell command: Get-AppxPackage Microsoft.DesktopAppInstaller | Reset-AppxPackage

chrome-penguin avatar Nov 02 '23 21:11 chrome-penguin

Thanks @chrome-penguin I had this issue with our VDIs and FSLogix recently as well. Looks like these packages all make the incorrect assumption that the user profile is tightly coupled to the machine. Given that FSLogix is a Microsoft product, that's not the case.

EmperorArthur avatar Nov 17 '25 05:11 EmperorArthur