code-server icon indicating copy to clipboard operation
code-server copied to clipboard

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

Open wwbmmm opened this issue 7 years ago • 71 comments

  • code-server version: v1.31.1-100
  • OS Version: Ubuntu 18.10

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"}

wwbmmm avatar Mar 08 '19 04:03 wwbmmm

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

Zhachory1 avatar Mar 21 '19 17:03 Zhachory1

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

justiandevs avatar Mar 21 '19 19:03 justiandevs

@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

Danielybl avatar Mar 22 '19 05:03 Danielybl

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.

finalburn avatar Mar 24 '19 18:03 finalburn

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

navin-moorthy avatar Mar 28 '19 00:03 navin-moorthy

same error, Ubuntu 16.04.5 LTS. Capture

edelah avatar Mar 28 '19 01:03 edelah

it is working now with latest docker image. Thanks!

jackalcooper avatar Mar 28 '19 11:03 jackalcooper

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.

finalburn avatar Mar 28 '19 16:03 finalburn

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

yekai1024 avatar Mar 29 '19 02:03 yekai1024

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

AnishTiwari avatar Mar 29 '19 06:03 AnishTiwari

For anyone who might be interested. here is the ID of the image I pulled.

codercom/code-server                                           latest              3f11c56fcdda        2 days ago 

jackalcooper avatar Mar 29 '19 09:03 jackalcooper

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

Sorry for the confusion here, I am able get the code server up and running. But even after the connection I got the above error in command line. Despite the error try to access the link.

navin-moorthy avatar Mar 29 '19 16:03 navin-moorthy

I have instance with Ubuntu 18.04 (LTS), installed the latest as of today Coder release which is

root@codercom:~/dev/recommended-bump# code-server --version
1.408-vsc1.32.0

And everything is working except that same error, and I'm guessing that's why my integrated terminal is black and cannot see anything?

tunnckoCore avatar Mar 29 '19 23:03 tunnckoCore

This error doesn't actually cause any issues. I would suspect the black terminal is caused by something else

coadler avatar Mar 29 '19 23:03 coadler

@coadler for example? It was that why just after fresh machine install and fresh code-server startup. No settings changes or anything. Any ideas to debug it?

tunnckoCore avatar Mar 29 '19 23:03 tunnckoCore

Aaaaah, heck. Forget it, just realized to try to disable the Brave's Shields blocker :D Sometimes blocks too much, sometimes not enough.

tunnckoCore avatar Mar 29 '19 23:03 tunnckoCore

This issue is closed, is not a bug of code-server? I noticed that the code-server running normally, should I just ignore this error for now?

liupengf12 avatar Mar 31 '19 04:03 liupengf12

@liupengf12 yes.

edit: Or at least you can add the file with this content

{
  "rootURIWorkspaces": [],
  "folderURIWorkspaces": [],
  "emptyWorkspaceInfos": [],
  "emptyWorkspaces": []
}

It's a default one.

tunnckoCore avatar Mar 31 '19 10:03 tunnckoCore

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!

@ndom91 hello, i tried your method but then i got the following error

ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, scandir '/home/yusef/.code-server/User/workspaceStorage'\n\nError: ENOENT: no such file or directory, scandir '/home/yusef/.code-server/User/workspaceStorage'\n    at Timeout.setTimeout [as _onTimeout] (/home/travis/build/codercom/code-server/packages/server/build/bootstrap-fork.js.gz: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"}

yusef-ho avatar Apr 01 '19 06:04 yusef-ho

I'm having the same issue here. I tried to launch it in DigitalOcean container, it shows the same error and I couldn't open code-server.

InfantAjayVenus avatar Apr 01 '19 09:04 InfantAjayVenus