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

package search in winget does not work the first time you run it

Open 0xdeadc0d3 opened this issue 3 years ago • 1 comments

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

0xdeadc0d3 avatar Nov 06 '22 16:11 0xdeadc0d3

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.

iDolmatov avatar Nov 07 '22 00:11 iDolmatov

@0xdeadc0d3 can you check again?

denelon avatar Nov 14 '22 23:11 denelon

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.

uhFuzu avatar Dec 21 '22 14:12 uhFuzu