vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Unable to connect VS Code to SSH after crash: BadInstallScriptResult

Open digwa-ing opened this issue 9 months ago • 6 comments

Type: Bug

I encountered a problem while working on a server within my local network using SSH in a DevContainer. My server unexpectedly ran out of disk space, causing VS Code on my client machine to crash. Since then, I've been unable to connect to any server via SSH in a subfolder, even those not involved in the original issue.

The Problem I can establish an SSH connection to the server, but when I attempt to navigate through the File Explorer, I'm limited to my home directory. Selecting any subfolder results in an error.

What I Have Tried So Far

  • Cleaned Configuration Files on the Server: I deleted all .vscode, .ssh, and .vscode-remote-containers folders.
  • Tested with Another Client PC: Connecting from a different computer works without any issues, indicating the problem is specific to my client installation.
  • Created a new user on the effected Windows client, installed VS Code with the same results
  • Reinstalled VS Code: I uninstalled VS Code, removed all related configuration files (including AppData\Code), and did a fresh installation.
  • Reinstalled OpenSSH: I reinstalled the OpenSSH client on my machine.
  • Checked the Registry: I verified that the HKLM / HKCU\Software\Microsoft\Command Processor key does not contain an Autorun entry.

I am looking for additional suggestions to resolve this issue without formatting my PC. Any insights or advice would be greatly appreciated!

Error Messages:

The terminal process "C:\WINDOWS\System32\cmd.exe /c (type "C:\Users\USERNAME\AppData\Local\Temp\vscode-linux-multi-line-command-10.1.1.29-666298659.sh" | "C:\OpenSSH\ssh.exe" -T -D 60919 "10.1.1.29" sh) & exit /b 0" terminated with exit code: -1073741510.

BadInstallScriptResult │ Error: BadInstallScriptResult (Got bad result from install script)
See verbose information in the Output Log...

Output:

[18:13:12.295] Remote server is listening on port 33175
[18:13:12.295] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":33175},"osReleaseId":"debian","arch":"x86_64","sshAuthSock":"","display":"","tmpDir":"/run/user/1000","platform":"linux","execServerToken":"111a111a-11a1-1111-1111-aaa11a11a1a1"},"serverStartTime":34,"installUnpackCode":""}
[18:13:12.297] Starting forwarding server. local port 61987 -> socksPort 61983 -> remotePort 33175
[18:13:12.297] Forwarding server listening on port 61987
[18:13:12.298] Waiting for ssh tunnel to be ready
[18:13:12.299] [Forwarding server port 61987] Got connection 0
[18:13:12.299] Tunneled port 33175 to local port 61987
[18:13:12.300] Resolved "ssh-remote+10.1.1.29" to "port 61987"
[18:13:12.300] Resolving exec server at port 61987
[18:13:12.302] [Forwarding server port 61987] Got connection 1
[18:13:12.330] Exec server for ssh-remote+10.1.1.29 created and cached
[18:13:12.330] No hints found in the recent session.
[18:13:12.332] Opening exec server for ssh-remote+10.1.1.29
[18:13:12.333] Found relevant configuration for host 10.1.1.29 in JSON data
[18:13:12.333] Verified and reusing cached exec server for ssh-remote+10.1.1.29
[18:13:12.334] No hints found in the recent session.
[18:16:12.292] "install" terminal received data: " "
[18:19:12.290] "install" terminal received data: " "
[18:22:12.288] "install" terminal received data: " "
[18:25:12.286] "install" terminal received data: " "

VS Code version: Code 1.98.0 (6609ac3d66f4eade5cf376d1cb76f13985724bcb, 2025-03-04T21:06:18.612Z)
OS version: Windows_NT x64 10.0.26100
Modes: Restricted
Connection to 'SSH: 10.1.1.29' could not be established  Got bad result from install script
System Info
Item Value
CPUs AMD Ryzen 9 5900X 12-Core Processor (24 x 3693)
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
webnn: disabled_off
Load (avg) undefined
Memory (System) 63.91GB (48.29GB free)
Process Argv --crash-reporter-id fb48d1a5-7077-47bb-a2a6-b1abb6e6cabb
Screen Reader no
VM 0%

Connection to 'SSH: 10.1.1.29' could not be established Got bad result from install script

Extensions: none
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc1:31192215
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
jda6j935:31233686
cp15370_c:31242498

digwa-ing avatar Mar 06 '25 17:03 digwa-ing

Try downgrading to version 1.97.2. It works for me.

f1ynnzhan9 avatar Mar 07 '25 03:03 f1ynnzhan9

Run into the same problem. Has to downgrade to 1.97.2 ATM.

TLCFEM avatar Mar 07 '25 05:03 TLCFEM

As a workaround, connect to the server and run code work_dir to open a new vscode.

OpportunityLiu avatar Mar 07 '25 05:03 OpportunityLiu

Try downgrading to version 1.97.2. It works for me.

Thank you, @f1ynn-zhan9 and @TLCFEM! Downgrading to version 1.97.2 did the trick for me. I wish I had known this earlier—it would have saved me a lot of time. Unfortunately, the update coincided with a disk-full event, which made it even harder to pinpoint the real issue.

digwa-ing avatar Mar 07 '25 12:03 digwa-ing

I had the same issue and downgrading to 1.97.2 solved it for me

Mahmoud-Elbahnasawy avatar Mar 07 '25 12:03 Mahmoud-Elbahnasawy

Thanks man!

BlackedProxy avatar Mar 07 '25 15:03 BlackedProxy

As a workaround, connect to the server and run code work_dir to open a new vscode.

same problem, this solution saves me a lot of time.

edjia avatar Mar 08 '25 14:03 edjia

1.97 solved it for me

https://code.visualstudio.com/updates/v1_97

raccoon-mh avatar Mar 09 '25 04:03 raccoon-mh

Downgrading to 1.97.2 resolves that issue temporary:

winget install --id=Microsoft.VisualStudioCode -v "1.97.2" -e --force

avtonoy avatar Mar 10 '25 08:03 avtonoy

Thanks folks for the details, looking into it this morning. Tracking in the remote-release issue

/duplicate https://github.com/microsoft/vscode-remote-release/issues/10758

joshspicer avatar Mar 10 '25 17:03 joshspicer

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

downgrade https://code.visualstudio.com/updates/v1_97, solved

syagawa avatar Mar 11 '25 06:03 syagawa

Not too sure on reason but wanted to chime in as another voice that the latest VS Code update broke my workflow here with the same error and Insiders fixed it.

adamgreenough avatar Mar 11 '25 21:03 adamgreenough

@joshspicer I noticed my issue was reported before the one you referenced as the original. Shouldn't this one be considered the original instead? Best regards. And happy coding.

digwa-ing avatar Mar 11 '25 21:03 digwa-ing

I've encountered a similar issue, and setting the following in the settings.json file worked for me: "terminal.integrated.windowsUseConptyDll": false

Credit goes to @deepak1556 for sharing this solution in another discussion. It resolved the problem for me on VS Code version 1.98.1. Hopefully, it helps here as well!

Elyelx avatar Mar 13 '25 11:03 Elyelx