-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to connect to VS Code server: Error in request - ENOENT /run/user/1000/vscode-ipc-*.sock #6997
Comments
I have the same issue of this, and it only happens when I accidently closed the connection to remote (for example, Ctrl+Q to close the remote window) and instantly reopen it. The error on my side can be solved upon eliot's approach, but it is indeed not convenient when I have multiple opened cli windows. I guess this error may be related with some recent updates on VSCode Version: 1.69.1 |
Same problem. Trying to work out how to use your solution above - if I run VsCode 1.69.2 |
same issue
|
I just got the same thing in Codespaces:
There was an auto-update waiting. Restarting to get the update solved the problem. So I wonder if this has to do with the auto-updater. |
This problem has a workaround #3575. Apparently after a VSCode update the cached server doesn't get invalidated properly. Of course this workaround is not nice and should be handled automatically, sadly the other Issue was closed prematurely. |
The temporary fix that's working for me is to refresh the constant It means the error is caused by that environment variable having a "stale" value, pointing at an old socket process which no longer exists. I searched for where the constant is being used, in all the repos under the The env variable is passed to the Interestingly, when I search for this env variable throughout GitHub (result), there are other people who ran into the same error with stale socket process causing an error in VSCode server CLI. From the top result:
And the second:
So we're all seeing the same issue. The permanent solution seems to be: in |
@eliot-akira I'm not quite sure that's the only issue. when I refresh |
@SoftwareApe It sounds like you might be experiencing a related but different issue. For me, that one-liner in the issue description solved it completely (so far). But from your earlier comment, I see you're having to remove |
@eliot-akira yes, that's right, delete the server and restart helped |
yes, but my so I'm using the |
I am also encountering this issue, but seemingly only after setting up an rsa key as the preferred ssh authentication method. Not sure if it's related but i thought I'd mention it. |
Having this issue when using |
I had the same issue and the workaround from @eliot-akira did not work in my case. |
I had the same issue and for me I cleared the cache files in folders vscode-server/ .vscode-server-insiders/: rm -rf .vscode-server/
rm -rf .vscode-server-insiders/ and restarting the CLI solved the problem. |
close vscode then in powershell: wsl --shutdown. Then reopen vscode.. |
Here it suggests removing the ~/.vscode-server folder which is inconvenient because you also remove all extensions and stuff. In my case, by removing ~/.vscode-server/bin/blah/vscode-remote-lock.<my_user>.blah solved the issue and I got to keep everything including the installed extensions. |
Is this happening in a terminal that was previously open, before reconnecting? I guess the value of the IPC environment var is stale, does this work in a new terminal when failing in the old terminal? |
I haven't found a reliable way to reproduce the issue, but in my case I believe it's always with a new terminal opened after VSCode Server reconnects. For reference, I opened a corresponding issue in microsoft/vscode#157275, close to the file where the error is occurring: The solution seems to be, before the call to |
Thanks for opening that upstream issue. I thought I'd heard about this recently. Will close this in favor of the other issue. microsoft/vscode#157275 |
I somehow ran into the same problem. Restarting VS Code app did not fix the issue for me. what worked was, I |
Same issue, restarting vscode etc doesn't work, but @eliot-akira 's workaround worked right away. |
use below commands and then it will ask id password again while doing any transaction on git. rm -rf .vscode-server/ |
I'm occasionally but regularly seeing this error when using Remote SSH and running the
code
command in the built-in terminal.Searching in Issues, #6362 seemed related, and this comment in particular gave me a hint for a temporary solution.
VSCODE_IPC_HOOK_CLI=$( lsof | grep $UID/vscode-ipc | awk '{print $(NF-1)}' | head -n 1 )
It searches for the first available VSCode IPC socket, gets its second to last column for the path to
vscode-ipc-*.sock
, and updates the relevant env variable. (In the original code snippet, they were getting the last column usingawk '{print $NF}'
but on my system that returnstype=STREAM
instead.)After running the above line, the error no longer occurs.
I'm OK with this temporary fix, but I figured I'd make an issue report, in case someone can get to the bottom of it and solve it permanently.
Steps to Reproduce:
The error appears occasionally (maybe after host reboots or when Remote SSH reconnects?). It might be related to #6988, "Vscode server stops after running for a while without use".
code some-file.txt
The text was updated successfully, but these errors were encountered: