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

Cannot upgrade/uninstall nested portables coming from an older version of WinGet #3279

Open
mdanish-kh opened this issue May 27, 2023 · 2 comments
Labels
Command-Uninstall Issue related to WinGet Uninstall Command-Upgrade Issue related to WinGet Upgrade Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package

Comments

@mdanish-kh
Copy link
Contributor

mdanish-kh commented May 27, 2023

Brief description of your issue

Nested portable applications where the executable is located inside of a subdirectory in the archive suffered from issue #2909 that was patched in the preview version of WinGet in PR #3002. Users can benefit from the patched behavior if they upgrade to the preview version and install these apps for the first time (no prior installation). However, users coming from WinGet 1.4 who already had the package installed need to first uninstall the existing installation or upgrade to a newer version if available to get the correct value in their PATH env variable. The issue is that users are not able to perform an uninstall/upgrade of these apps and the command gets stuck indefinitely.

Steps to reproduce

  1. Install WinGet version 1.4.10173
  2. Ensure developer mode is turned off to prevent symlink creation.
  3. Install apps like Gyan.FFmpeg, BurntSushi.ripgrep.GNU, Helm.Helm from a USER shell (again to prevent symlink creation). Install an older version to test upgrade scenario (e.g. winget install Gyan.ffmpeg --version 5.1.2). If you try to uninstall the apps at this stage, the command would succeed
  4. Upgrade to the preview release WinGet v1.5.1361
  5. Try to upgrade/uninstall the apps from a user/admin shell.

Expected behavior

Uninstall/Upgrade succeeds

Actual behavior

Command gets stuck indefinitely at Starting package uninstall... / Starting package install... (in upgrade scenario)

Interesting thing to note here is that in the upgrade scenario, the values are actually overwritten in the registry, but the archive isn't extracted properly inside the Packages directory. Here I was upgrading Gyan.FFmpeg from 5.1.2 to 6.0
image

Workaround

The workaround I found to remove these packages to unblock upgrade/uninstall scenario is:

  • Either downgrade to WinGet 1.4 and then uninstall the package
  • Or perform a manual uninstall which would mean:
    • Delete directory from %LOCALAPPDATA%\Microsoft\WinGet\Packages
    • Manually remove the value from PATH variable
    • Delete the relevant registry key from HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\

Logs

Logs generated after having to manually Ctrl-C the indefinitely stuck commands

WinGet-2023-05-27-17-03-08.610.log (stuck in upgrade command)
WinGet-2023-05-27-17-09-28.883.log (stuck in uninstall command)

Environment

Windows Package Manager (Preview) v1.5.1361-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.1702
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.1361.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
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
@kkbruce
Copy link

kkbruce commented Dec 8, 2023

winget -v
v1.6.3133

same issue.

@mdanish-kh
Copy link
Contributor Author

[Policy] Command-Upgrade
[Policy] Command-Uninstall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Uninstall Issue related to WinGet Uninstall Command-Upgrade Issue related to WinGet Upgrade Issue-Bug It either shouldn't be doing this or needs an investigation. Portable Issue related to portable package
Projects
None yet
Development

No branches or pull requests

3 participants