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

[PowerShell Module]: CatalogError if fetching msstore packages fails #4784

Closed
mdanish-kh opened this issue Sep 3, 2024 · 1 comment · Fixed by #5179
Closed

[PowerShell Module]: CatalogError if fetching msstore packages fails #4784

mdanish-kh opened this issue Sep 3, 2024 · 1 comment · Fixed by #5179
Assignees
Labels
In-PR Issue related to a PR Issue-Bug It either shouldn't be doing this or needs an investigation. msstore Issue related to "msstore" REST source PowerShell Issue related to WinGet PowerShell Module or cmdlet

Comments

@mdanish-kh
Copy link
Contributor

mdanish-kh commented Sep 3, 2024

Brief description of your issue

Get-WinGetPackage returns CatalogError:

 ~ Get-WinGetPackage
Get-WinGetPackage: An error occurred while searching for packages: CatalogError

I don't know where to get the associated logs from, but I believe it's failing update msstore source. How do I know this? Well for one, Get-WinGetPackage -Source winget works fine. And also winget list output shows me Failed when searching source; results will not be included: msstore (root cause of which is I believe #4785)

I think the expected behavior would be that instead of completely failing if one source errors out, Get-WinGetPacakge should return the packages it's able to find successfully i.e., making the behavior consistent with winget list

Steps to reproduce

  1. Have msstore source failing
  2. Do Get-WinGetPackage
  3. See the cmdlet fail as well

Expected behavior

Get-WinGetPackage should return packages from winget or other configured sources

Actual behavior

Command errors out with CatalogError

Environment

~ Get-Module Microsoft.WinGet.Client | Select Version

Version
-------
1.9.2411
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Sep 3, 2024
Copy link

github-actions bot commented Sep 3, 2024

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!

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 Issue-Bug It either shouldn't be doing this or needs an investigation. msstore Issue related to "msstore" REST source PowerShell Issue related to WinGet PowerShell Module or cmdlet and removed Needs-Triage Issue need to be triaged labels Sep 3, 2024
@mdanish-kh mdanish-kh changed the title [PowerShell Module]: CatalogError when fetching msstore packages [PowerShell Module]: CatalogError if fetching msstore packages fails Sep 3, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR Issue related to a PR label Feb 4, 2025
@denelon denelon added this to WinGet Feb 4, 2025
@denelon denelon moved this to In Progress in WinGet Feb 4, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in WinGet Feb 4, 2025
JohnMcPMS pushed a commit that referenced this issue Feb 5, 2025
…ponses (#5179)

When searching for store source with id that's recently taken down,
store source will return 404 instead of empty results (what
winget-cli-restsource does). This will be treated as a source search
error in our code. The fix is to treat 404 response with certain schema
as empty result instead of failure.

Tested manually with store source and added unit tests.

fixes #4785, fixes #4784
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In-PR Issue related to a PR Issue-Bug It either shouldn't be doing this or needs an investigation. msstore Issue related to "msstore" REST source PowerShell Issue related to WinGet PowerShell Module or cmdlet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants