winget-cli
winget-cli copied to clipboard
Regression: `winget pin add --id` is broken with sideBySide experimental feature
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
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:
-
winget pin list
does not recognize package ID parameter (#4340), similarity score: 0.77 -
winget pin add
can't find packages found bywinget list
if ID is an UUID (#3991), similarity score: 0.76 - Pin By ID misbehaves (#2965), similarity score: 0.75
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Testing this further...this only occurs when I enable the sideBySide
experimental feature. Setting the experimental flag to false resolves the issue
[Policy] Experimental
Circling back on this, I cannot reproduce now after #4432
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!