Closed Lablace closed 2 months ago
I'm getting what appears to be the same issue, comparing the log output -- it was working last week, but likely some VSCode related components have updated on the Windows side.
However, I'm connecting from Windows 11 to remote Rocky Linux 8 containers via ssh, using a password protected ssh key (it doesn't ask for the password, as I believe Windows registered it with an ssh agent). I can provide logs or open a separate issue if required.
Any difference if you set "remote.SSH.useExecServer": false
?
Any difference if you set
"remote.SSH.useExecServer": false
?
That seems to fix it for me, thanks!
It looks like there's a typo on the description for that configuration option by the way -- the description shows "%setting.usseExecServer.description%".
Any difference if you set
"remote.SSH.useExecServer": false
?
This fixed https://github.com/microsoft/vscode-remote-release/issues/9454#issuecomment-2046203046
Any ideas why I still have to manually extract vscode-server.zip? https://github.com/microsoft/vscode-remote-release/issues/9454#issuecomment-1921767241
Any difference if you set
"remote.SSH.useExecServer": false
?This fixed #9454 (comment)
Any ideas why I still have to manually extract vscode-server.zip? #9454 (comment)
Maybe due to the direct cause I stated? The script is waiting for zip
files to show up in the bin/${COMMIT_ID}
folder while scp
and you copied the file to the bin
folder?
Any difference if you set
"remote.SSH.useExecServer": false
?
remote.SSH.useExecServer
is already set to false
.
I can add that I got this problem too since upgrading to 1.88.0. Setting remote.SSH.useExecServer
to false helped me as well.
But my understanding from e.g. https://github.com/microsoft/vscode-remote-release/issues/8926 is that this was supposed to be a fallback in case of problems. The original problems from #8926 has apparently been fixed, but now some new problem has arisen.
Any difference if you set
"remote.SSH.useExecServer": false
?This fixed #9454 (comment) Any ideas why I still have to manually extract vscode-server.zip? #9454 (comment)
Maybe due to the direct cause I stated? The script is waiting for
zip
files to show up in thebin/${COMMIT_ID}
folder whilescp
and you copied the file to thebin
folder?
Forgive me, I don't understand the distinction between exec server and vscode server. Seems prior to this issue, Remote SSH copied over vscode server first (which always hung for me), and exec server second (which worked after I manually extracted vscode server and reconnected Remote SSH).
This issue appears to be related to a recent change prioritizing exec server.
My previous attempts (presumably vscode server vs exec server) hangs with a slightly different message: "Copy server to host" terminal command done
I imagine if the same issue existed previously, there would certainly be another issue for it, but I haven't found one thus far, so I figured my problem was environment-specific.
remote.SSH.useExecServer
is already set tofalse
.
now that you've mentioned this, it seems you may actually be running in to the same problem I am, but your message is slightly different, and presumably you didn't have this issue prior.
I believe we have 2 (maybe 3) issues at play here. (and I don't have time to dig)
EDIT: I've just noticed that the message in the Title of this issue doesn't match the message in your logs.
that, and the fact you already have remote.SSH.useExecServer set to false seems to indicate you are indeed having the exact same issue as me, but I've been having this issue for months - have you?
this also means there are two issues:
Any difference if you set
"remote.SSH.useExecServer": false
?This fixed #9454 (comment) Any ideas why I still have to manually extract vscode-server.zip? #9454 (comment)
Maybe due to the direct cause I stated? The script is waiting for
zip
files to show up in thebin/${COMMIT_ID}
folder whilescp
and you copied the file to thebin
folder?Forgive me, I don't understand the distinction between exec server and vscode server. Seems prior to this issue, Remote SSH copied over vscode server first (which always hung for me), and exec server second (which worked after I manually extracted vscode server and reconnected Remote SSH).
This issue appears to be related to a recent change prioritizing exec server.
My previous attempts (presumably vscode server vs exec server) fail with a slightly different error message:
"Copy server to host" terminal command done
I imagine if the same issue existed previously, there would certainly be another issue for it, but I haven't found one thus far, so I figured my problem was environment-specific.
remote.SSH.useExecServer
is already set tofalse
.now that you've mentioned this, it seems you may actually be running in to the same problem I am, but your error message is slightly different, and presumably you didn't have this issue prior.
I believe we have 2 (maybe 3) issues at play here. (and I don't have time to dig)
You're right at that I didn't have the problem before. The fact is that I used to just use vscode-server
on Linux servers, which I also tried this time, and you can see in my analysis that it just worked as before. BUT I have to used a Windows Server now, on which I would like to continue with my previous workflow, that is using vscode-server
there rather than using Remote Desktop. And unfortunately it fails to install without manual help (moving the scp
ed archives into the target folder).
To be honest, I also didn't know what an exec server
is, but I am used to setting the option to false
.
I believe some problem lies in the dirname
function (or related functions) in vscode-server
extension, but I really don't have time and effort to investigate the obfuscated code.
And as a complement, my colleague uses local Windows PC to connect to the same Windows Server as I have connected to without any problem, also he leaves the remote.SSH.useExecServer
setting as default.
looks like exec server is installed after vscode-server (which still fails on windows remotes, requires manual workaround) with latest release despite remote.SSH.useExecServer set to false
I'm not sure this is actually related to the exec server, as the log posted in the original issue is not using the exec server (vscode-server.zip
is only used for the non-exec server mode, the exec server uses vscode-cli-$commitId.zip
)
I actually only reproduce this with remote.SSH.useExecServer
set to false
. It works with true
. I think others are not experiencing the same issue.
@Lablace @HunterDG can you try using VS Code Insiders and the pre-release version of Remote SSH and let us know if the issue is fixed for you?
Steps:
remote.SSH.useExecServer: false
and remote.SSH.localServerDownload: always
@Lablace @HunterDG can you try using VS Code Insiders and the pre-release version of Remote SSH and let us know if the issue is fixed for you?
@TylerLeonhardt @connor4312 Sorry for my late reply.
I've used VS Code Insider (Version: 1.89.0-insider (Universal), 2fb3fa8dd2f85d7f452066f8a64e8bf259d21412) with Remote SSH (v0.112.2024042515 (pre-release)) on my local Mac mini (Intel), and could verify that with remote.SSH.localServerDownload
set to always
and remote.SSH.useExecServer
set to false
I could successfully have the insider server installed on remote Windows server and remote Ubuntu server.
So my problem is solved, thanks for all your efforts!!!
I also noticed in the output that the message showing scp
details had the right destination now. Previous it was 'REMOTE':'C:\Users\****\.vscode-server'
and now it was 'REMOTE':'C:\Users\****\.vscode-server-inside\${COMMIT_ID}'
FYI: I had similar symptoms. Root cause of my problem is that my .bashrc included output on stdout via an echo command. And scp fails silently if any stdout from .bashrc. And then VS Code not graceful to scp lack of gracefulness. I updated my .bashrc to remove echo to stdout, and then everything works. FYI, I found this comment to be very helpful, https://unix.stackexchange.com/a/257613/9214
Steps to Reproduce:
cmd
+shift
+P
and chooseRemote-SSH: Connect Current Window to Host...
and select the target Windows Server remote machine.How I Tried to Debug
Though the extension is close source, one can manage to view some of its content at
${HOME}/.vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/extension.js
, so do I. Take some time and one can find that for Windows platform, it uses the hard-codedpowershell
script to handle requests. In the logs, lines without time are from thepowershell
script, others mainly come from the extension itself. And one can find that the script is waiting for file to show up inside ".../bin/${COMMIT_ID}
", whilescp
destination is ".../bin
". This is the direct cause. I tried to manually move the two files into the sub-folder and change thedestFolder
to contain the sub-folder, in both case, the installation can continue and I can have server installed in remote machine successfully.With some effort I found the problem lies around a
generateScpCommand
function call, in which the locally downloadedvscode-server
is copied to the remote withscp
. Specifically, the erroneous call is at the first occurrence, and the definition is at the third. The remote path forvscode-server
is stored indestPath
argument, and in the function, a call todirname
seems to be the bull's-eye. I then injected some code inside the function body to see whetherdirname
really does what it names. The injected code is simple:throw new Error("destPath:"+n+"|dirname:"+s);
, which simply prints the values of two variables and terminate the installation. I then tried this with the Windows server and another server running Ubuntu, the output is listed below.destPath
dirname
C:\Users\****\.vscode-server\bin\/5c3e652f63e798a5ac2f31ffd0d863669328dc4c\vscode-server.zip
C:\Users\****\.vscode-server\bin\
/tmp/****/.vscode-server/bin//5c3e652f63e798a5ac2f31ffd0d863669328dc4c/vscode-server.tar.gz
/tmp/****/.vscode-server/bin//5c3e652f63e798a5ac2f31ffd0d863669328dc4c
As result tells, on Ubuntu, the
dirname
does what it names, while on Windows, it removes one more level. This might be the root cause. I also tried using the unmodified extension with the Ubuntu server, and you bet, the server is installed without any problem.I would like to dive deeper in the body of
dirname
, but I could not figure out where its definition lies, maybe due to my lack of knowledge in JS, or the obfuscation, thus I have to stop here. Hope this helps.Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: No