coder / code-server

VS Code in the browser
https://coder.com
MIT License
67.6k stars 5.54k forks source link

ENOENT: no such file or directory, open '/root/.code-server/Backups/workspaces.json' #121

Closed wwbmmm closed 5 years ago

wwbmmm commented 5 years ago

Steps to Reproduce

  1. use docker to start code-server, wait a while
  2. and you will see this error:
ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/root/.code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/.code-server/Backups/workspaces.json'\n    at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/usr/local/bin/code-server:468:27336), <anonymous
>:76664:31)\n    at ontimeout (timers.js:498:11)\n    at tryOnTimeout (timers.js:323:5)\n    at Timer.listOnTimeout (timers.js:
290:5)\n"}
batobolg commented 5 years ago

me too

edelah commented 5 years ago

me too

nitishk72 commented 5 years ago

I also found this while running on Google cloud

nhooyr commented 5 years ago

Please avoid me too comments in favour of using GitHub reactions.

theriverman commented 5 years ago

I'm getting the very same error in the beginning. Later, when I navigate to the code-server's address in my browser, login with the generated password and mess around in vscode it suddenly crashes. In order, I did the following actions:

Traceback:

root@dev:~/native-code-server/bin# ./code-server -d /root/native-code-server/projects --allow-http
INFO  code-server v1.31.1-100
INFO  Additional documentation: http://github.com/codercom/code-server
INFO  Initializing {"data-dir":"/root/native-code-server/projects","working-dir":"/root/native-code-server/bin","log-dir":"/root/native-code-server/projects/logs/20190308233649456"}
INFO  Starting shared process [1/5]...
INFO  Starting webserver... {"host":"0.0.0.0","port":8443}
WARN  No certificate specified. This could be insecure.
WARN  Documentation on securing your setup: https://coder.com/docs
INFO
INFO  Password: ************************
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:8443/
INFO
INFO  Connected to shared process
ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/root/native-code-server/projects/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/native-code-server/projects/Backups/workspaces.json'\n    at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/root/native-code-server/bin/code-server:468:27371), <anonymous>:71445:31)\n    at ontimeout (timers.js:475:11)\n    at tryOnTimeout (timers.js:310:5)\n    at Timer.listOnTimeout (timers.js:270:5)\n"}
INFO  WebSocket opened / {"client":1,"ip":"127.0.0.1"}
INFO  Created data directory
INFO  WebSocket closed / {"client":1,"code":1001}
INFO  WebSocket opened / {"client":2,"ip":"127.0.0.1"}
INFO  Created data directory
INFO  WebSocket closed / {"client":2,"code":1006}
INFO  WebSocket opened / {"client":3,"ip":"127.0.0.1"}
INFO  Created data directory
internal/child_process.js:323
    throw errnoException(err, 'spawn');
    ^

Error: spawn ENOMEM
    at _errnoException (util.js:1024:11)
    at ChildProcess.spawn (internal/child_process.js:323:11)
    at Object.exports.spawn [as _spawn] (child_process.js:502:9)
    at t.async (/root/native-code-server/bin/code-server:716:35021)
    at e.exports (/root/native-code-server/bin/code-server:716:34522)
    at e (/root/native-code-server/bin/code-server:716:33324)
    at Timeout.c [as _onTimeout] (/root/native-code-server/bin/code-server:716:33617)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)

root@prod:~/native-code-server/bin# ls -lh /root/native-code-server/projects/Backups/workspaces.json
ls: cannot access '/root/native-code-server/projects/Backups/workspaces.json': No such file or directory
JasonLiuLiuLiuLiu commented 5 years ago

I get same error at tecent clould centos 7.4 64 ,Docker version 18.09.3, build 774a1f4 INFO code-server development INFO Additional documentation: http://github.com/codercom/code-server INFO Initializing {"data-dir":"/root/.code-server","working-dir":"/root/project","log-dir":"/root/.code-server/logs/20190309021032283"} INFO Starting shared process [1/5]... INFO Starting webserver... {"host":"0.0.0.0","port":8443} WARN No certificate specified. This could be insecure. WARN Documentation on securing your setup: https://coder.com/docs WARN Launched without authentication. INFO
INFO Started (click the link below to open): INFO http://localhost:8443/ INFO
INFO Connected to shared process ERROR SHARED stderr {"data":"Uncaught Exception: Error: ENOENT: no such file or directory, open '/root/.code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/.code-server/Backups/workspaces.json'\n at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), :94976:31)\n at ontimeout (timers.js:498:11)\n at tryOnTimeout (timers.js:323:5)\n at Timer.listOnTimeout (timers.js:290:5)\n"}

Thanks~

northfoxz commented 5 years ago

+1 running both on binary version and Dockerfile gives the same result. Ubuntu 16.04

ryavit commented 5 years ago

I get same error in Ubuntu 16.04 on AWS clouds

ubuntu@ip-172-31-25-334:~/coder$ sudo ./code-server -p 80 INFO code-server v1.0.0 INFO Additional documentation: http://github.com/codercom/code-server INFO Initializing {"data-dir":"/home/ubuntu/.code-server","working-dir":"/home/ubuntu/coder","log-dir":"/home/ubuntu/.code-server/logs/20190309104304890"} INFO Starting shared process [1/5]... INFO Starting webserver... {"host":"0.0.0.0","port":80} WARN No certificate specified. This could be insecure. WARN Documentation on securing your setup: https://coder.com/docs INFO
INFO Password: fl4u1A3chFfj INFO
INFO Started (click the link below to open): INFO http://localhost:80/ INFO
INFO Connected to shared process ERROR SHARED stderr {"data":"Uncaught Exception: Error: ENOENT: no such file or directory, open '/home/ubuntu/.code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/home/ubuntu/.code-server/Backups/workspaces.json'\n at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/home/ubuntu/coder/code-server:468:27371), :71434:31)\n at ontimeout (timers.js:475:11)\n at tryOnTimeout (timers.js:310:5)\n at Timer.listOnTimeout (timers.js:270:5)\n"}

zanhk commented 5 years ago

Debian 9 64 bit (fresh installation)


root@xxx:~/code-server# ./code-server --cert /etc/letsencrypt/live/xxx/cert.pem --cert-key /etc/letsencrypt/live/xxx/privkey.pem -d /home/vscode -p 443
INFO  code-server v1.0.0
INFO  Additional documentation: http://github.com/codercom/code-server
INFO  Initializing {"data-dir":"/home/vscode","working-dir":"/root/code-server","log-dir":"/home/vscode/logs/20190309121854195"}
INFO  Starting webserver... {"host":"0.0.0.0","port":443}
INFO
INFO  Password: 4ecDQQlGR7Hb
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:443/
INFO
INFO  Starting shared process [1/5]...
INFO  Connected to shared process
INFO  WebSocket opened / {"client":1,"ip":"xxx"}
INFO  Created data directory
ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/home/vscode/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/home/vscode/Backups/workspaces.json'\n    at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/root/code-server/code-server:468:27371), <anonymous>:71434:31)\n    at ontimeout (timers.js:475:11)\n    at tryOnTimeout (timers.js:310:5)\n    at Timer.listOnTimeout (timers.js:270:5)\n"}
INFO  WebSocket closed / {"client":1,"code":1001}
INFO  WebSocket opened / {"client":2,"ip":"xxx"}
INFO  Created data directory
gorbypark commented 5 years ago

I can confirm this happens in Container Linux/CoreOS stable as well, running on Digital Ocean (as well as Debian 9.7 as other have reported).

wasd96040501 commented 5 years ago

I got same error in Ubuntu 16.04 on aliyun cloud

root@xxx:~/workdir# docker run -t -p 127.0.0.1:8443:8443 -v "${PWD}:/root/project" codercom/code-server --allow-http --no-auth
INFO  code-server development
INFO  Additional documentation: http://github.com/codercom/code-server
INFO  Initializing {"data-dir":"/root/.local/share/code-server","working-dir":"/root/project","log-dir":"/root/.cache/code-server/logs/20190311023801696"}
INFO  Starting shared process [1/5]...
INFO  Starting webserver... {"host":"0.0.0.0","port":8443}
WARN  No certificate specified. This could be insecure.
WARN  Documentation on securing your setup: https://coder.com/docs
WARN  Launched without authentication.
INFO   
INFO  Started (click the link below to open):
INFO  http://localhost:8443/
INFO   
INFO  Connected to shared process
ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/root/.local/share/code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/.local/share/code-server/Backups/workspaces.json'\n    at Timeout.setTimeout [as _onTimeout] (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:67388:31)\n    at ontimeout (timers.js:498:11)\n    at tryOnTimeout (timers.js:323:5)\n    at Timer.listOnTimeout (timers.js:290:5)\n"}
juliosegarra commented 5 years ago

Same error on Ubuntu 18.04 Digital Ocean standard vps while just trying to run binary version.

ERROR SHARED stderr {"data":"Uncaught Exception: Error: ENOENT: no such file or directory, open '/root/.code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/.code-server/Backups/workspaces.json'\n at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/root/code-server-1.31.1-100-linux-x64/code-server:468:27371), <anonymous>:71445:31)\n at ontimeout (timers.js:475:11)\n at tryOnTimeout (timers.js:310:5)\n at Timer.listOnTimeout (timers.js:270:5)\n"}

liweis commented 5 years ago

Same error on Ubuntu 16.04 and no file from data directory can be seen in vs code's explorer

xuemind commented 5 years ago

Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-1030-azure x86_64) Windows Azure Virtual Machine code-server-1.31.1-100-linux-x64

ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/home/<user>/.code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/home/<user>/.code-server/Backups/workspaces.json'\n    at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/home/<user>/code-server-1.31.1-100-linux-x64/code-server:468:27371), <anonymous>:71445:31)\n    at ontimeout (timers.js:475:11)\n    at tryOnTimeout (timers.js:310:5)\n    at Timer.listOnTimeout (timers.js:270:5)\n"}
INFO  WebSocket opened / {"client":1,"ip":"<hoster_ip>"}
INFO  Created data directory
internal/child_process.js:323
    throw errnoException(err, 'spawn');
    ^
Error: spawn ENOMEM
    at _errnoException (util.js:1024:11)
    at ChildProcess.spawn (internal/child_process.js:323:11)
    at Object.exports.spawn [as _spawn] (child_process.js:502:9)
    at t.async (/home/<user>/code-server-1.31.1-100-linux-x64/code-server:716:35021)
    at e.exports (/home/<user>/code-server-1.31.1-100-linux-x64/code-server:716:34522)
    at e (/home/<user>/code-server-1.31.1-100-linux-x64/code-server:716:33324)
    at Timeout.c [as _onTimeout] (/home/<user>/code-server-1.31.1-100-linux-x64/code-server:716:33617)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)
makamekm commented 5 years ago

I managed to make it work with specifying -d like this:

./code-server ./projects/<myproject> --allow-http --no-auth -d /Users/<username>/.code-server

But I still see the same error in the console.

coadler commented 5 years ago

@xuemind seems like your error is caused because the VM ran out of memory. You might need to add a gb or two of swap so the binary is able to boot properly without running our of memory. I was able to get it running on a GCP micro instance with 600mb of memory like this

ndom91 commented 5 years ago

Same here on Ubuntu 18.10 server via the binary.

However by specifying -d /home/[user]/.code-server and manually creating /home/[user]/.code-server/Backups/workspaces.json it seems to have worked!

cstoddart commented 5 years ago

@ndom91 what does your workspaces.json file look like? I'm having trouble finding an example and am receiving a cannot read property 'map' of undefined error with an empty workspaces.json file.

hexlo commented 5 years ago

I get this error when i try to run the binary on Ubuntu Server 18.04:

INFO code-server v1.0.0 INFO Additional documentation: http://github.com/codercom/code-server INFO Initializing {"data-dir":"/home/cj/.code-server","working-dir":"/var/www/dataandlogic.com","log-dir":"/home/cj/.code-server/logs/20190312210351837"} INFO Starting webserver... {"host":"0.0.0.0","port":8443} WARN No certificate specified. This could be insecure. WARN Documentation on securing your setup: https://coder.com/docs WARN Launched without authentication. INFO INFO Started (click the link below to open): INFO http://localhost:8443/ INFO INFO Starting shared process [1/5]... INFO Connected to shared process

