Hanging Builds when using the macOS m1 resource class


Users utilizing the M1 resource class on the CircleCI macOS executor are seeing builds hang. Though we can see builds hanging or timing out for other reasons, a specific bug in Apple's hypervisor framework that can cause issues in virtualized environments. These issues arise when a simulator is launched. You may notice a "Too long with no output (exceeded 5m0s): context deadline exceeded" error. 


1. Launch your simulator at the beginning of your build. You may use the CircleCI macOS orb's preboot-simulator command.

2. Wait for your simulator to to be booted. You may use the CircleCI macOS orb. This orb includes a command; wait-until-simulator-booted. This command will wait until your simulator has booted or your job's `NO_OUTPUT_TIMEOUT` is hit. This is 10 minutes by default.

3. Add a retry to the step  in which you start your simulator to avoid having to re-run your build. 

Alternatively, you may want to add a final step that uses the when attribute when the value of "on_fail" and CircleCI v1 retry a build endpoint to rerun the job upon failure. 


Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.