Timed out waiting for target to check in.

I have a small suite of tests using XCUITesting, and intermittently I'm getting an error:

/[path]/UITests.swift:84: Failure requesting automation session for [app]:20392: Timed out waiting for target to check in.


This happens when calling XCUIApplication.launch().


From a bunch of relatively fruitless Googling, it seems that the timeout is either 2 minutes or 20 seconds. Neither of which matches empirical testing which points to the neighborhood of 40 seconds.


Is there a means of adjusting this timeout? The tests generally succeed when running from Xcode, but I also have an automated script that runs the tests fom the command line using xcodebuild as a number of users with different configurations, and every user reliably times out. Based on the timings reported, it takes an additional 10-15 seconds to start the app when running from the command line.


I would also say that the actual app running on an iPhone 8 takes ~5 seconds from the point of pressing the icon to being in the state the testing is waiting for.

Replies

Bump.

Is there a means of adjusting this timeout?

I don’t think so, but this isn’t really my specialism. If you can’t find answers elsewhere, I recommend that you open a DTS tech support incident and talk this over with one of DTS’s Xcode experts.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"