ERROR SHARED stderr {"data":"Uncaught Exception: Error: ENOENT: no such file or directory, open '/home/cj/.code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/home/cj/.code-server/Backups/workspaces.json'\n at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/home/cj/vscode/code-server-1.31.0-20-x86_64-linux/code-server:468:27371), <anonymous>:71434:31)\n at ontimeout (timers.js:475:11)\n at tryOnTimeout (timers.js:310:5)\n at Timer.listOnTimeout (timers.js:270:5)\n"}

I also tried version 1.31.0-100 with same results. When i try to run the docker, it also gives me the same error.

ndom91 commented 5 years ago

@ndom91 what does your workspaces.json file look like? I'm having trouble finding an example and am receiving a cannot read property 'map' of undefined error with an empty workspaces.json file.

I just created an empty one, i.e. touch /home/[user]/.code-server/Backups/workspace.json

EDIT: I just looked at it, now that I've run this once or twice, and its still empty haha

hexlo commented 5 years ago

@ndom91 I tried creating the Backups folder with an empty workspace.json but now i get this: ERROR SHARED stderr {"data":"Uncaught Exception: Error: Unexpected end of JSON input\n\nSyntaxError: Unexpected end of JSON input\n at JSON.parse (<anonymous>)\n at pfs_1.readFile.then.contents (eval at exports.requireModule (/home/cj/vscode/code-server/code-server:468:27660), <anonymous>:77277:45)\n at <anonymous>\n at Timeout.setTimeout [as _onTimeout] (eval at exports.requireModule (/home/cj/vscode/code-server/code-server:468:27660), <anonymous>:52540:31)\n at ontimeout (timers.js:498:11)\n at tryOnTimeout (timers.js:323:5)\n at Timer.listOnTimeout (timers.js:290:5)\n"}

I guess i need a proper workspaces.json? What version are you using? Does anyone know whats in that file? Even better, does anyone have a default one that they can share?

dansou901 commented 5 years ago

After creating a workspaces.json in the desired directory and filling it with the content

{
        "folders": [
                {
                        "path": "/home/<username_redacted>/code-server/workspace/folders"
                }
        ]
}

I get a new error:

ERROR SHARED stderr {"data":"Uncaught Exception:  Error: Cannot read property 'map' of undefined\n\nTypeError: Cannot read property 'map' of undefined\n    at pfs_1.readFile.then.contents (eval at exports.requireModule (/home/<username_redacted>/code-server/code-server-1.32.0-245-linux-x64/code-server:468:27660), <anonymous>:77278:76)\n    at <anonymous>\n    at Timeout.setTimeout [as _onTimeout] (eval at exports.requireModule (/home/<username_redacted>/code-server/code-server-1.32.0-245-linux-x64/code-server:468:27660), <anonymous>:52540:31)\n    at ontimeout (timers.js:498:11)\n    at tryOnTimeout (timers.js:323:5)\n    at Timer.listOnTimeout (timers.js:290:5)\n"}
ndom91 commented 5 years ago

Hmm strange, like I said mine worked while it was empty - as long as it was there. The full command for me was the following:

/opt/vscode-server/code-server /var/www/html -d /home/ndo/.code-server --password=####### --allow-http

dansou901 commented 5 years ago

OK, I never tried with --allow-http, maybe thats different then. I'll try that later and report back...

dansou901 commented 5 years ago

Just tried with --allow-http, same error...

ndom91 commented 5 years ago

Yeah sorry I should have mentioned, I only have allow http because I have it behind a reverse proxy with nginx

tracker1 commented 5 years ago

Windows with Docker Desktop, similar result...

