Code-server: Code-Server does not indicate lost network connections.

Created on 2 Oct 2019  路  4Comments  路  Source: cdr/code-server

  • code-server version: code-server2.1523-vsc1.38.1-linux-x86_64
  • OS Version:
    Virtualization: kvm
    Operating System: Ubuntu 18.04.3 LTS
    Kernel: Linux 4.15.0-65-generic
    Architecture: x86-64
    Cloud Host: Linode

Description

I have copied the binary to my server and started it with a cron job with a script that starts Code-Server like this:

cd /home/USERNAME && \
/home/USERNAME/code-server/code-server2.1523-vsc1.38.1-linux-x86_64 \
--host 127.0.0.1 \
--port 3232 \
--no-auth \
--allow-http

I am using SSH port forwarding and SSH keys to connect to the Code-Server instance. This is an example of how I set this up:
ssh -N -L 8802:localhost:3232 MYSERVER.NET

This works just fine and the editor works as well as well as a couple other programs that I connect to in this manor. However, if the connection drops or "hicups" I remain disconnected but Code-Server does not indicate this to me. My only indication is that my updates don't actually happen and that the terminal does not work. When a file has unsaved changes its tab has a white dot in it and the dot is removed once the file is saved. This also happens but the file is not actually updated. There is no error or warning to indicate that the connection is lost. I can even continue to edit although my saves do not actually happen.

Steps to Reproduce

To reproduce the error you can simulate a connection drop. For example, I shut down the terminal window that is holding the SSH port forward.

As a side note I was initially using sshcode to use Code-Server but I found that each time I reconnected that the Apache service would crash. The error log only indicated that it detected that Apache was not shut down properly. I reproduced this many times consistently. I do not know if it is related. Code-Server actually read from the saved extensions, themes, and settings I had with sshcode.

bug

Most helpful comment

Latest master now notifies you when the connection is lost.

All 4 comments

This is something we're actively working on. VSCode Web is rather early and we have to patch some of it to work properly, so what you're seeing is a consequence of using a desktop-based IDE not being ported properly to cloud IDE standards in upstream. We'll try to patch this by reusing the WSL indicator at the status bar since we've discussed this internally as well being off-putting UX-wise.

1.39.1 has an indicator for when the connection to the server is lost so we'll want to upgrade soon.

Latest master now notifies you when the connection is lost.

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

korzq picture korzq  路  3Comments

infogulch picture infogulch  路  3Comments

Arsaev picture Arsaev  路  3Comments

infogulch picture infogulch  路  3Comments

lshamis picture lshamis  路  3Comments