Open Trenly opened 5 months ago
After more investigation, this occurs only in the sandbox because the Region
in the sandbox is set to World
. This causes the PackageMatchField
for Market
to be -
{"PackageMatchField":"Market","RequestMatch":{"KeyWord":"ZZ","MatchType":"CaseInsensitive"}}
This in turn causes the msstore
source to return the following 400
response -
{
"code": "InvalidParameterValue",
"data": [],
"details": [],
"innererror": {
"code": "InvalidParameterValue",
"data": [],
"details": [],
"message": "Parameter market was specified with invalid value: ZZ.",
"source": "StoreEdgeFD",
"target": "market"
},
"message": "Parameter market was specified with invalid value: ZZ.",
"source": "StoreEdgeFD",
"target": "market"
}
Manually setting the region inside the sandbox causes the error to go away. The same can be verified in PowerShell (or PostMan)
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$body = @"
{`"Filters`":[{`"PackageMatchField`":`"Market`",`"RequestMatch`":{`"KeyWord`":`"ZZ`",`"MatchType`":`"CaseInsensitive`"}}],`"Inclusions`":[{`"PackageMatchField`":`"PackageName`",`"RequestMatch`":{`"KeyWord`":`"Xodo`",`"MatchType`":`"Substring`"}}]}
"@
$response = Invoke-RestMethod 'https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch' -Method 'POST' -Headers $headers -Body $body
$body = @"
{`"Filters`":[{`"PackageMatchField`":`"Market`",`"RequestMatch`":{`"KeyWord`":`"US`",`"MatchType`":`"CaseInsensitive`"}}],`"Inclusions`":[{`"PackageMatchField`":`"PackageName`",`"RequestMatch`":{`"KeyWord`":`"Xodo`",`"MatchType`":`"Substring`"}}]}
"@
$response = Invoke-RestMethod 'https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
@denelon - Seems like this is an issue with the msstore
source then, and not necessarily the sandbox. Would you mind updating the tags?
Brief description of your issue
Tried installing a package in Windows Sandbox, got an error that there was a failure when searching MSStore source
Steps to reproduce
Run
winget install <id>
in Windows SandboxExpected behavior
The search to succeed and package to be installed from winget source
Actual behavior
WinGet-2024-03-29-12-36-10.899.log
As a note - this seems to only affect Windows Sandbox (at least in my environment) and only affects
winget install
andwinget uninstall
Environment