Skip to content

Any REST source being unavailable completely breaks winget install/show/list/search/upgrade. #1349

Closed

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

  1. 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]).
  2. Once the source is added successfully, shut down the server for the source or otherwise make it unavailable.
  3. Try to use winget install, show, list, upgrade or search with 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.

Activity

  1. ghost added
    Needs-Triage
    on Aug 5, 2021
  2. changed the title [-]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.[/+] on Aug 5, 2021
  3. added
    Issue-Bug
    and removed
    Needs-Triage
    on Aug 5, 2021
  4. jedieaston commented on Sep 6, 2021

    @jedieaston
    ContributorAuthor

    Since the "newstore" source uses the REST client, the morning of 9/6 WinGet cannot be used unless you add the argument --source winget after all of your commands. (or delete the newstore source, of course)

    image

  5. ghost added
    In-PR
    on Sep 15, 2021
  6. ghost removed
    In-PR
    on Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions