microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.05k stars 29.21k forks source link

The terminal process failed to launch: A native exception occurred during launch (Cannot launch conpty). #210884

Closed bendp-gen closed 6 months ago

bendp-gen commented 6 months ago

Type: Bug

Follwing error is raised.

The terminal process failed to launch: A native exception occurred during launch (Cannot launch conpty).

Log Information

2024-04-15 09:12:23.004 [trace] node-pty.IPty#spawn C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe ["-noexit","-command","try { . \"c:\Users\ben.dupreez\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\browser\media\shellIntegration.ps1\" } catch {}"] {"name":"powershell.exe","cwd":"C:\ws-git\unify","env":{"ALLUSERSPROFILE":"C:\ProgramData","APPDATA":"C:\Users\ben.dupreez\AppData\Roaming","ChocolateyInstall":"C:\ProgramData\chocolatey","CHROME_CRASHPAD_PIPE_NAME":"\\.\pipe\crashpad_9168_JASTGXJJNIHEMSYY","CommonProgramFiles":"C:\Program Files\Common Files","CommonProgramFiles(x86)":"C:\Program Files (x86)\Common Files","CommonProgramW6432":"C:\Program Files\Common Files","COMPUTERNAME":"BEN-LP","ComSpec":"C:\WINDOWS\system32\cmd.exe","DriverData":"C:\Windows\System32\Drivers\DriverData","DXVCL":"C:\Components\DevExpress VCL","ERLANG_HOME":"C:\Program Files\erl-23.2.7","GENASYS_GENASYSBOOTSTRAPCONFIGURATION__CONFIGURATIONAPIKEY":"TImRB@K0BET62igfK!0q7M","GENASYS_GENASYSBOOTSTRAPCONFIGURATIONCONFIGURATIONAPIURLS0":"https://ben-lp:8940/","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\ben.dupreez","LOCALAPPDATA":"C:\\Users\\ben.dupreez\\AppData\\Local","LOGONSERVER":"\\\\HUSKAR","MSMPI_BENCHMARKS":"C:\\Program Files\Microsoft MPI\Benchmarks\","MSMPI_BIN":"C:\Program Files\Microsoft MPI\Bin\","NUMBER_OF_PROCESSORS":"8","OneDrive":"C:\Users\ben.dupreez\OneDrive - Genasys","OneDriveCommercial":"C:\Users\ben.dupreez\OneDrive - Genasys","OneDriveConsumer":"C:\Users\ben.dupreez\OneDrive","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","OS":"Windows_NT","Path":"C:\Program Files\Microsoft MPI\Bin\;C:\Program Files (x86)\Embarcadero\Studio\18.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\18.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl\Win64;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Components\DevExpress VCL\Library\RS24;C:\Components\DevExpress VCL\Library\RS24\Win64;C:\Program Files (x86)\RemObjects Software\Everwood\Bin;C:\Components\RemObjects\RemObjects SDK for Delphi\Dcu\D24\Win32;C:\Components\RemObjects\RemObjects SDK (Common)\Bin;c:\SKi\Client;C:\Components\DragDrop\Library\DX101B\Win32_Release;C:\Components\RemObjects\RemObjects SDK for Delphi\Dcu\D24\win32;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin;C:\Program Files\Seq\;C:\Program Files\Seq\Client\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\dotnet\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\nodejs\;C:\Users\ben.dupreez\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Azure Data Studio\bin;C:\Users\ben.dupreez\.dotnet\tools;C:\users\ben.dupreez\AppData\local\Atlassian\SourceTree\git_local\cmd;C:\Users\ben.dupreez\AppData\Roaming\npm;C:\Users\ben.dupreez\AppData\Local\Programs\Microsoft VS Code\bin","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL","PROCESSOR_ARCHITECTURE":"AMD64","PROCESSOR_IDENTIFIER":"Intel64 Family 6 Model 142 Stepping 12, GenuineIntel","PROCESSOR_LEVEL":"6","PROCESSOR_REVISION":"8e0c","ProgramData":"C:\ProgramData","ProgramFiles":"C:\Program Files","ProgramFiles(x86)":"C:\Program Files (x86)","ProgramW6432":"C:\Program Files","PROMPT":"$P$G","PSModulePath":"C:\Users\ben.dupreez\OneDrive - Genasys\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Microsoft Monitoring Agent\Agent\PowerShell\;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\PowerShell\Modules\;C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\7.3.1840.0","PUBLIC":"C:\Users\Public","SESSIONNAME":"Console","SystemDrive":"C:","SystemRoot":"C:\WINDOWS","TEMP":"C:\Users\BEN~1.DUP\AppData\Local\Temp","TMP":"C:\Users\BEN~1.DUP\AppData\Local\Temp","UATDATA":"C:\Windows\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77","USERDNSDOMAIN":"genasys.local","USERDOMAIN":"GENASYS","USERDOMAIN_ROAMINGPROFILE":"GENASYS","USERNAME":"Ben.duPreez","USERPROFILE":"C:\Users\ben.dupreez","windir":"C:\WINDOWS","WSLENV":"WT_SESSION:WT_PROFILE_ID:","WT_PROFILE_ID":"{61c54bbd-c2c6-5271-96e7-009a87ff44bf}","WT_SESSION":"e2b2c0d9-f862-4e1e-bc23-ad4d71d6031a","ZES_ENABLE_SYSMAN":"1","TERM_PROGRAM":"vscode","TERM_PROGRAM_VERSION":"1.88.1","LANG":"en_US.UTF-8","COLORTERM":"truecolor","GIT_ASKPASS":"c:\Users\ben.dupreez\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\askpass.sh","VSCODE_GIT_ASKPASS_NODE":"C:\Users\ben.dupreez\AppData\Local\Programs\Microsoft VS Code\Code.exe","VSCODE_GIT_ASKPASS_EXTRA_ARGS":"","VSCODE_GIT_ASKPASS_MAIN":"c:\Users\ben.dupreez\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\askpass-main.js","VSCODE_GIT_IPC_HANDLE":"\\.\pipe\vscode-git-6248cd44db-sock","VSCODE_INJECTION":"1","VSCODE_NONCE":"ed666a68-5a97-44e2-887b-bef6cb8aa175"},"cols":198,"rows":12,"useConpty":true,"conptyInheritCursor":false} 2024-04-15 09:12:23.070 [trace] node-pty.node-pty.IPty#spawn native exception Cannot launch conpty: Error: Cannot launch conpty

I have tried everything but re-installing Windows to try and resolve this. Re-Installed VS Code, Windows Terminal. Removed Anti Virus. Manually installed Node.js. Ran System File Repair.

VS Code version: Code 1.88.1 (e170252f762678dec6ca2cc69aba1570769a5d39, 2024-04-10T17:41:02.734Z) OS version: Windows_NT x64 10.0.22621 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz (8 x 2304)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.61GB (3.17GB free)| |Process Argv|--crash-reporter-id 04eb0263-7f7c-4f92-9824-ec236bb78fe0| |Screen Reader|no| |VM|0%|
Extensions: none
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 d6fi2104:30959263 cppperfnew:31000557 d34g3935:30971562 fegfb526:30981948 bg6jg535:30979843 ccp1r3:30993539 dsvsc020:30976470 pythonait:31006305 gee8j676:31009558 showvideot:31016892 chatpanelc:31018788 dsvsc021:30996838 0ee40948:31013168 pythoncenvpt:31022790 ```
meganrogge commented 6 months ago

This issue seems to originate from an upstream component and is not something VSCode can fix by making a change to our code. As such, I will go ahead and close it. Please try to reproduce in Windows Terminal and report to microsoft/terminal with repro steps.

If you cannot reproduce in Windows Terminal, chances are it's fixed in a later version of Windows. You can read more about how we consume conpty here. Thanks for understanding.

/label upstream terminal-conpty windows