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

Fails to uninstall using manifest files

Open noyard opened this issue 7 months ago • 5 comments

Brief description of your issue

Fails to uninstall an application installed by Winget using manifest files. received the error "Failed when opening source(s); try the 'source reset' command if the problem persists."

Steps to reproduce

PS C:\apps> Winget install --manifest C:\apps\code Found Microsoft Visual Studio Code [Microsoft.VisualStudioCode] Version 1.100.2 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://apps.blob.core.windows.net/winget-pkgs/manifests/m/Microsoft/VisualStudioCode/1.100.2/VSCodeUserSetup-x64-1.100.2.exe ██████████████████████████████ 103 MB / 103 MB Successfully verified installer hash Starting package install... Successfully installed PS C:\apps> Winget uninstall --manifest C:\apps\code --force Failed when opening source(s); try the 'source reset' command if the problem persists.

Expected behavior

Visual Studio Code uninstalled without failure.

Actual behavior

recieving "Failed when opening source(s); try the 'source reset' command if the problem persists."

Environment

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

Windows: Windows.Desktop v10.0.19045.5854
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.25.390.0

noyard avatar May 21 '25 18:05 noyard

Can you share the manifest file(s) used?

denelon avatar May 22 '25 03:05 denelon

the manifests are a copy of the manifests at https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Microsoft/VisualStudioCode/1.100.2 but with the Microsoft.VisualStudioCode.installer.yaml modified with InstallerUrl parameter pointed to an Azure Storage account (with the content downloaded to the storage account). I have it setup that way because I cannot get to the Winget source (network restricted).

I am also having the issue with other applications like 7zip and WinMerge.

noyard avatar May 22 '25 03:05 noyard

If you're network restricted from the community repository, I suspect the failure is due to that not being able to be updated/initialized. Does the problem happen if you remove the "winget" source (and/or the "msstore" source)?

denelon avatar May 22 '25 04:05 denelon

----Removing only msstore source PS C:\apps> winget source remove msstore Removing source: msstore... Done PS C:\Apps> Winget uninstall --manifest C:\apps\code --force Failed when opening source(s); try the 'source reset' command if the problem persists. An unexpected error occurred while executing the command: 0x8a15000f : Data required by the source is missing

----Removing only winget source PS C:\apps> winget source remove winget Removing source: winget... Done PS C:\apps> Winget uninstall --manifest C:\apps\code --force No sources defined; add one with 'source add' or reset to defaults with 'source reset'

----Removing both sources PS C:\apps> winget source remove winget Removing source: winget... Done PS C:\apps> winget source remove msstore Removing source: msstore... Done PS C:\apps> winget source list There are no sources configured. PS C:\apps> Winget uninstall --manifest C:\apps\code --force No sources defined; add one with 'source add' or reset to defaults with 'source reset'

noyard avatar May 22 '25 13:05 noyard

OK, thanks!

denelon avatar May 22 '25 20:05 denelon