microsoft / microsoft/vscode-remote-release
Cannot read properties of undefined (reading 'split') when initializing VSCode Server
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Is there an existing issue for this bug?
- I have searched the existing open issues and found none that apply.
- If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
- I have read and performed the troubleshooting steps
- I have tried both values of the
remote.SSH.useLocalServersetting - My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
- I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot
I did not ask the @remote-ssh participant for help
In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?
I COULD successfully SSH to the remote machine with the generated SSH command
Remote-SSH Log
Remote-SSH Log
[08:30:27.861] Log Level: 2
[08:30:27.876] SSH Resolver called for "ssh-remote+gcie", attempt 1
[08:30:27.876] "remote.SSH.useLocalServer": false
[08:30:27.876] "remote.SSH.useExecServer": true
[08:30:27.877] "remote.SSH.showLoginTerminal": false
[08:30:27.877] "remote.SSH.remotePlatform": {"gcie":"linux"}
[08:30:27.877] "remote.SSH.path":
[08:30:27.877] "remote.SSH.configFile":
[08:30:27.877] "remote.SSH.useFlock": true
[08:30:27.877] "remote.SSH.lockfilesInTmp": false
[08:30:27.877] "remote.SSH.localServerDownload": auto
[08:30:27.877] "remote.SSH.remoteServerListenOnSocket": false
[08:30:27.877] "remote.SSH.showLoginTerminal": false
[08:30:27.878] "remote.SSH.defaultExtensions": []
[08:30:27.878] "remote.SSH.loglevel": 2
[08:30:27.878] "remote.SSH.enableDynamicForwarding": true
[08:30:27.878] "remote.SSH.enableRemoteCommand": false
[08:30:27.878] "remote.SSH.serverPickPortsFromRange": {}
[08:30:27.879] "remote.SSH.serverInstallPath": {}
[08:30:27.879] "remote.SSH.permitPtyAllocation": false
[08:30:27.879] "remote.SSH.preferredLocalPortRange: undefined
[08:30:27.879] "remote.SSH.useCurlAndWgetConfigurationFiles: false
[08:30:27.884] VS Code version: 1.96.4
[08:30:27.884] Remote-SSH version: remote-ssh@0.113.1
[08:30:27.884] win32 x64
[08:30:27.887] SSH Resolver called for host: gcie
[08:30:27.887] Setting up SSH remote "gcie"
[08:30:27.893] Using commit id "cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba" and quality "stable" for server
[08:30:27.896] Install and start server if needed
[08:30:27.901] Checking ssh with "C:\Windows\system32\ssh.exe -V"
[08:30:27.903] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT
[08:30:27.903] Checking ssh with "C:\Windows\ssh.exe -V"
[08:30:27.905] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT
[08:30:27.905] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V"
[08:30:27.908] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT
[08:30:27.908] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[08:30:27.910] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[08:30:27.910] Checking ssh with "C:\gnubby\bin\ssh.exe -V"
[08:30:27.974] > OpenSSH_9.9p1, OpenSSL 3.1.7 3 Sep 2024
[08:30:27.978] Running script with connection command: "C:\gnubby\bin\ssh.exe" -T -D 65148 gcie bash
[08:30:27.981] Terminal shell path: C:\Windows\System32\cmd.exe
[08:30:37.486] > eb6ec9b3139c: running
> ]0;C:\Windows\System32\cmd.exe
[08:30:37.486] Got some output, clearing connection timeout
[08:30:37.518] > Installing to /usr/local/google/home/gciesielski/.vscode-server...
> eb6ec9b3139c%%1%%
> Downloading with wget
[08:30:38.003] > Download complete
> eb6ec9b3139c%%2%%
> tar --version:
> tar (GNU tar) 1.35
> Copyright (C) 2023 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.Written by John Gilmore and Jay Fenlason.
>
[08:30:38.224] > code 1.96.4 (commit cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba)
> Starting VS Code CLI... "/usr/local/google/home/gciesielski/.vscode-server/code-cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba" command-shell --cli-data-dir "/usr/local/google/home/gciesielski/.vscode-server/cli" --on-port --on-host=127.0.0.1 --parent-process-id 1046056 &> "/usr/local/google/home/gciesielski/.vscode-server/.cli.cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba.log" < /dev/null
> printenv:
> SHELL=/bin/bash
> P4CONFIG=.p4config
> SSH_AUTH_SOCK=/tmp/ssh-XXXX3cuXeL/agent.1046054
> PWD=/usr/local/google/home/gciesielski
> LOGNAME=gciesielski
> XDG_SESSION_TYPE=tty
> P4MERGE=/google/src/files/head/depot/eng/perforce/mergep4.tcl
> MOTD_SHOWN=pam
> HOME=/usr/local/google/home/gciesielski
> LANG=en_US.UTF-8
> SSH_AUTH_KEY=
> VSCODE_AGENT_FOLDER=/usr/local/google/home/gciesielski/.vscode-server
> SSH_CONNECTION=172.253.30.97 45587 192.168.17.39 22
> XDG_SESSION_CLASS=user
> PYTHONPATH=/usr/local/buildtools/current/sitecustomize
> USER=gciesielski
> SHLVL=1
> GOOGLE_AUTH_WEBAUTHN_PLUGIN=gcloudwebauthn
> XDG_SESSION_ID=c69
> XDG_RUNTIME_DIR=/run/user/1407946
> SSH_CLIENT=172.253.30.97 45587 22
> PATH=/usr/lib/google-golang/bin:/usr/local/buildtools/java/jdk/bin:/usr/loca
[08:30:38.235] >
> al/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1407946/bus
> _=/usr/bin/printenv
> OLDPWD=/usr/local/google/home/gciesielski/.vscode-server
> Spawned remote CLI: 1046120
[08:30:38.252] >
[08:30:38.336] > Waiting for server log...
[08:30:38.354] >
[08:30:38.368] > eb6ec9b3139c: start
> SSH_AUTH_SOCK==/tmp/ssh-XXXX3cuXeL/agent.1046054==
> DISPLAY====
> listeningOn==127.0.0.1:33451==
> osReleaseId==debian==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/1407946==
> platform==linux==
> unpackResult==success==
> didLocalDownload==0==
> downloadTime==487==
> installTime==204==
> serverStartTime==131==
> execServerToken==111a1a11-111a-1a11-aaaa-1111111a1aaa==
> eb6ec9b3139c: end
[08:30:38.368] Received install output:
SSH_AUTH_SOCK==/tmp/ssh-XXXX3cuXeL/agent.1046054==
DISPLAY====
listeningOn==127.0.0.1:33451==
osReleaseId==debian==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1407946==
platform==linux==
unpackResult==success==
didLocalDownload==0==
downloadTime==487==
installTime==204==
serverStartTime==131==
execServerToken==111a1a11-111a-1a11-aaaa-1111111a1aaa==
[08:30:38.368] Remote server is listening on port 33451
[08:30:38.368] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":33451},"osReleaseId":"debian","arch":"x86_64","sshAuthSock":"/tmp/ssh-XXXX3cuXeL/agent.1046054","display":"","tmpDir":"/run/user/1407946","platform":"linux","execServerToken":"111a1a11-111a-1a11-aaaa-1111111a1aaa"},"downloadTime":487,"installTime":204,"serverStartTime":131,"installUnpackCode":"success"}
[08:30:38.372] Starting forwarding server. local port 57390 -> socksPort 65148 -> remotePort 33451
[08:30:38.373] Forwarding server listening on port 57390
[08:30:38.373] Waiting for ssh tunnel to be ready
[08:30:38.374] [Forwarding server port 57390] Got connection 0
[08:30:38.375] Tunneled port 33451 to local port 57390
[08:30:38.375] Resolved "ssh-remote+gcie" to "port 57390"
[08:30:38.382] Initizing new exec server for ssh-remote+gcie
[08:30:38.382] Resolving exec server at port 57390
[08:30:38.394] [Forwarding server port 57390] Got connection 1
[08:30:38.580] Exec server for ssh-remote+gcie created and cached
[08:30:38.581] Updating $SSH_AUTH_SOCK: ln -f -s "/tmp/ssh-XXXX3cuXeL/agent.1046054" "/run/user/1407946/vscode-ssh-auth-sock-813261"
[08:30:38.581] Using cwd: vscode-remote://ssh-remote%2Bgcie/
[08:30:38.581] Remote extension host environment: {"SSH_AUTH_SOCK":"/run/user/1407946/vscode-ssh-auth-sock-813261"}
[08:30:38.585] Resolver error: TypeError: Cannot read properties of undefined (reading 'split')
at M (c:\Users\gciesielski\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.1\out\extension.js:2:607458)
at c:\Users\gciesielski\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.1\out\extension.js:2:608091
at Array.map (<anonymous>)
at t.localForwardsForHost (c:\Users\gciesielski\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.1\out\extension.js:2:608044)
at async t.resolve (c:\Users\gciesielski\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.1\out\extension.js:2:584870)
at async c:\Users\gciesielski\.vscode\extensions\ms-vscode-remote.remote-ssh-0.113.1\out\extension.js:2:851126
[08:30:38.593] ------
[08:30:38.938] Opening exec server for ssh-remote+gcie
[08:30:39.040] Verified and reusing cached exec server for ssh-remote+gcie
Expected Behavior
Set up remote server and connect to it.
Actual Behavior
VS Code installs remote server successfully, but fails when connecting to it.
Steps To Reproduce
Specs:
- VSCode: 1.96.4
- Remote - SSH extension: any version >=0.113.1 (after downgrading to 0.112.0 the issue does not appear)
- system: Windows
- remote system: Debian
Anything else?
The issue only occurs with versions >=0.113.1 of the "Remote - SSH" extension.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Remote - SSH extension's localForwardsForHost path identified in out/extension.js:2:607458 and reproduce the connection using VS Code 1.96.4 with extension version 0.113.1 or newer on Windows and Debian. Compare against version 0.112.0 and verify that the remote server installation completes and the connection succeeds without the split error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- devtools, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100