Ironclad / Ironclad/rivet

[Bug]: Rivet's "Node" executor requires Rosetta 2 but doesn't prompt

Open
#227 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
4.7k
Forks
388
PR merge metrics
No merged PRs in 30d

Description

### What happened?

It appears that if you do not have Rosetta 2 installed on an M1/M2 Mac, and you attempt to use the Node executor, the "run" button never appears, and no errors or dialogs appear on screen. Digging into the Javascript console shows the error "Error running sidecar - Bad CPU type in executable (os error 86)".

It appears that Rivet's node binary is an Intel binary which requires Rosetta to be installed to work on M1/M2, but for some reason the ["you need to install Rosetta" window](https://support.apple.com/library/content/dam/edam/applecare/images/en_US/macos/Big-Sur/macos-big-sur-software-update-rosetta-alert.jpg) isn't opening.

Potential resolutions would be:

- Provide an arm64 "Apple Silicon" binary in the app (which will assumedly require changes to the build process)
- Or, check if the user is on Apple Silicon (`uname -m`) and if so, check if Rosetta is installed (`stat /Library/Apple/usr/share/rosetta/rosetta`) and if not, prompt the user to install it (or have a button offering to just install it by running `/usr/sbin/softwareupdate --install-rosetta --agree-to-license` or similar).

### What was the expected functionality?

The run button does not appear if Node is selected as the executor and Node cannot run due to architecture incompatibility. No error messages or indicator appears, so the user doesn't know why the Run button isn't showing up.

### Describe your environment

The user who first found this problem was on a 2021 14" MBP with M1 Pro and macOS 14.0

### Relevant log output

```shell
Error running sidecar - Bad CPU type in executable (os error 86)
```

### Relevant screenshots

![Screenshot 2023-10-25 at 12 30 47 PM](https://github.com/Ironclad/rivet/assets/241711/c89dd089-7c22-452a-83fb-de21f045ffa8)

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the missing Run button with the Node executor on an Apple Silicon Mac without Rosetta, then inspect the JavaScript console for the reported sidecar error. Done means the app visibly explains the architecture problem and offers an appropriate resolution, such as prompting for Rosetta or using an Apple Silicon binary.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, node.js, typescript
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.