You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot automatically reconnect when code-server restarts #2697
Remote OS: Ubuntu Linux (Linux dev-box 5.4.0-1037-oracle how to start this from google colab? #40-Ubuntu SMP Thu Jan 14 09:19:02 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux)
The 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.
ubuntu@dev-box:~$ journalctl -u code-server@ubuntu | tail
Feb 08 22:14:58 dev-box code-server[2710]: at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
Feb 08 22:14:58 dev-box code-server[2710]: at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
Feb 08 22:14:58 dev-box code-server[2710]: at processTicksAndRejections (internal/process/task_queues.js:97:5)
Feb 08 22:15:08 dev-box code-server[2710]: [2021-02-08T16:45:08.475Z] error vscode is not running Error: vscode is not running
Feb 08 22:15:08 dev-box code-server[2710]: at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:206:19)
Feb 08 22:15:08 dev-box code-server[2710]: at VscodeProvider.<anonymous> (/usr/lib/code-server/out/node/vscode.js:198:30)
Feb 08 22:15:08 dev-box code-server[2710]: at step (/usr/lib/code-server/out/node/vscode.js:63:23)
Feb 08 22:15:08 dev-box code-server[2710]: at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
Feb 08 22:15:08 dev-box code-server[2710]: at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
Feb 08 22:15:08 dev-box code-server[2710]: at processTicksAndRejections (internal/process/task_queues.js:97:5)
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.
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 using
code-server: v3.8.1
VS Code: v1.51.1
Commit: 41ad0c0
Date: 2021-02-05T22:26:25Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0
Here are the logs. First I tried regular code-server and then I tried with --link
➜ ~ code-server
[2021-02-08T16:57:18.513Z] info code-server 3.8.1 41ad0c0c4c14df78e1bfa3a44d8b633ed2fc26e5
[2021-02-08T16:57:18.514Z] info Using user-data-dir ~/.local/share/code-server
[2021-02-08T16:57:18.523Z] info Using config file ~/.config/code-server/config.yaml
[2021-02-08T16:57:18.523Z] info HTTP server listening on http://127.0.0.1:8080
[2021-02-08T16:57:18.523Z] info - Authentication is enabled
[2021-02-08T16:57:18.523Z] info - Using password from ~/.config/code-server/config.yaml
[2021-02-08T16:57:18.523Z] info - Not serving HTTPS
^C% ➜ ~ code-server --link
[2021-02-08T16:57:57.102Z] info code-server 3.8.1 41ad0c0c4c14df78e1bfa3a44d8b633ed2fc26e5
[2021-02-08T16:57:57.103Z] info Using user-data-dir ~/.local/share/code-server
[2021-02-08T16:57:57.113Z] info Using config file ~/.config/code-server/config.yaml
[2021-02-08T16:57:57.113Z] info HTTP server listening on http://127.0.0.1:50236 (randomized by --link)
[2021-02-08T16:57:57.113Z] info - Authentication is disabled (disabled by --link)
[2021-02-08T16:57:57.113Z] info - Not serving HTTPS (disabled by --link)
[2021-02-08T16:57:58.216Z] info Detected an acceptable latency of 83ms
[2021-02-08T16:58:03.524Z] info Proxying code-server to Coder Cloud, you can access your IDE at https://joes_mbp-jsjoeio.cdr.co
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 3.8.1 so I'm trying to think what could have caused it (if anything) 🤔
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 error vscode is not running Error: vscode is not running.
@zapstar When running the Container as root that should not happen. I fixed this issue by using USER root in the Dockerfile. But I dont use Code-server on docker. I use caprover reverse proxy to code-server on host
@jsjoeio, as @walterreade rightly pointed out, this issue is seen intermittently only when you restart code-server when an active connection is in place. There are no extra logs being displayed even when you're in debug mode. My suspicion is that this could also be a long standing issue and not a regression (won't know until we try).
Here's how you can reproduce this (not consistently, but not super rare either):
Start code-server like below
Connect to the server using your browser and keep it open.
Kill the code-server in the background. UI detects disconnect and attempts to reconnect (with a timer).
Start code-server before the reconnect attempt by UI
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.
❯ docker run --rm -it -v "${HOME}/Downloads:/downloads" -p 8080:8080 ubuntu bash
root@900973700feb:/# dpkg -i /downloads/code-server_3.8.1_amd64.deb
Selecting previously unselected package code-server.
(Reading database ... 4121 files and directories currently installed.)
Preparing to unpack .../code-server_3.8.1_amd64.deb ...
Unpacking code-server (3.8.1) ...
Setting up code-server (3.8.1) ...
root@900973700feb:/# code-server --auth none --log debug --bind-addr 0.0.0.0:8080
[2021-02-15T05:36:36.170Z] info Wrote default config file to ~/.config/code-server/config.yaml
[2021-02-15T05:36:36.495Z] info code-server 3.8.1 41ad0c0c4c14df78e1bfa3a44d8b633ed2fc26e5
[2021-02-15T05:36:36.496Z] info Using user-data-dir ~/.local/share/code-server
[2021-02-15T05:36:36.507Z] info Using config file ~/.config/code-server/config.yaml
[2021-02-15T05:36:36.507Z] info HTTP server listening on http://0.0.0.0:8080
[2021-02-15T05:36:36.507Z] info - Authentication is disabled
[2021-02-15T05:36:36.507Z] info - Not serving HTTPS
[2021-02-15T05:36:50.896Z] debug forking vs code...
[2021-02-15T05:36:51.271Z] debug setting up vs code...
[2021-02-15T05:36:51.273Z] debug vscode got message from code-server {"type":"init"}
[2021-02-15T05:36:51.952Z] debug vscode got message from code-server {"type":"socket"}
[2021-02-15T05:36:51.959Z] debug vscode New connection {"token":"04517fb3-00f0-43f2-8e9a-d68e66b36e98"}
[2021-02-15T05:36:52.354Z] debug Making request {"uri":"https://api.github.com/repos/cdr/code-server/releases/latest"}
[2021-02-15T05:36:52.372Z] debug vscode got message from code-server {"type":"socket"}
[2021-02-15T05:36:52.464Z] debug vscode New connection {"token":"91f250e8-81a1-4ec1-b340-6457611f0370"}
[2021-02-15T05:36:52.868Z] debug got latest version {"latest":"3.9.0"}
[2021-02-15T05:36:52.868Z] debug comparing versions {"current":"3.8.1","latest":"3.9.0"}
^Croot@900973700feb:/# code-server --auth none --log debug --bind-addr 0.0.0.0:8080
[2021-02-15T05:37:05.916Z] info code-server 3.8.1 41ad0c0c4c14df78e1bfa3a44d8b633ed2fc26e5
[2021-02-15T05:37:05.917Z] info Using user-data-dir ~/.local/share/code-server
[2021-02-15T05:37:05.928Z] info Using config file ~/.config/code-server/config.yaml
[2021-02-15T05:37:05.928Z] info HTTP server listening on http://0.0.0.0:8080
[2021-02-15T05:37:05.928Z] info - Authentication is disabled
[2021-02-15T05:37:05.928Z] info - Not serving HTTPS
[2021-02-15T05:37:09.141Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:206:19)
at VscodeProvider.<anonymous> (/usr/lib/code-server/out/node/vscode.js:198:30)
at step (/usr/lib/code-server/out/node/vscode.js:63:23)
at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-02-15T05:37:09.152Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:206:19)
at VscodeProvider.<anonymous> (/usr/lib/code-server/out/node/vscode.js:198:30)
at step (/usr/lib/code-server/out/node/vscode.js:63:23)
at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-02-15T05:37:09.419Z] debug forking vs code...
[2021-02-15T05:37:09.788Z] debug setting up vs code...
[2021-02-15T05:37:09.790Z] debug vscode got message from code-server {"type":"init"}
[2021-02-15T05:37:10.426Z] debug vscode got message from code-server {"type":"socket"}
[2021-02-15T05:37:10.436Z] debug vscode New connection {"token":"a259303c-c6ed-452c-b5ba-2bd9860b722d"}
[2021-02-15T05:37:10.691Z] debug got latest version {"latest":"3.9.0"}
[2021-02-15T05:37:10.692Z] debug comparing versions {"current":"3.8.1","latest":"3.9.0"}
[2021-02-15T05:37:10.704Z] debug vscode got message from code-server {"type":"socket"}
[2021-02-15T05:37:10.791Z] debug vscode New connection {"token":"7022997f-d0a4-474b-9cf2-ce39cab5d665"}
^Croot@900973700feb:/# code-server --auth none --log debug --bind-addr 0.0.0.0:8080
[2021-02-15T05:37:29.403Z] info code-server 3.8.1 41ad0c0c4c14df78e1bfa3a44d8b633ed2fc26e5
[2021-02-15T05:37:29.404Z] info Using user-data-dir ~/.local/share/code-server
[2021-02-15T05:37:29.416Z] info Using config file ~/.config/code-server/config.yaml
[2021-02-15T05:37:29.416Z] info HTTP server listening on http://0.0.0.0:8080
[2021-02-15T05:37:29.416Z] info - Authentication is disabled
[2021-02-15T05:37:29.416Z] info - Not serving HTTPS
[2021-02-15T05:37:31.246Z] debug forking vs code...
[2021-02-15T05:37:31.636Z] debug setting up vs code...
[2021-02-15T05:37:31.637Z] debug vscode got message from code-server {"type":"init"}
[2021-02-15T05:37:32.029Z] debug vscode got message from code-server {"type":"socket"}
[2021-02-15T05:37:32.037Z] debug vscode New connection {"token":"8ec9a5ae-77a6-408b-932f-3f3d2ee1915a"}
[2021-02-15T05:37:32.315Z] debug got latest version {"latest":"3.9.0"}
[2021-02-15T05:37:32.315Z] debug comparing versions {"current":"3.8.1","latest":"3.9.0"}
[2021-02-15T05:37:32.327Z] debug vscode got message from code-server {"type":"socket"}
[2021-02-15T05:37:32.462Z] debug vscode New connection {"token":"0ebbaa01-458d-4ba8-80bf-9f7a1f2d8689"}
^Croot@900973700feb:/# code-server --auth none --log debug --bind-addr 0.0.0.0:8080
[2021-02-15T05:37:41.922Z] info code-server 3.8.1 41ad0c0c4c14df78e1bfa3a44d8b633ed2fc26e5
[2021-02-15T05:37:41.923Z] info Using user-data-dir ~/.local/share/code-server
[2021-02-15T05:37:41.935Z] info Using config file ~/.config/code-server/config.yaml
[2021-02-15T05:37:41.935Z] info HTTP server listening on http://0.0.0.0:8080
[2021-02-15T05:37:41.935Z] info - Authentication is disabled
[2021-02-15T05:37:41.935Z] info - Not serving HTTPS
[2021-02-15T05:37:44.138Z] debug forking vs code...
[2021-02-15T05:37:44.523Z] debug setting up vs code...
[2021-02-15T05:37:44.524Z] debug vscode got message from code-server {"type":"init"}
[2021-02-15T05:37:44.851Z] debug vscode got message from code-server {"type":"socket"}
[2021-02-15T05:37:44.857Z] debug vscode New connection {"token":"e950ac7b-8b5c-49d7-8b75-e04032c4b5db"}
[2021-02-15T05:37:45.108Z] debug got latest version {"latest":"3.9.0"}
[2021-02-15T05:37:45.108Z] debug comparing versions {"current":"3.8.1","latest":"3.9.0"}
[2021-02-15T05:37:45.119Z] debug vscode got message from code-server {"type":"socket"}
[2021-02-15T05:37:45.237Z] debug vscode New connection {"token":"6c45170e-ab73-4593-aeee-c582199b2be0"}
^Croot@900973700feb:/# code-server --auth none --log debug --bind-addr 0.0.0.0:8080
[2021-02-15T05:37:56.833Z] info code-server 3.8.1 41ad0c0c4c14df78e1bfa3a44d8b633ed2fc26e5
[2021-02-15T05:37:56.834Z] info Using user-data-dir ~/.local/share/code-server
[2021-02-15T05:37:56.848Z] info Using config file ~/.config/code-server/config.yaml
[2021-02-15T05:37:56.848Z] info HTTP server listening on http://0.0.0.0:8080
[2021-02-15T05:37:56.848Z] info - Authentication is disabled
[2021-02-15T05:37:56.848Z] info - Not serving HTTPS
[2021-02-15T05:37:59.150Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:206:19)
at VscodeProvider.<anonymous> (/usr/lib/code-server/out/node/vscode.js:198:30)
at step (/usr/lib/code-server/out/node/vscode.js:63:23)
at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-02-15T05:37:59.161Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:206:19)
at VscodeProvider.<anonymous> (/usr/lib/code-server/out/node/vscode.js:198:30)
at step (/usr/lib/code-server/out/node/vscode.js:63:23)
at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-02-15T05:38:17.104Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:206:19)
at VscodeProvider.<anonymous> (/usr/lib/code-server/out/node/vscode.js:198:30)
at step (/usr/lib/code-server/out/node/vscode.js:63:23)
at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-02-15T05:38:19.165Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:206:19)
at VscodeProvider.<anonymous> (/usr/lib/code-server/out/node/vscode.js:198:30)
at step (/usr/lib/code-server/out/node/vscode.js:63:23)
at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-02-15T05:38:29.672Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:206:19)
at VscodeProvider.<anonymous> (/usr/lib/code-server/out/node/vscode.js:198:30)
at step (/usr/lib/code-server/out/node/vscode.js:63:23)
at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-02-15T05:38:39.202Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:206:19)
at VscodeProvider.<anonymous> (/usr/lib/code-server/out/node/vscode.js:198:30)
at step (/usr/lib/code-server/out/node/vscode.js:63:23)
at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-02-15T05:38:49.675Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:206:19)
at VscodeProvider.<anonymous> (/usr/lib/code-server/out/node/vscode.js:198:30)
at step (/usr/lib/code-server/out/node/vscode.js:63:23)
at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-02-15T05:38:59.263Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:206:19)
at VscodeProvider.<anonymous> (/usr/lib/code-server/out/node/vscode.js:198:30)
at step (/usr/lib/code-server/out/node/vscode.js:63:23)
at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-02-15T05:39:09.689Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:206:19)
at VscodeProvider.<anonymous> (/usr/lib/code-server/out/node/vscode.js:198:30)
at step (/usr/lib/code-server/out/node/vscode.js:63:23)
at Object.next (/usr/lib/code-server/out/node/vscode.js:44:53)
at fulfilled (/usr/lib/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
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.
changed the title [-]Code server does not start after upgrading to 3.8.1 from 3.8.0[/-][+]Cannot automatically reconnect when code-server restarts[/+]on Feb 25, 2021
Not sure if this is the same issue but 3.9.3 produces the Cannot Reconnect window again (from a docker container). I reverted to 3.9.2 but that version opens to a blank page in Chrome so I reverted back to 3.9.0 which seems to work fine.
[2021-06-08T14:29:29.553Z] info code-server 3.10.2 387b12e
[2021-06-08T14:29:29.553Z] info Using user-data-dir ~/.local/share/code-server
[2021-06-08T14:29:29.563Z] info Using config file ~/.config/code-server/config.yaml
[2021-06-08T14:29:29.563Z] info HTTP server listening on http://0.0.0.0:8080
[2021-06-08T14:29:29.564Z] info - Authentication is enabled
[2021-06-08T14:29:29.564Z] info - Using password from ~/.config/code-server/config.yaml
[2021-06-08T14:29:29.564Z] info - Not serving HTTPS
[2021-06-08T14:29:38.955Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/home/opc/code-server/out/node/vscode.js:206:19)
at VscodeProvider. (/home/opc/code-server/out/node/vscode.js:198:30)
at step (/home/opc/code-server/out/node/vscode.js:63:23)
at Object.next (/home/opc/code-server/out/node/vscode.js:44:53)
at fulfilled (/home/opc/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-06-08T14:29:39.216Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/home/opc/code-server/out/node/vscode.js:206:19)
at VscodeProvider. (/home/opc/code-server/out/node/vscode.js:198:30)
at step (/home/opc/code-server/out/node/vscode.js:63:23)
at Object.next (/home/opc/code-server/out/node/vscode.js:44:53)
at fulfilled (/home/opc/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
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.
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.
Also, yes @code-asher even I had suspected that same. Downgrading probably helped me by not crashing my code-server in the first place.
@jsjoeio, as @walterreade rightly pointed out, this issue is seen intermittently only when you restart code-server when an active connection is in place. There are no extra logs being displayed even when you're in debug mode. My suspicion is that this could also be a long standing issue and not a regression (won't know until we try).
Activity
jsjoeio commentedon Feb 8, 2021
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 using
code-server: v3.8.1
VS Code: v1.51.1
Commit: 41ad0c0
Date: 2021-02-05T22:26:25Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0
Here are the logs. First I tried regular code-server and then I tried with
--linkIs 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
3.8.1so I'm trying to think what could have caused it (if anything) 🤔zapstar commentedon Feb 8, 2021
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
error vscode is not running Error: vscode is not running.jsjoeio commentedon Feb 8, 2021
Yes! That would be great. You can run
There is more info here in our FAQ.
walterreade commentedon Feb 9, 2021
Ran into the same issue. Also resolved by downgrading to
3.8.0.jsjoeio commentedon Feb 9, 2021
@walterreade do you mind running
code-server --log debugand pasting the logs here?zapstar commentedon Feb 10, 2021
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.
kaaax0815 commentedon Feb 10, 2021
I got this error in Docker when having Bad File Permissions
zapstar commentedon Feb 10, 2021
@kaaax0815 that could be the case as well, I was running the container as root.
kaaax0815 commentedon Feb 10, 2021
@zapstar When running the Container as root that should not happen. I fixed this issue by using
USER rootin the Dockerfile. But I dont use Code-server on docker. I use caprover reverse proxy to code-server on hostjsjoeio commentedon Feb 10, 2021
Thanks for trying @zapstar!
Sounds good. I'll leave this open until we hear back from you.
walterreade commentedon Feb 10, 2021
It's intermittent for me, and I can't isolate when/why it happens.
remoteagent.log
[2021-02-10 22:31:26.624] [remoteagent] [error] /home/inversion/.local/share/code-server/extensions {"errno":-2,"code":"ENOENT","syscall":"scandir","path":"/home/inversion/.local/share/code-server/extensions"}exthost.log
I appreciate everyone's work here! :-)
jsjoeio commentedon Feb 10, 2021
Strange 🤔 Could it be an issue with an extension? Can you try disabling your extensions?
1 remaining item
jsjoeio commentedon Feb 11, 2021
@walterreade ah, thanks for clarifying! Can you try running code-server with the
--log debugand pasting the logs here?zapstar commentedon Feb 15, 2021
@jsjoeio, as @walterreade rightly pointed out, this issue is seen intermittently only when you restart
code-serverwhen an active connection is in place. There are no extra logs being displayed even when you're in debug mode. My suspicion is that this could also be a long standing issue and not a regression (won't know until we try).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.
code-asher commentedon Feb 17, 2021
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.
code-asher commentedon Feb 17, 2021
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.
[-]Code server does not start after upgrading to 3.8.1 from 3.8.0[/-][+]Cannot automatically reconnect when code-server restarts[/+]vnijs commentedon Apr 25, 2021
Not sure if this is the same issue but 3.9.3 produces the Cannot Reconnect window again (from a docker container). I reverted to 3.9.2 but that version opens to a blank page in Chrome so I reverted back to 3.9.0 which seems to work fine.
luckfu commentedon Jun 8, 2021
[2021-06-08T14:29:29.553Z] info code-server 3.10.2 387b12e
[2021-06-08T14:29:29.553Z] info Using user-data-dir ~/.local/share/code-server
[2021-06-08T14:29:29.563Z] info Using config file ~/.config/code-server/config.yaml
[2021-06-08T14:29:29.563Z] info HTTP server listening on http://0.0.0.0:8080
[2021-06-08T14:29:29.564Z] info - Authentication is enabled
[2021-06-08T14:29:29.564Z] info - Using password from ~/.config/code-server/config.yaml
[2021-06-08T14:29:29.564Z] info - Not serving HTTPS
[2021-06-08T14:29:38.955Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/home/opc/code-server/out/node/vscode.js:206:19)
at VscodeProvider. (/home/opc/code-server/out/node/vscode.js:198:30)
at step (/home/opc/code-server/out/node/vscode.js:63:23)
at Object.next (/home/opc/code-server/out/node/vscode.js:44:53)
at fulfilled (/home/opc/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2021-06-08T14:29:39.216Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/home/opc/code-server/out/node/vscode.js:206:19)
at VscodeProvider. (/home/opc/code-server/out/node/vscode.js:198:30)
at step (/home/opc/code-server/out/node/vscode.js:63:23)
at Object.next (/home/opc/code-server/out/node/vscode.js:44:53)
at fulfilled (/home/opc/code-server/out/node/vscode.js:35:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
zapstar commentedon Jun 14, 2021
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.
stale commentedon Dec 12, 2021
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.