-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Exception on opening Powershell 7.4.2 with #33304
Comments
I have the Powertoys winget.commandnotfound module enabled which adds a line to the powershell profile.
If you haven't enabled this module in PowerToys though, I have no clue what else could be causing it. |
They probably need to add some exception handling so that the pwsh process itself doesnt exit, since it doesn't make any sense for the entire shell instance to exit with error just because a minor feature is not up |
Same. Trying to enter a non-existent command when there is no network connection, PowerShell (7.4.2) exits and prints:
|
Something wrong! This errror is happened sometimes. PowerShell 7.4.2 An error has occurred that was not properly handled. Additional information is shown below. The PowerShell process will exit.
Unhandled exception. System.Management.Automation.CmdletInvocationException: An error occurred while connecting to the catalog.
---> Microsoft.WinGet.Client.Engine.Exceptions.CatalogConnectException: An error occurred while connecting to the catalog.
at Microsoft.WinGet.Client.Engine.Commands.Common.FinderCommand.GetPackageCatalog(CompositeSearchBehavior behavior)
at Microsoft.WinGet.Client.Engine.Commands.Common.FinderCommand.FindPackages(CompositeSearchBehavior behavior, UInt32 limit, PackageFieldMatchOption match)
at Microsoft.WinGet.Client.Engine.Commands.Common.FinderExtendedCommand.FindPackages(CompositeSearchBehavior behavior, PackageFieldMatchOption match)
at Microsoft.WinGet.Client.Engine.Commands.FinderPackageCommand.<>c__DisplayClass1_0.<Find>b__0()
at Microsoft.WinGet.Client.Engine.Commands.Common.ManagementDeploymentCommand.Execute[TResult](Func`1 func)
at Microsoft.WinGet.Client.Engine.Commands.FinderPackageCommand.Find(String psPackageFieldMatchOption)
at Microsoft.WinGet.Client.Commands.FindPackageCmdlet.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
at Microsoft.WinGet.CommandNotFound.WinGetCommandNotFoundFeedbackPredictor.WarmUp()
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
at System.Threading.QueueUserWorkItemCallback.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() |
Same issue when there is no network connection, I have to uninstall "Command Not Found" until this problem is solved. |
There is new release of Command not Found to address the exception: https://github.com/microsoft/winget-command-not-found/releases/tag/v1.0.3 |
Microsoft PowerToys version
0.81.1
Installation method
WinGet
Running as admin
No
Area(s) with issue?
Command not found
Steps to reproduce
Just open Powershell with Command not found already set up.
✔️ Expected Behavior
Powershell to open without any error.
❌ Actual Behavior
You get an error that says this:
Unhandled exception. System.Management.Automation.CmdletInvocationException: An error occurred while connecting to the catalog.
---> Microsoft.WinGet.Client.Engine.Exceptions.CatalogConnectException: An error occurred while connecting to the catalog.
at Microsoft.WinGet.Client.Engine.Commands.Common.FinderCommand.GetPackageCatalog(CompositeSearchBehavior behavior)
at Microsoft.WinGet.Client.Engine.Commands.Common.FinderCommand.FindPackages(CompositeSearchBehavior behavior, UInt32 limit, PackageFieldMatchOption match)
at Microsoft.WinGet.Client.Engine.Commands.Common.FinderExtendedCommand.FindPackages(CompositeSearchBehavior behavior, PackageFieldMatchOption match)
at Microsoft.WinGet.Client.Engine.Commands.FinderPackageCommand.<>c__DisplayClass1_0.b__0()
at Microsoft.WinGet.Client.Engine.Commands.Common.ManagementDeploymentCommand.Execute[TResult](Func
1 func) at Microsoft.WinGet.Client.Engine.Commands.FinderPackageCommand.Find(String psPackageFieldMatchOption) at Microsoft.WinGet.Client.Commands.FindPackageCmdlet.ProcessRecord() at System.Management.Automation.CommandProcessor.ProcessRecord() --- End of inner exception stack trace --- at System.Management.Automation.Runspaces.AsyncResult.EndInvoke() at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory
1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action
1 endAction, Task`1 promise, Boolean requiresSynchronization)--- End of stack trace from previous location ---
at Microsoft.WinGet.CommandNotFound.WinGetCommandNotFoundFeedbackPredictor.WarmUp()
at System.Threading.Tasks.Task.<>c.b__128_1(Object state)
at System.Threading.QueueUserWorkItemCallback.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
Furthermore, the pwsh process aborts a while after this (typical behavior when there is an unhandled exception, I think)
Other Software
No response
The text was updated successfully, but these errors were encountered: