Skip to content

error spawn /usr/local/Cellar/code-server/3.12.0/libexec/lib/coder-cloud-agent ENOENT #4209

Closed

Description

@danna2019

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

Activity

  1. jsjoeio commented on Sep 20, 2021

    @jsjoeio
    Contributor

    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

  2. jsjoeio commented on Sep 20, 2021

    @jsjoeio
    Contributor

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

  3. jsjoeio commented on Sep 20, 2021

    @jsjoeio
    Contributor

    Any ideas? @code-asher @TeffenEllis

  4. code-asher commented on Sep 20, 2021

    @code-asher
    Member
  5. code-asher commented on Sep 20, 2021

    @code-asher
    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
  6. jsjoeio commented on Sep 20, 2021

    @jsjoeio
    Contributor

    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

  7. jsjoeio commented on Sep 20, 2021

    @jsjoeio
    Contributor
    ➜  ~ 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

  8. jsjoeio commented on Sep 20, 2021

    @jsjoeio
    Contributor

    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.

  9. danna2019 commented on Sep 21, 2021

    @danna2019
    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.

  10. jsjoeio commented on Sep 22, 2021

    @jsjoeio
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions