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

winget upgrade --id XP89DCGQ3K6VLD --version 0.81.1 fails even if winget upgrade says that version is available #4514

Open
sba923 opened this issue May 29, 2024 · 7 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. msstore Issue related to "msstore" REST source

Comments

@sba923
Copy link

sba923 commented May 29, 2024

Brief description of your issue

On a system where winget upgrade reports that version 0.81.1 of PowerToys is available, winget upgrade --id XP89DCGQ3K6VLD --version 0.81.1 fails with No version found matching: 0.81.1

Steps to reproduce

Run winget upgrade --id XP89DCGQ3K6VLD --version 0.81.1 on a system with PowerToys 0.81.0 installed

Expected behavior

PowerToys should be upgraded to 0.81.1

Actual behavior

image

Environment

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

Windows: Windows.Desktop v10.0.22621.3593
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.11261.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
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                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
Copy link

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:

Closed similar issues:

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

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label May 29, 2024
@Trenly
Copy link
Contributor

Trenly commented May 29, 2024

Does it work if you just run winget upgrade --id XP8DCGQ3K6VLD ?

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. msstore Issue related to "msstore" REST source Needs-Author-Feedback Issue needs attention from issue or PR author and removed Needs-Triage Issue need to be triaged labels May 29, 2024
@denelon
Copy link
Contributor

denelon commented May 29, 2024

This is an interesting looking edge case where at least at one point, it appears PowerToys had been installed using the Microsoft Store, and at another point, WinGet acted on the package using the "winget" source. I don't think I've seen this before. I'll have to see if there is a way I can reproduce this scenario, but my guess is it will have to wait until a newer version of PowerToys comes out and is published to the "winget" source after installing an earlier version from the "msstore" source.

I don't believe the upgrade command will do anything using the ID from the "msstore" source since that source doesn't provide a version for WinGet to reason about an upgrade being available. That's also why the "no match" error is being reported.

I'd say the "msstore" source is acting as expected (not necessarily what I'd want it to do) giving no version information to WinGet, so WinGet is also acting as expected giving the error message. The real issue in my mind is how the device got into that state, and how WinGet can do the right thing in the future given this scenario.

Nice find @sba923!

@denelon denelon removed the Needs-Author-Feedback Issue needs attention from issue or PR author label May 29, 2024
@denelon
Copy link
Contributor

denelon commented May 29, 2024

Get ready for a terrible run on sentence:

My best guess at clearing the issue up is to perform an uninstall using the store Id, and then a reinstall using the "winget" source since no automatic updates are afforded for Win32 packages coming from the "msstore" source, and no version information is coming from the "msstore" source via the endpoint used by WinGet to test using version logic for a newer version.

@sba923
Copy link
Author

sba923 commented May 29, 2024

No problem with the long sentence 😆

I had something like that in mind.

I actually ended up using PowerToys' self-update mechanism.

I can't even remember why the msstore source had been used on that machine.

The fact that I'm using a msstore application ID in conjunction with a version number is due to my workaround to #4283: I'm enumerating the available updates using Get-WinGetPackage and then perform the updates in a loop with winget upgrade --id XXX --version YYY.

@sba923
Copy link
Author

sba923 commented May 29, 2024

Does it work if you just run winget upgrade --id XP8DCGQ3K6VLD ?

sorry, can't test anymore as I have performed the upgrade another way 😢

@sba923
Copy link
Author

sba923 commented May 31, 2024

This is an interesting looking edge case where at least at one point, it appears PowerToys had been installed using the Microsoft Store, and at another point, WinGet acted on the package using the "winget" source. I don't think I've seen this before. I'll have to see if there is a way I can reproduce this scenario, but my guess is it will have to wait until a newer version of PowerToys comes out and is published to the "winget" source after installing an earlier version from the "msstore" source.

I don't believe the upgrade command will do anything using the ID from the "msstore" source since that source doesn't provide a version for WinGet to reason about an upgrade being available. That's also why the "no match" error is being reported.

I'd say the "msstore" source is acting as expected (not necessarily what I'd want it to do) giving no version information to WinGet, so WinGet is also acting as expected giving the error message. The real issue in my mind is how the device got into that state, and how WinGet can do the right thing in the future given this scenario.

Nice find @sba923!

You're welcome!

Based on your clarification, I'm removing the --version argument when my Update-AllAppsWithWinGet.ps1 script processes packages from the msstore source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. msstore Issue related to "msstore" REST source
Projects
None yet
Development

No branches or pull requests

3 participants