$ docker run --rm -it -p 8443:8443 -v "${PWD}://root//project" codercom/code-server --allow-http --no-auth -d //root//project
INFO  code-server development
INFO  Additional documentation: http://github.com/codercom/code-server
INFO  Initializing {"data-dir":"/root/project","working-dir":"/root/project","log-dir":"/root/.cache/code-server/logs/20190314233657085"}
INFO  Starting shared process [1/5]...
INFO  Starting webserver... {"host":"0.0.0.0","port":8443}
WARN  No certificate specified. This could be insecure.
WARN  Documentation on securing your setup: https://coder.com/docs
WARN  Launched without authentication.
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:8443/
INFO
INFO  Connected to shared process
ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/root/project/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/project/Backups/workspaces.json'\n    at Timeout.setTimeout [as _onTimeout] (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:57561:31)\n    at ontimeout (timers.js:498:11)\n    at tryOnTimeout (timers.js:323:5)\n    at Timer.listOnTimeout (timers.js:290:5)\n"}
^CINFO  Starting shared process [1/5]... {"error":"Exited with null"}
INFO  Connected to shared process
ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/root/project/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/project/Backups/workspaces.json'\n    at Timeout.setTimeout [as _onTimeout] (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:57561:31)\n    at ontimeout (timers.js:498:11)\n    at tryOnTimeout (timers.js:323:5)\n    at Timer.listOnTimeout (timers.js:290:5)\n"}
henryfjordan commented 5 years ago

I solved this in Docker on elementaryOS (Linux Desktop)

I tried the following docker-compose setup:

  vscode:
    image: codercom/code-server
    entrypoint: sh -c "mkdir -p /root/.local/share/code-server/Backups/ && touch /root/.local/share/code-server/Backups/workspaces.json && code-server --allow-http"
    expose:
      - 8443
    volumes:
      - /home/henry/development:/root/project
    restart: always
    networks:
      - vscode
    depends_on:
      - nginx-proxy

Notice I just overrode the entrypoint to make the file in question then run code-server

Gary-KK commented 5 years ago
  1. use directory A as workspace to mount and start the docker, not error
  2. use directory B as workspace to mount and restart the docker, ENOENT: no such file or directory, open '/root/.code-server/Backups/workspaces.json
  3. switch back to directory A as workspace to mount and restart, no error

Looks like if you use a new workspace directory, it did not correctly create the workspaces.json?

DeviousFusion commented 5 years ago

Having the same issue when using the default Dockerfile.

ERROR SHARED stderr {"data":"Uncaught Exception: Error: ENOENT: no such file or directory, open '/root/.local/share/code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/.local/share/code-server/Backups/workspaces.json'\n at Timeout.setTimeout [as _onTimeout] (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:56921:31)\n at ontimeout (timers.js:498:11)\n at tryOnTimeout (timers.js:323:5)\n at Timer.listOnTimeout (timers.js:290:5)\n"}

If I manually create /root/.local/share/code-server/Backups/workspaces.json, it gives the following error:

ERROR SHARED stderr {"data":"Uncaught Exception: Error: Unexpected end of JSON input\n\nSyntaxError: Unexpected end of JSON input\n at JSON.parse (<anonymous>)\n at pfs_1.readFile.then.contents (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:81639:45)\n at <anonymous>\n at Timeout.setTimeout [as _onTimeout] (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:56921:31)\n at ontimeout (timers.js:498:11)\n at tryOnTimeout (timers.js:323:5)\n at Timer.listOnTimeout (timers.js:290:5)\n"}

gugadev commented 5 years ago

Same error using MacOS Mojave. Running from the binary works even with the same error, so, maybe is related to another thing. 🤔

avgcoderlife commented 5 years ago

Anyone found a workaround ?? This problem still exists Tried everything from specifying different folder to creating the file manually.

I always prefer binary file compared to docker. Seems like NO one is able to use the binary file installation.

gugadev commented 5 years ago

@adithyau I don't have problems running from the binary one, but from docker. That's curious.

luislavena commented 5 years ago

When using the docker command shown on the homepage, I've worked around this error by additionally mounting /root/.local to a path or a volume:

$ docker run -t -p 8443:8443 -v "$(pwd)/.coder:/root/.local" -v "$(pwd):/root/project" codercom/code-server code-server --allow-http --no-auth

Note: above command is insecure, use only for testing locally and always review the security documentation provided.

Cheers.

ricohgag commented 5 years ago

/root/.local/share/code-server/Backups/workspaces.json Have you tried overwriting the entire file?

kylecarbs commented 5 years ago

This error shouldn't actually cause any issues. Not sure if we should suppress it.

ricohgag commented 5 years ago

Originally, I couldn't load it out with black screen, but later I updated the configuration of nginx, so that vs code could be loaded out on the web page。 TIM截图20190320085839

Lawrence1108 commented 5 years ago

Same error using GCP,

mdp commented 5 years ago

