-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error spawn /usr/local/Cellar/code-server/3.12.0/libexec/lib/coder-cloud-agent ENOENT #4209
Comments
I got this exact same error after upgrading to 3.12.0 using brew. ➜ ~ code-server --link
[2021-09-20T18:11:45.701Z] info code-server 3.12.0 4cd55f94c0a72f05c18cea070e10b969996614d2
[2021-09-20T18:11:45.702Z] info Using user-data-dir ~/.local/share/code-server
[2021-09-20T18:11:45.758Z] info Using config file ~/.config/code-server/config.yaml
[2021-09-20T18:11:45.758Z] info HTTP server listening on http://127.0.0.1:51757 (randomized by --link)
[2021-09-20T18:11:45.758Z] info - Authentication is disabled (disabled by --link)
[2021-09-20T18:11:45.759Z] info - Not serving HTTPS (disabled by --link)
[2021-09-20T18:11:45.803Z] error spawn /usr/local/Cellar/code-server/3.12.0/libexec/lib/coder-cloud-agent ENOENT cc @kylecarbs |
Thank you @danna2019 for opening this and posting the solution for how you fixed it! |
Any ideas? @code-asher @TeffenEllis |
We download this as part of the post-install:
https://github.com/cdr/code-server/blob/92d0d28dd7cea42f808e060b01208aa6939e8646/ci/build/npm-postinstall.sh#L60
When we build the release we add `postinstall` to the `package.json` and
copy the install script:
https://github.com/cdr/code-server/blob/92d0d28dd7cea42f808e060b01208aa6939e8646/ci/build/build-release.sh#L52-L58
One recent change is the addition of `bash` (It used to just be
`./postinstall.sh` without `bash`). Actually I forgot that our npm
package postinstall is written to run with just `sh` (in case bash is
not installed) so this should probably be `sh postinstall.sh`.
Could the `bash` addition here be the problem? Is this ran when a user
runs `brew install` or is it ran when it is added to Brew?
|
I wonder if other parts from the postinstall are missing. For example in
|
Good question. I'll run |
➜ ~ brew install code-server
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from aecadd205 to d8a659f5d.
Updated 3 taps (homebrew/cask-versions, homebrew/core and homebrew/cask).
==> New Formulae
actionlint gtop
bottom pkg-config-wrapper
clickhouse-cpp viddy
==> Updated Formulae
Updated 277 formulae.
==> Deleted Formulae
vavrdiasm
==> New Casks
notunes universal-gcode-platform
==> Updated Casks
Updated 129 casks.
==> Homebrew was updated to version 3.2.13
The changelog can be found at:
https://github.com/Homebrew/brew/releases/tag/3.2.13
==> Downloading https://ghcr.io/v2/homebrew/core/code-
Already downloaded: /Users/jp/Library/Caches/Homebrew/downloads/1814bc3bee4bba1376a65efaf55605deece3ae5593dade6d4f53e1c4719c7a76--code-server-3.12.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/code-
Already downloaded: /Users/jp/Library/Caches/Homebrew/downloads/e5db5fdef13936f0528e37b64f3b12cb6789657e4b06eb96fa84abd808d8840c--code-server--3.12.0.big_sur.bottle.tar.gz
==> Pouring code-server--3.12.0.big_sur.bottle.tar.gz
==> Caveats
The launchd service runs on http://127.0.0.1:8080. Logs are located at /usr/local/var/log/code-server.log.
To start code-server:
brew services start code-server
Or, if you don't want/need a background service you can just run:
/usr/local/opt/code-server/bin/code-server
==> Summary
🍺 /usr/local/Cellar/code-server/3.12.0: 6,726 files, 238.3MB Dang, looks like it was installed from cache |
Find and delete cache
then then install with Logs➜ ~ brew install code-server
==> Downloading https://ghcr.io/v2/homebrew/core/code-
#=#=# ##O#- #
==> Downloading https://ghcr.io/v2/homebrew/core/code-
==> Downloading from https://pkg-containers.githubuser
... 100.0%
==> Pouring code-server--3.12.0.big_sur.bottle.tar.gz
==> Caveats
The launchd service runs on http://127.0.0.1:8080. Logs are located at /usr/local/var/log/code-server.log.
To start code-server:
brew services start code-server
Or, if you don't want/need a background service you can just run:
/usr/local/opt/code-server/bin/code-server
==> Summary
🍺 /usr/local/Cellar/code-server/3.12.0: 6,726 files, 238.3MB Well nevermind...that doesn't tell us anything. |
If you want a formula for code-server, look at I seem it doesn't have any postinstall something. |
I think we found out how to fix this: #3874 (comment) |
OS/Web Information
code-server --version
: 3.12.0Steps to Reproduce
code-server --link
error spawn /usr/local/Cellar/code-server/3.12.0/libexec/lib/coder-cloud-agent ENOENT
Expected
'/usr/local/Cellar/code-server/3.12.0/libexec/lib/coder-cloud-agent' didn't installed using
brew install code-server
.Actual
So, I manually installed 'coder-cloud-agent' using
curl -fsSL "https://github.com/cdr/cloud-agent/releases/latest/download/cloud-agent-darwin-amd64" -o ./lib/coder-cloud-agent
on '/usr/local/Cellar/code-server/3.12.0/libexec', andchmod +x lib/coder-cloud-agent
. Then, solved.Logs
Screenshot
Notes
This issue can be reproduced in VS Code: Yes/No -> No
The text was updated successfully, but these errors were encountered: