Tests Hanging on Xcode 26

Goal: We want to upgrade CI from Xcode 16.4 → 26.0.0. Along with this we are moving all of our snapshot testing over to iOS 26, on an iPhone 17 Pro. I have my branch made with all the changes, but when I run our testing suite on CircleCI, it is never able to finish due to it hanging indefinitely. This issue only occurs on my branch thats set up to migrate over to Xcode 26, and does not happen on our main branch.

I have seen the posts about the iPhone simulator booting issues on Xcode 26, and I have followed instructions here to make sure that it is prebooted.

Env (CI): m4pro.medium · macOS 15.6 · Xcode 26.x (Swift 6.0) · iOS 26.0 simulators · device: iPhone 17 Pro.

What happens:

  • Jobs start fine; hundreds of tests run and pass.

  • ~30 minutes in, the CircleCI console output stops mid-run (not the same test each time, and I have verified that every test it’s “hangs” on will pass when I run it locally).

  • The job hangs, and eventually our 20 minute timeout kicks in, and kills the job. This counts as a failure for our required tests, since the suite never finishes.

  • Reproducible with and without parallelization (we normally use parallel tests; tried disabling—same behavior).

  • We’re pinning Xcode 26 on M4 Pro, per CircleCI guidance

What I’ve already done:

  • Preboot simulator via circleci/macos@2 (preboot-simulator iPhone 17 Pro / iOS 26.0). C

  • Tried parallel on/off and reduced workers.

Questions:

  1. Is there a known iOS-26/Xcode-26 hang beyond the cold-boot issue that could explain mid-run console stalls?

  2. Any additional flags or orb settings you recommend (timeouts/retries) that help once tests are already running?

Happy to provide redacted logs, simctl dumps, and pipeline IDs. I would greatly appreciate any and all tips—this is blocking us from being able to switch over to Xcode 26. Let me know, thanks!

Can you send a build link to sebastian@circleci.com?

Did you manage to find anything? I am reproducing the same issue in my setup.

Could this be related?

@revans Did you find the root cause? Or did you have any breakthrough?

I have questions:

  1. Are you using snapshot testing?
    1.2. Using LiquidGlass or forcing UIDesignRequiresCompatibility?
  2. Is there a specific test where the build hangs?

We hit this too after moving to the Xcode 27 image, posting what fixed it in
case it saves someone the afternoon it cost us.

Our symptom was slightly different to the original post: our UI tests passed,
“Test Execute Succeeded” printed, the xcresult got written, and then the job
just sat there until CircleCI killed the step on the 10 minute no-output
timeout. Every time, and never locally.

We chased the wrong things first: assumed it was an Xcode 27 beta bug and waited
for the RC image (still hung), tried result bundle settings, looked at the
xcbeautify pipe. None of it mattered.

What actually found it was running sample on the stuck xcodebuild from a
wrapper script in the step:

XCTHRunDestinationAllocator.collectSimulatorDiagnostics(for:into:startTime:...)
  XCTHProcessInvocation.simCtlDiagnose(for:startTime:savingOutputInto:)
    OS_dispatch_semaphore.wait(wallTimeout:)

After the tests finish, xcodebuild shells out to simctl diagnose to collect a
simulator sysdiagnose, and that call never comes back on the macOS VM. xcodebuild
waits on the semaphore forever. The tests were done, it was purely the
diagnostics collection.

The fix was one flag, since the default is on-failure:

-collect-test-diagnostics never

We run through fastlane, so for us that was:

xcargs: "-collect-test-diagnostics never"

That step now finishes in seconds instead of timing out. Test results and the
xcresult bundle are unchanged, we only lose the sysdiagnose we were never
reading anyway.

Worth noting it triggers on failure by default, so a green suite can hide it and
it bites the first time a test actually fails.

thank you!!!

Thank you for sharing this, is quite refreshing to see we are not alone.
We are having quite similar issues to yours, except ours happen on EC2 Macs not on VMs, and it happens mid test, not at the end.

But then the same thing, it just hangs in there doing nothing. We found the problem also running a “sample” on the stuck xcodebuild. settin the same flag `-collect-test-diagnostics never` seems to be a good work around so far.

We still don’t know why this happens and what triggers the “collection” since it happens on tests that actually passes with the flag.

We saw the same thing on Xcode 27, running our UI tests on iOS 27 and iOS 26, and this fix worked and all the normal xcresults that we look for were still preserved. Thanks a ton!