Ran into a similar issue, but noticed that when I opened the page in "Incognito" mode, it worked. I suspect that some state is getting saved into the browsers local storage. Clearing it seemed to solve the problem.

In Chrome you can clear a single site with: Developer Tools > Application (tab) > Clear storage

Edit: This is incorrect. As @kylecarbs pointed out below, it's related to an invalid folder. Please ignore.

kylecarbs commented 5 years ago

@mdp that's an issue with opening an invalid folder. We've fixed that on master. Will come in a release later today.

Zhachory1 commented 5 years ago

What is suppose to be in the workspace.json file? If we just set it to default params, shouldn't it work fine?

justiandevs commented 5 years ago

Is it not maybe an error with your firewall? (UFW or something)

Danielybl commented 5 years ago

@mdp that's an issue with opening an invalid folder. We've fixed that on master. Will come in a release later today.

Was it released?

Thanks

boardfish commented 5 years ago

Originally, I couldn't load it out with black screen, but later I updated the configuration of nginx, so that vs code could be loaded out on the web page。 TIM截图20190320085839

Tried this and it didn't work for me. My symptoms are similar to @juliosegarra's.

navin-moorthy commented 5 years ago

Capture Still getting the same error in Linux Machine 18.04. Updated to the new release.

edelah commented 5 years ago

same error, Ubuntu 16.04.5 LTS. Capture

jackalcooper commented 5 years ago

it is working now with latest docker image. Thanks!

boardfish commented 5 years ago

Not working for me. I'm running using the Docker oneliner behind an nginx reverse proxy. All I get is a black screen.

docker run -t -p 127.0.0.1:5000:8443 -v "${PWD}:/root/project" codercom/code-server code-server --allow-http --no-auth
INFO  code-server development
INFO  Additional documentation: http://github.com/codercom/code-server
INFO  Initializing {"data-dir":"/root/.local/share/code-server","working-dir":"/root/project/code-server","log-dir":"/root/.cache/code-server/logs/20190328155807526"}
INFO  Starting shared process [1/5]...
INFO  Starting webserver... {"host":"0.0.0.0","port":8443}
WARN  No certificate specified. This could be insecure.
WARN  Documentation on securing your setup: https://coder.com/docs
WARN  Launched without authentication.
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:8443/
INFO
INFO  Connected to shared process
ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/root/.local/share/code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/.local/share/code-server/Backups/workspaces.json'\n    at Timeout.setTimeout [as _onTimeout] (/src/packages/server/build/bootstrap-fork.js.gz:56921:31)\n    at ontimeout (timers.js:498:11)\n    at tryOnTimeout (timers.js:323:5)\n    at Timer.listOnTimeout (timers.js:290:5)\n"}

In the browser console, I get this:

GET https://<hostname>/e5b7d1.bundle.js net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)

Pulled the latest tag after @jackalcooper's comment.

yekai1024 commented 5 years ago

Same issue with the latest docker on centos7. Any workaround?

AnishTiwari commented 5 years ago

Same error on Ubuntu 18.04 Digital Ocean standard vps while just trying to run binary version.

ERROR SHARED stderr {"data":"Uncaught Exception: Error: ENOENT: no such file or directory, open '/root/.code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/.code-server/Backups/workspaces.json'\n at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/root/code-server-1.31.1-100-linux-x64/code-server:468:27371), <anonymous>:71445:31)\n at ontimeout (timers.js:475:11)\n at tryOnTimeout (timers.js:310:5)\n at Timer.listOnTimeout (timers.js:270:5)\n"}

Same error on Ubuntu 18.04 Digital Ocean standard vps while just trying to run binary version.

ERROR SHARED stderr {"data":"Uncaught Exception: Error: ENOENT: no such file or directory, open '/root/.code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/.code-server/Backups/workspaces.json'\n at Timeout.eval [as _onTimeout] (eval at exports.requireModule (/root/code-server-1.31.1-100-linux-x64/code-server:468:27371), <anonymous>:71445:31)\n at ontimeout (timers.js:475:11)\n at tryOnTimeout (timers.js:310:5)\n at Timer.listOnTimeout (timers.js:270:5)\n"}

Check if the port 8443 is allowed in ufw rules