Skip to content
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

Closed
danna2019 opened this issue Sep 20, 2021 · 10 comments · Fixed by #4231
Closed
Labels
bug Something isn't working

Comments

@danna2019
Copy link

danna2019 commented Sep 20, 2021

OS/Web Information

  • Web Browser: Safari
  • Local OS: iPadOS
  • Remote OS:macOs Catalina
  • Remote Architecture: Darwin-amd64
  • code-server --version: 3.12.0

Steps to Reproduce

  1. code-server --link
  2. Error occurred: 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', and
chmod +x lib/coder-cloud-agent. Then, solved.

Logs

Screenshot

Notes

This issue can be reproduced in VS Code: Yes/No -> No

@jsjoeio jsjoeio added the bug Something isn't working label Sep 20, 2021
@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 20, 2021

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

image

cc @kylecarbs

@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 20, 2021

Thank you @danna2019 for opening this and posting the solution for how you fixed it!

@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 20, 2021

Any ideas? @code-asher @TeffenEllis

@code-asher
Copy link
Member

code-asher commented Sep 20, 2021 via email

@code-asher
Copy link
Member

I wonder if other parts from the postinstall are missing. For example in vendor/modules/code-oss-dev the following should exist:

  • node_modules.asar
  • extensions/node_modules

@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 20, 2021

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?

Good question. I'll run brew uninstall code-server then reinstall with brew install code-server and paste the logs here

@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 20, 2021

~ 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

@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 20, 2021

Find and delete cache

find /Users/jp/Library/Caches/Homebrew/downloads/ -maxdepth 1 -name "*code-server*" -print

then rm <path>.

then install with brew install code-server

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.

@jsjoeio jsjoeio added the needs-investigation This issue needs to be further investigated label Sep 20, 2021
@danna2019
Copy link
Author

If you want a formula for code-server, look at /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/code-server.rb.

I seem it doesn't have any postinstall something.

@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 22, 2021

I think we found out how to fix this: #3874 (comment)

@code-asher code-asher removed the needs-investigation This issue needs to be further investigated label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants