code-server: VS Code exited unexpectedly with code 0
OS/Web Information
- Web Browser: Firefox Developer Edition 91.0b8
- Local OS: Windows 11 Build 22000.100
- Remote OS: Raspberry Pi OS, Raspberry Pi 3B+
- Remote Architecture: ARMv7
code-server --version: 3.11.0 4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd
Steps to Reproduce
Installed with yarn
sudo yarn global add code-server
- Start code server (code-server -vvv)
- Log in
Expected
VSCode should show up
Actual

Logs
pi@raspberrypi:~ $ code-server -vvv
[2021-07-29T06:33:01.169Z] trace child:6849 got message {"message":{"type":"handshake","args":{"_":[],"bind-addr":"127.0.0.1:8080","auth":"password","password":"nope","config":"/home/pi/.config/code-server/config.yaml","verbose":true,"user-data-dir":"/home/pi/.local/share/code-server","extensions-dir":"/home/pi/.local/share/code-server/extensions","log":"trace","host":"127.0.0.1","port":8080,"proxy-domain":[],"usingEnvPassword":true,"usingEnvHashedPassword":false}}}
[2021-07-29T06:33:01.179Z] info code-server 3.11.0 4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd
[2021-07-29T06:33:01.181Z] info Using user-data-dir ~/.local/share/code-server
[2021-07-29T06:33:01.181Z] trace Using extensions-dir ~/.local/share/code-server/extensions
[2021-07-29T06:33:01.216Z] info Using config file ~/.config/code-server/config.yaml
[2021-07-29T06:33:01.216Z] info HTTP server listening on http://127.0.0.1:8080
[2021-07-29T06:33:01.217Z] info - Authentication is enabled
[2021-07-29T06:33:01.217Z] info - Using password from $PASSWORD
[2021-07-29T06:33:01.218Z] info - Not serving HTTPS
[2021-07-29T06:33:07.168Z] trace heartbeat
[2021-07-29T06:33:07.357Z] debug forking vs code...
[2021-07-29T06:33:08.937Z] error VS Code exited unexpectedly with code 0
[2021-07-29T06:34:07.175Z] debug 0 active connections
[2021-07-29T06:37:14.732Z] trace heartbeat
[2021-07-29T06:37:14.915Z] debug forking vs code...
[2021-07-29T06:37:16.478Z] error VS Code exited unexpectedly with code 0
~/.local/share/code-server/coder-logs.: Empty
Screenshot
Notes
This issue can be reproduced in VS Code: Yes/No nope
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (6 by maintainers)
it worked when using npm lol
Thank you for posting this!
I forgot that yarn swallows its own logs entirely so it’s hard to tell if there were any issues with it. One problem I’ve seen come up many times is that a dependency fails to download or compile but the yarn command will still exit successfully so I was trying to see if that was the case.
I don’t have a Pi to test this on so I tried a fresh Ubuntu on Docker and ran these same commands (the only difference was that I had to add curl and I skipped using sudo since I was already root) and I was able to use code-server normally without any problems.
So I suppose it must be specific to the Pi or maybe it’s related to being 32 bit somehow.
Since there are no logs at all from code-server I suspect something went wrong with the the dependencies.
Here is a shot in the dark:
Make sure lib/vscode compiled correctly by moving to the code-server install directory, going to lib/vscode, and running
npm rebuild(and possiblyyarnas well just for good measure).I think we should add some more logging to the VS Code entry since that might help us narrow down this kind of spawning issue.
All right, so far seems everything looks in order. I think we’ll need the install logs to debug further.
What version of Node are you using?
Do you have these dependencies installed: https://github.com/cdr/code-server/blob/main/docs/npm.md
We don’t have have a Raspberry Pi section but maybe we should. I think the requirements will be similar to the Ubuntu section.
It could also be helpful to post the output of
yarn global add code-serverto see if there were any build failures (@jsjoeio maybe we should add that to the template when reporting installations with yarn/npm).