Skip to content

doResolveShellEnv fails when Microsoft Powertoys Command Not Found installed on Powershell #251677

Closed
@ruby3141

Description

@ruby3141

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.101.0 // Insider build have same problem.
  • OS Version: Windows_NT x64 10.0.26100

Steps to Reproduce:

  1. Install Microsoft Powertoys, and Install Command Not Found with it. Note that you need Powershell >=7.4 and WinGet client installed.
  2. Run vscode and you would get message "Unable to resolve your shell environment: Unexpected exit code from spawned shell (code 3262504530, signal null)"

I ran insider build with --verbose flag and got this stack trace log.

[main 2025-06-17T04:56:30.502Z] doResolveShellEnv#stderr Unhandled exception. System.Management.Automation.PipelineStoppedException: The pipeline has been stopped.
   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()

[main 2025-06-17T04:56:30.503Z] Unable to resolve your shell environment: Unexpected exit code from spawned shell (code 3762504530, signal null)
[main 2025-06-17T04:56:30.504Z] resolving shell environment failed Unable to resolve your shell environment: Unexpected exit code from spawned shell (code 3762504530, signal null)

This doesn't happen when I uninstall Command Not Found.

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugconfirmation-pendingwindowsVS Code on Windows issuesworkbench-os-integrationNative OS integration issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions