macOS Build Times Out With "Too long with no output"

"Too long with no output" error

macOS Keychain

On the macOS executor specifically, timeout issues, or builds hanging, are generally caused by one of two issues.

The most common issue is a keychain pop-up (prompting for keychain access or a password) occurring that blocks execution. As the job is executed in a "headless" environment with no user interaction available, this essentially blocks any further execution and the job then times out.

This is usually caused by not having the setup_circle_ci action called in the Fastfile. It is important this is called before each lane so that the keychain is set up in a way that facilities the CI environment.

Please ensure this is set up like so:

# fastlane/Fastfile ... 
platform :ios do
before_all do
setup_circle_ci
end
...
end

This setup_circle_ci action creates a temporary keychain with no password requirement for secrets and certificates to be stored.

Pop-ups in the GUI

It is possible to connect to the host's GUI via VNC using the CircleCI macOS orb. This will allow you to run any affected commands and observe the behaviour in the UI. Often you will see a pop-up dialog box that is visible in the GUI, but does not relay to the headless terminal in the job's step output.

orbs:
macos: circleci/macos@1.0
jobs:
build-test:
macos:
xcode: 11.7
steps:
- checkout
- macos/enable-vnc
username: vncuser
password: $MAC_VNC_PASSWORD

Additional Resources

Using Fastlane on CircleCI

Fastlane documentation for CircleCI

macOS Orb documentation

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

Comments

0 comments

Article is closed for comments.