Repository navigation
Closed
Labels
Issue-BugIt either shouldn't be doing this or needs an investigation.
Milestone
Description
Brief description of your issue
If a REST source has been added to winget and is unavailable, you are no longer able to use winget install, show, list , upgrade or search even if you have other sources which are available.
Steps to reproduce
- Add a rest source to winget via
winget source add --type "Microsoft.Rest" -n <name> <address of repository>(in addition to the default source[s]). - Once the source is added successfully, shut down the server for the source or otherwise make it unavailable.
- Try to use
winget install,show,list,upgradeorsearchwith valid arguments.
Expected behavior
The command executes successfully since you have other sources available to query.
Actual behavior
All commands fail since they cannot reach the source you added, even if other sources are available. The log file claims that winget is attempting to build an aggregated source to query against since there are multiple to choose from, but when the first one can't be contacted it bails out.
PS C:\Users\easton> winget install Microsoft.WindowsTerminal
Failed to open the source; try the 'source reset' command if the problem persists.
An unexpected error occurred while executing the command:
WinHttpSendRequest: 12029: A connection with the server could not be established
PS C:\Users\easton> winget search Microsoft.WindowsTerminal
Failed to open the source; try the 'source reset' command if the problem persists.
An unexpected error occurred while executing the command:
WinHttpSendRequest: 12029: A connection with the server could not be established
PS C:\Users\easton> winget upgrade
Failed to open the source; try the 'source reset' command if the problem persists.
An unexpected error occurred while executing the command:
WinHttpSendRequest: 12029: A connection with the server could not be established
PS C:\Users\easton> # Oh-no!
Environment
[winget --info]
Windows Package Manager v1.0.11694
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22000.100
Package: Microsoft.DesktopAppInstaller v1.15.11694.0
Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
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
Any other software? This is running on ARM, although since it's the same package for all architectures I doubt that's relevant.
Metadata
Metadata
Assignees
Labels
Issue-BugIt either shouldn't be doing this or needs an investigation.
Activity
[-]Any REST source being unavailable breaks winget install/show/list/search/upgrade.[/-][+]Any REST source being unavailable completely breaks winget install/show/list/search/upgrade.[/+]jedieaston commentedon Sep 6, 2021
Since the "newstore" source uses the REST client, the morning of 9/6 WinGet cannot be used unless you add the argument
--source wingetafter all of your commands. (or delete the newstore source, of course)