cli icon indicating copy to clipboard operation
cli copied to clipboard

rosetta error: attachment of code signature supplement failed

Open chancancode opened this issue 4 years ago • 1 comments

On a fresh install on a M1 Mac (macOS 12.0.1), I am getting this error:

❯❯❯ brew tap heroku/brew && brew install heroku

Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 37 formulae.
==> New Casks
ssdreporter
==> Updated Casks
Updated 29 casks.
==> Deleted Casks
ssdreporter-free

==> Tapping heroku/brew
Cloning into '/opt/homebrew/Library/Taps/heroku/homebrew-brew'...
remote: Enumerating objects: 1785, done.
remote: Counting objects: 100% (170/170), done.
remote: Compressing objects: 100% (129/129), done.
remote: Total 1785 (delta 42), reused 169 (delta 41), pack-reused 1615
Receiving objects: 100% (1785/1785), 234.61 KiB | 957.00 KiB/s, done.
Resolving deltas: 100% (438/438), done.
Tapped 2 formulae (16 files, 291.4KB).
==> Downloading https://nodejs.org/download/release/v12.21.0/node-v12.21.0-darwin-x64.tar.xz
######################################################################## 100.0%
==> Downloading https://cli-assets.heroku.com/heroku-v7.59.2/heroku-v7.59.2.tar.xz
######################################################################## 100.0%
==> Installing heroku from heroku/brew
==> Installing dependencies for heroku/brew/heroku: heroku/brew/heroku-node
==> Installing heroku/brew/heroku dependency: heroku/brew/heroku-node
🍺  /opt/homebrew/Cellar/heroku-node/12.21.0: 6 files, 45.4MB, built in 5 seconds
==> Installing heroku/brew/heroku
==> Caveats
To use the Heroku CLI's autocomplete --
  Via homebrew's shell completion:
    1) Follow homebrew's install instructions https://docs.brew.sh/Shell-Completion
        NOTE: For zsh, as the instructions mention, be sure compinit is autoloaded
              and called, either explicitly or via a framework like oh-my-zsh.
    2) Then run
      $ heroku autocomplete --refresh-cache
  OR
  Use our standalone setup:
    1) Run and follow the install steps:
      $ heroku autocomplete

zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions
==> Summary
🍺  /opt/homebrew/Cellar/heroku/7.59.2: 28,792 files, 63.0MB, built in 17 seconds
==> Running `brew cleanup heroku`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> heroku
To use the Heroku CLI's autocomplete --
  Via homebrew's shell completion:
    1) Follow homebrew's install instructions https://docs.brew.sh/Shell-Completion
        NOTE: For zsh, as the instructions mention, be sure compinit is autoloaded
              and called, either explicitly or via a framework like oh-my-zsh.
    2) Then run
      $ heroku autocomplete --refresh-cache
  OR
  Use our standalone setup:
    1) Run and follow the install steps:
      $ heroku autocomplete

zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions
❯❯❯ heroku
rosetta error: /var/db/oah/279281325309952_279281325309952/ac8260adccf53beac1d3f38f4e3db95a09e4f89016a91beeaac8b3b1e86a4674/node.aot: attachment of code signature supplement failed: 1
/opt/homebrew/bin/heroku: line 46: 53479 Trace/BPT trap: 5       "$NODE" "$DIR/run" "$@"

Searching the Internet for this error seems like it's a somewhat generic issue. Some people say it's a bug in some version of macOS but as far as I can tell I am not on one of those affected versions.

In any case, this installation wants to use Node 12 which require emulation, so I just went ahead and installed the Heroku CLI with volta install heroku via Volta and now it is running fine on Node 16. Ideally this should be looked into and fixed though, or with heroku-node updated to a newer version since Node 12 is approaching EOL anyway.

chancancode avatar Jan 05 '22 18:01 chancancode

same

schester44 avatar Jun 15 '22 19:06 schester44