code-server: Terminal stuck in Starting...

Hi

A couple of our users have reported issues when they’re on flaky networks in India (ping packet loss 5-10%) that the terminal is stuck in “Starting…”.

Is there anything that can be done for code-server to work in these conditions?

Thanks!

  • Web Browser: Chrome
  • Local OS: Windows/Linux/Mac
  • Remote OS: Ubuntu 18.04
  • Remote Architecture: Kubernetes via Nginx
  • code-server --version: 3.4.1

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 16 (3 by maintainers)

Most upvoted comments

When client network is slow, The “teminal” was stuck at “starting”. And in the meantime, “OUTPUT” [Log(Window)] showed : [error] EACCES: permission denied, open ‘/proc/1/environ’ And I found, there were 4 processes. (normally, when working good, there are only 2 processes) 4170 0.0 0.3 1394380 119532 ? Sl 14:21 0:00 /opt/plugin/code-server/node /opt/plugin/code-server/lib/vscode/out/bootstrap-fork --type=extensionHost --uriTransformerPath=/opt/plugin/code-server/lib/vscode/out/vs/server/node/uriTransformer 4379 0.0 0.0 859388 23044 ? Sl 14:21 0:00 /opt/plugin/code-server/node /opt/plugin/code-server/lib/vscode/out/bootstrap-fork --type=watcherService 10254 1.2 0.3 1394380 119532 ? Sl 14:21 0:38 /opt/plugin/code-server/node /opt/plugin/code-server/lib/vscode/out/bootstrap-fork --type=extensionHost --uriTransformerPath=/opt/plugin/code-server/lib/vscode/out/vs/server/node/uriTransformer 10265 0.0 0.0 859388 23044 ? Sl 14:21 0:00 /opt/plugin/code-server/node /opt/plugin/code-server/lib/vscode/out/bootstrap-fork --type=watcherService

“terminal.integrated.inheritEnv”: true solve the problem. Somehow, when opening the codeserver page, “terminal.integrated.inheritEnv” option is unchecked, and caused terminal stucked in starting

In my case, I found that this problem is due to using linux service file without specifying working directory. So I guess it got some permission problem. After I specified WorkingDirectory for the service, the problem was resolved.

[Unit]
Description=code-server
After=network.target

[Service]
Type=exec
ExecStart=/usr/bin/code-server
Restart=always
User=%i
WorkingDirectory=/home/%i

[Install]
WantedBy=default.target

share the method i resolve the bug:

step1. delete the file: ~/.local/share/code-server/User/settings.json

step2. restart the code-server

Done.

I’m experiencing this locally in a Docker container. I was getting the error open '/proc/0/status': Error: ENOENT: no such file or directory, open '/proc/0/status' when creating a new terminal window, but I believe that was because I didn’t have zsh installed in my container. After doing so, the terminal is still “Starting…”, and no log output occurs.