Comments (4)
I have the Powertoys winget.commandnotfound module enabled which adds a line to the powershell profile.
Now when I try and open pwsh.exe with the default $PROFILE without an internet connection I get the above exception but when I comment out the said line added by PowerToys to my profile, pwsh.exe is back to normal with $PROFILE. So, I am sure it's being caused by the line given below:
#some-uuid-xxxx-xxxx powertoys commandnotfound module
Import-Module -name microsoft.winget.commandnotfound -ErrorAction Stop
#some-uuid-xxxx-xxxx
If you haven't enabled this module in PowerToys though, I have no clue what else could be causing it.
from powertoys.
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
from powertoys.
Same.
Trying to enter a non-existent command when there is no network connection, PowerShell (7.4.2) exits and prints:
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()
from powertoys.
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()
from powertoys.
Related Issues (20)
- Resize a window to specific sizes HOT 3
- Allow peek to use alternative application HOT 1
- Keyboard mapping stops working in WSLg windows. HOT 2
- Bluetooth manager to disable autoconnect
- Accessibility Issues with PowerToys: Screen Reader Incompatibility with NVDA and JAWS HOT 1
- Settings search HOT 3
- FancyZone doesn't want to snap window to the same side twice in a row HOT 1
- SVGs sometimes blocked in Explorer HOT 1
- How to uninstall HOT 1
- Auto-updates consume way too much space if you aren't regularly updating HOT 1
- Hide Mouse Pointer after x Seconds HOT 1
- FancyZone activated automatically without holding Shift when dragging window for the first time after logging via RDP after update HOT 3
- PowerToys Run and Arc Browser not compatible HOT 1
- Hosts editor should keep backups HOT 4
- C:\Users\alfon\AppData\Local\Microsoft\PowerToys\PowerToys Run\Logs\0.77.0.0\2024-06-14.txt HOT 3
- Network Usage Utiltiy
- FancyZones: Send to Back/Front or Z-Depth setting HOT 1
- [Run Programs] URL shortcuts are limited to certain protocols HOT 5
- Not getting uninstalled, nor getting updated HOT 8
- PowerRename Open on Top HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powertoys.