Skip to content

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

Closed
zapstar opened this issue Feb 8, 2021 · 21 comments
Closed

Cannot automatically reconnect when code-server restarts #2697

zapstar opened this issue Feb 8, 2021 · 21 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@zapstar
Copy link

zapstar commented Feb 8, 2021

  • Web Browser: Microsoft Edge/Chrome
  • Local OS: MacOS BigSur 11.
  • 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)
  • Remote Architecture: amd64
  • code-server --version: 3.8.1 41ad0c0

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.

@jsjoeio jsjoeio added the needs-investigation This issue needs to be further investigated label Feb 8, 2021
@jsjoeio
Copy link
Contributor

jsjoeio commented 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

2021-02-08 10 00 00

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) 🤔

@zapstar
Copy link
Author

zapstar commented 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
Copy link
Contributor

jsjoeio commented Feb 8, 2021

Can I enable debug or something like that could help you further?

Yes! That would be great. You can run

code-server --log debug

There is more info here in our FAQ.

@walterreade
Copy link

Ran into the same issue. Also resolved by downgrading to 3.8.0.

@jsjoeio
Copy link
Contributor

jsjoeio commented Feb 9, 2021

@walterreade do you mind running code-server --log debug and pasting the logs here?

@jsjoeio jsjoeio added waiting-for-info Waiting for more information from submitter and removed needs-investigation This issue needs to be further investigated labels Feb 9, 2021
@zapstar
Copy link
Author

zapstar commented 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):

# Download the code-server installer for ubuntu
$ docker run --rm -it -v "${HOME}/Downloads:/downloads" -p 8080:8080 ubuntu bash
# dpkg -i /downloads/code-server*.deb
# code-server --auth none --log debug --bind-addr 0.0.0.0:8080

Trying to connect on localhost:8080 is working fine for now.

@kaaax0815
Copy link

kaaax0815 commented Feb 10, 2021

I got this error in Docker when having Bad File Permissions

@zapstar
Copy link
Author

zapstar commented Feb 10, 2021

@kaaax0815 that could be the case as well, I was running the container as root.

@kaaax0815
Copy link

@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
Copy link
Contributor

jsjoeio commented Feb 10, 2021

Thanks for trying @zapstar!

Will be able to install 3.8.1 only over the weekend (I use code-server as my primary daily driver)

Sounds good. I'll leave this open until we hear back from you.

@walterreade
Copy link

walterreade commented 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

[2021-02-10 22:31:29.982] [exthost] [info] ExtensionService#_doActivateExtension vscode.python {"startup":false,"extensionId":{"value":"vscode.python","_lower":"vscode.python"},"activationEvent":"onLanguage:python"}
[2021-02-10 22:31:29.982] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/lib/code-server/lib/vscode/extensions/python/dist/pythonMain
[2021-02-10 22:31:29.985] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"extensionId":{"value":"vscode.debug-auto-launch","_lower":"vscode.debug-auto-launch"},"activationEvent":"*"}
[2021-02-10 22:31:29.985] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/lib/code-server/lib/vscode/extensions/debug-auto-launch/dist/extension
[2021-02-10 22:31:29.987] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"extensionId":{"value":"vscode.emmet","_lower":"vscode.emmet"},"activationEvent":"*"}
[2021-02-10 22:31:29.987] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/lib/code-server/lib/vscode/extensions/emmet/dist/node/emmetNodeMain
[2021-02-10 22:31:30.007] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2021-02-10 22:31:30.007] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/lib/code-server/lib/vscode/extensions/git/dist/main
[2021-02-10 22:31:30.039] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"extensionId":{"value":"vscode.merge-conflict","_lower":"vscode.merge-conflict"},"activationEvent":"*"}
[2021-02-10 22:31:30.039] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/lib/code-server/lib/vscode/extensions/merge-conflict/dist/mergeConflictMain
[2021-02-10 22:31:30.042] [exthost] [info] ExtensionService#_doActivateExtension vscode.search-result {"startup":true,"extensionId":{"value":"vscode.search-result","_lower":"vscode.search-result"},"activationEvent":"*"}
[2021-02-10 22:31:30.042] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/lib/code-server/lib/vscode/extensions/search-result/dist/extension.js
[2021-02-10 22:31:30.202] [exthost] [info] ExtensionService#_doActivateExtension vscode.github {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2021-02-10 22:31:30.202] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/lib/code-server/lib/vscode/extensions/github/dist/extension.js
[2021-02-10 22:31:30.306] [exthost] [info] eager extensions activated
[2021-02-10 22:31:30.391] [exthost] [warning] [Decorations] CAPPING events from decorations provider vscode.git 1244
[2021-02-10 22:31:30.405] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.js-debug {"startup":false,"extensionId":{"value":"ms-vscode.js-debug","_lower":"ms-vscode.js-debug"},"activationEvent":"onCommand:extension.js-debug.clearAutoAttachVariables"}
[2021-02-10 22:31:30.405] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/lib/code-server/lib/vscode/extensions/ms-vscode.js-debug/src/extension.js

I appreciate everyone's work here! :-)

@jsjoeio
Copy link
Contributor

jsjoeio commented Feb 10, 2021

Strange 🤔 Could it be an issue with an extension? Can you try disabling your extensions?

@walterreade
Copy link

walterreade commented Feb 10, 2021

@jsjoeio This was a fresh install on a new VM, with no extensions added. (And again the issue disappeared by downgrading to 3.8.0.

@jsjoeio
Copy link
Contributor

jsjoeio commented Feb 11, 2021

@walterreade ah, thanks for clarifying! Can you try running code-server with the --log debug and pasting the logs here?

@zapstar
Copy link
Author

zapstar commented Feb 15, 2021

@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):

  1. Start code-server like below
  2. Connect to the server using your browser and keep it open.
  3. Kill the code-server in the background. UI detects disconnect and attempts to reconnect (with a timer).
  4. 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)

@code-asher
Copy link
Member

code-asher commented 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
Copy link
Member

code-asher commented 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-asher code-asher 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 Feb 25, 2021
@code-asher code-asher added bug Something isn't working and removed waiting-for-info Waiting for more information from submitter labels Feb 25, 2021
@vnijs
Copy link

vnijs commented 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.

image

@code-asher code-asher self-assigned this Apr 29, 2021
@jsjoeio jsjoeio added this to the On Deck milestone Apr 29, 2021
@luckfu
Copy link

luckfu commented 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
Copy link
Author

zapstar commented 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.

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).

@stale
Copy link

stale bot commented 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.

@stale stale bot added the stale label Dec 12, 2021
@stale stale bot closed this as completed Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants