Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Failed to start sail with "sudo chown -R" problem #176

Closed
linux-china opened this issue May 22, 2019 · 8 comments · Fixed by #184
Closed

Failed to start sail with "sudo chown -R" problem #176

linux-china opened this issue May 22, 2019 · 8 comments · Fixed by #184

Comments

@linux-china
Copy link

I built last snapshot of Sail, and I got the following error when run project:

Successfully tagged linux-china_sail-demo-hat-4dd9e4a6c1c7d141:latest
2019-05-22 16:29:02 INFO	writing sail proxy logs to /var/folders/fc/2bmlvpc166qbp2jc5d610jw00000gn/T/sailproxy_linux-china_sail-demo948935679
2019-05-22 16:29:30 INFO	loaded code-server in 27.792900111s
2019-05-22 16:29:40 ERROR	failed to wait for project to be online: context deadline exceeded
+ cd /home/user/sail-demo
+ sudo chown -R user:user /home/user/.vscode
2019-05-22 16:29:40 ERROR	build run failed: context deadline exceeded

and it's fine with Sail 1.0.0 version.

My env: Mac with VS code installed already.

@teddy-codes
Copy link
Contributor

Can you run code-server from the binary?

@nathanpotter
Copy link
Contributor

nathanpotter commented May 23, 2019

This may happen if you have a large ~/.vscode directory or if the code-server binary fails to start.

Can you run it with sail run --keep <org/repo> and then run docker logs $CONTAINER_ID and share them here?

@linux-china
Copy link
Author

linux-china commented May 23, 2019

@nathanpotter it's correct and .vscode is large, and Docker logs as following:

+ cd /home/user/sail-demo
+ sudo chown -R user:user /home/user/.vscode
+ code-server --host 0.0.0.0 --port 8443 --data-dir /home/user/.config/Code --extensions-dir /home/user/.vscode/host-extensions --extra-extensions-dir /home/user/.vscode/extensions --allow-http --no-auth
+ tee /tmp/code-server.log
(node:199) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
INFO  code-server v1.1119-vsc1.33.1
WARN  "--data-dir" is deprecated. Use "--user-data-dir" instead.
INFO  Additional documentation: http://github.com/cdr/code-server
INFO  Initializing {"data-dir":"/home/user/.config/Code","extensions-dir":"/home/user/.vscode/host-extensions","working-dir":"/home/user/sail-demo","log-dir":"/home/user/.cache/code-server/logs/20190523022943700"}
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://github.com/cdr/code-server/blob/master/doc/security/ssl.md
WARN  Launched without authentication.
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:8443/
INFO
INFO  Starting shared process [1/5]...
WARN  stderr {"data":"(node:212) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.\n"}
INFO  Connected to shared process

Any solution now?

@adamgoose
Copy link

Might I propose a --no-extensions flag that would disable the mounting of the user's local extensions?

@teddy-codes
Copy link
Contributor

Would this be similar to sshcode's nosync?

@nhooyr
Copy link
Contributor

nhooyr commented May 23, 2019

The fix is to remove the -R.

@nhooyr
Copy link
Contributor

nhooyr commented May 23, 2019

We only want to make sure the automatically created directory ~/.vscode, has the right perms.

@teddy-codes
Copy link
Contributor

will open a PR in a second

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants