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

Regression: `winget pin add --id` is broken with sideBySide experimental feature

Open mdanish-kh opened this issue 10 months ago • 3 comments

Brief description of your issue

winget pin add with the --id filter does not work in the v1.8.924-preview build. Without the --id parameter the command works as expected

Steps to reproduce

~ winget -v
v1.7.10861
 ~ winget pin add --id Discord.Discord
Found Discord [Discord.Discord]
Pin added successfully
 ~ winget pin remove --id Discord.Discord
Found Discord [Discord.Discord]
Pin removed successfully

[update winget to preview build]

[!IMPORTANT] Enable side by side experimental feature

[pin without --id works]

 ~ winget pin add Discord.Discord
Found Discord [Discord.Discord]
Pin added successfully

[pin with --id does not work]

 ~ winget -v
v1.8.924-preview
 ~ winget pin add --id Discord.Discord
Found Discord [Discord.Discord]
An unexpected error occurred while executing the command:
GetVariant(14)
0x80070490 : Element not found.

Expected behavior

Pin added successfully

Actual behavior

 ~ winget pin add --id Discord.Discord
Found Discord [Discord.Discord]
An unexpected error occurred while executing the command:
GetVariant(14)
0x80070490 : Element not found.

Logs

WinGet-2024-04-05-21-21-51.529.log

Environment

~ winget --info
Windows Package Manager (Preview) v1.8.924-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3296
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.924.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                     Enabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

mdanish-kh avatar Apr 05 '24 16:04 mdanish-kh

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:

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

github-actions[bot] avatar Apr 05 '24 16:04 github-actions[bot]

Testing this further...this only occurs when I enable the sideBySide experimental feature. Setting the experimental flag to false resolves the issue

mdanish-kh avatar Apr 06 '24 03:04 mdanish-kh

[Policy] Experimental

mdanish-kh avatar Apr 06 '24 22:04 mdanish-kh

Circling back on this, I cannot reproduce now after #4432

JohnMcPMS avatar Jun 14 '24 16:06 JohnMcPMS

Just tried it on preview release v1.9.1551-preview that shipped with the changes in PR https://github.com/microsoft/winget-cli/pull/4432. The issue's resolved at my end as well!

mdanish-kh avatar Jun 14 '24 17:06 mdanish-kh