package search in winget does not work the first time you run it
Brief description of your issue
The package search in winget does not work the first time you run it. On the second attempt, it works.
Steps to reproduce
winget search Microsoft.PowerShell
Expected behavior
winget finds 2 packages (second try)
C:\Users\pedri>winget search Microsoft.PowerShell
Name Id Version Source
---------------------------------------------------------------
PowerShell Microsoft.PowerShell 7.2.7.0 winget
PowerShell Preview Microsoft.PowerShell.Preview 7.3.8.0 winget
Actual behavior
winget finds 0 packages (first try)
C:\Users\pedri>winget search Microsoft.PowerShell
Failed in attempting to update the source: winget
The `msstore` source requires that you view the following agreements before using.
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").
Do you agree to all the source agreements terms?
[Y] Yes [N] No: y
Failed when searching source; results will not be included: winget
No package found matching input criteria.
Environment
Windows Package Manager v1.3.2691
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22623.875
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2691.0
Failed in attempting to update the source: winget
Failed when searching source; results will not be included: winget
It's probably because of this problem ( #2666 ) that the search is skipped. Please check again after resolving issues with updating catalog data.
@0xdeadc0d3 can you check again?
Just installed winget literally 5 minutes ago on a fresh device and I'm getting the following when I try some of the suggested fixes here:
winget source reset --force Resetting all sources...Done
winget search Microsoft.PowerShell
The msstore source requires that you view the following agreements before using.
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").
Do you agree to all the source agreements terms? [Y] Yes [N] No: Y Failed when searching source; results will not be included: winget No package found matching input criteria.
winget search Microsoft.PowerShell Failed when searching source; results will not be included: winget No package found matching input criteria.