fastlane scan hangs with parallel testing

fastlane scan or xcodebuild hangs once parallel testing spins up multiple simulator clones that contend for the simulator subsystem.

Partial fit Likely class: parallel clone contention / CoreSimulator overload · Updated

Symptom

A single run that uses parallel testing (multiple simulator clones, or multiple -destination devices) hangs. One serial simulator would have been fine; spinning up several at once wedges.

What it usually looks like

Why it happens / likely failure classes

Parallel testing multiplies simulator lifecycle work through one shared subsystem:

Quick checks

# How many clones / devices are booting at once during the hang?
xcrun simctl list devices | grep -i 'boot\|clone'

# Is the subsystem responsive under the parallel load?
time xcrun simctl list devices available

# Does a single-device run of the same suite complete?
xcodebuild test -scheme YourScheme \
  -destination "platform=iOS Simulator,id=<UDID>"

If the serial run is reliable and only the parallel run hangs, the problem is contention from concurrency, not the tests.

Manual mitigations

When XCSteward may help

This is a partial fit — XCSteward focuses on the execution and lifecycle side:

Worth testing against this class of failure when the hang is in clone boot/teardown rather than in scan’s reporting. Note the trade-off: XCSteward favors predictable serialized execution over maximum parallel throughput.

When XCSteward probably will not help

Common questions

What does "fastlane scan hangs with parallel testing" usually mean?
It usually points to parallel clone contention / CoreSimulator overload. fastlane scan or xcodebuild hangs once parallel testing spins up multiple simulator clones that contend for the simulator subsystem. Start by checking simulator readiness, destination selection, CoreSimulator/simctl responsiveness, and whether another xcodebuild, simctl, or Simulator process is already active before treating it as a test-code failure.
Can XCSteward help with "fastlane scan hangs with parallel testing"?
This is a partial fit. XCSteward may help when the failure comes from execution readiness, destination selection, timeouts, cleanup, or contention. It probably will not help when the root cause is missing configuration, a broken runtime, a test-code bug, or a vendor image defect.
What should I check first?
Check whether xcrun simctl commands return promptly, whether xcodebuild can resolve a concrete simulator destination, whether the device is truly ready rather than merely Booted, and whether concurrent agents, scripts, or manual runs are touching the same simulator subsystem.