Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open PowerShell because of an exception that was thrown at the console related to Winget CLI [PFA} #4524

Closed
some-sh opened this issue Jun 3, 2024 · 3 comments
Labels
Area-External Issue outside of winget-cli source Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@some-sh
Copy link

some-sh commented Jun 3, 2024

Brief description of your issue

I'm using PowerShell v7.4.2 with Windows Terminal v1.20.11271.0 and winget.exe v1.7.11261. My laptop was not connected to the internet. When I opened the terminal, since PowerShell was my default profile, it opened but couldn't open the console. An exception was thrown on the console.

image

After connecting to the internet, it worked fine.

Steps to reproduce

  • Turn off the internet connection
  • Open PowerShell

Expected behavior

Expected the PowerShell console to open without any issues

Actual behavior

Console didn't open due to an exception raised

Environment

❯ winget.exe --info
Windows Package Manager v1.7.11261
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.3593
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.11261.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

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
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Jun 3, 2024
@stephengillie
Copy link

There was a new feature that - when given an unknown command, would lookup that command against winget list, and suggest any matches to package name, moniker, or commands. Or something very similar to this.

Related tangent: The package manager performs its matching against a copy of the repo stored in source.msix - if this file is more than 5 minutes old, it downloads a new copy, which might take several seconds.

It sounds like this feature might expect an Internet connection, and pre-seed the download process by calling winget list on startup. This way, when a user types vi textfile.txt on a new system, the shell can respond with something similar to "Try winget install vim".

Is it possible that this feature was released without testing the situation of not having an Internet connection?

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage Issue need to be triaged label Jun 3, 2024
@denelon denelon added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jun 3, 2024
@mdanish-kh
Copy link
Contributor

@microsoft-github-policy-service microsoft-github-policy-service bot added the Area-External Issue outside of winget-cli source label Jun 15, 2024
@denelon denelon added this to the 1.9 Client milestone Jul 11, 2024
@denelon
Copy link
Contributor

denelon commented Jul 11, 2024

@denelon denelon closed this as completed Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-External Issue outside of winget-cli source Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

4 participants