-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Cannot automatically reconnect when code-server restarts #2697
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
Comments
Hi @zapstar! Thanks for opening the issue and providing your logs. I'm trying to see how I might be able to reproduce this. So no far, no luck - at least while connecting locally on my laptop (not a remote server). What I'm usingcode-server: v3.8.1 Here are the logs. First I tried regular code-server and then I tried with
Is there anything else you can provide or any ideas you have about why this might be happening? We didn't have any major changes in |
Can I enable debug or something like that could help you further. Looks like accessing vscode via browser is killing some process. If you can see it complains about |
Yes! That would be great. You can run code-server --log debug There is more info here in our FAQ. |
Ran into the same issue. Also resolved by downgrading to
|
@walterreade do you mind running |
I'm unable to reproduce this on a fresh install. Will be able to install 3.8.1 only over the weekend (I use code-server as my primary daily driver). Here's how I tried to reproduce it in an isolated environment (although, I failed to reproduce it):
Trying to connect on localhost:8080 is working fine for now. |
I got this error in Docker when having Bad File Permissions |
@kaaax0815 that could be the case as well, I was running the container as root. |
@zapstar When running the Container as root that should not happen. I fixed this issue by using |
Thanks for trying @zapstar!
Sounds good. I'll leave this open until we hear back from you. |
It's intermittent for me, and I can't isolate when/why it happens. remoteagent.log exthost.log
I appreciate everyone's work here! :-) |
Strange 🤔 Could it be an issue with an extension? Can you try disabling your extensions? |
@jsjoeio This was a fresh install on a new VM, with no extensions added. (And again the issue disappeared by downgrading to |
@walterreade ah, thanks for clarifying! Can you try running code-server with the |
@jsjoeio, as @walterreade rightly pointed out, this issue is seen intermittently only when you restart Here's how you can reproduce this (not consistently, but not super rare either):
and you'll see this error and code-server won't recover till you kill it. WORKAROUND: Essentially if code-server crashes and recovers you'll have to close your code-server browser window and restart it again in the background.
|
Ohhh yeah VS Code is spawned when the page initially connects. Reconnection won't spawn it again so a page refresh is required if the process restarts during an active connection. It might make sense for us to spawn it on a reconnection anyway. The reconnection will then fail because there's no longer any reconnection state on the server end but I think at that point at least VS Code will ask you to refresh rather than keep trying to reconnect. |
But I'm not sure if this is the same problem initially reported? Because 3.8.0 has the same behavior and downgrading is mentioned to work. |
[2021-06-08T14:29:29.553Z] info code-server 3.10.2 387b12e |
Sorry, I have unsubscribed from this issue. I have updated the workaround in the first comment so that folks coming from searches get to know of it without scrolling to the bottom.
Also, yes @code-asher even I had suspected that same. Downgrading probably helped me by not crashing my code-server in the first place.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days. |
code-server --version
: 3.8.1 41ad0c0The service by itself starts up fine. Later on when I try to connect to the remote server I keep seeing this error over and over again in the systemd logs.
Let me know if you need any other logs/information, I'll be happy to provide them for you.
Updated Workaround: Essentially if code-server crashes and recovers you'll have to close your code-server browser window and restart it again in the background.
The text was updated successfully, but these errors were encountered: