Timed out waiting for AX loaded notification

My XCUITests fail randomly with the message:

Initialization failure for UI testing: Timed out waiting for AX loaded notification

This happens randomly, but frequently. I currently have tests running on two simulators:
  • iPhone 11, iOS 13.6

  • iPhone SE (1st generation), iOS 12.2

I've tried switching simulators to other iOS versions, other phone types to see if that makes a difference. But it doesn't. Sometimes both run fine, sometimes one fails, sometimes they both do.

I'm using Xcode server setup as a second user on my mac. Using:
  • Xcode: 11.6

  • Mac OS: 10.5.4

Timed out waiting for AX loaded notification
 
 
Q