Build fails: iPhone Simulator always timing out after 120 seconds


#1

On 11/28 my iOS CirrcleCI builds have been timing out.

2016-11-29 08:02:38.755 xcodebuild[907:4790] iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1. 2016-11-29 08:02:38.796 xcodebuild[907:4821] iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.

I tried the solution prescribed in the following thread: iPhone Simulator Timed Out, however it failed:

2016-11-29 08:07:57.875 xcodebuild[901:4348] CoreSimulator is attempting to unload a stale CoreSimulatorService job. Detected Xcode.app relocation or CoreSimulatorService version change. Framework path (/Applications/Xcode-7.3.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework) and version (209.19) does not match existing job path (/Applications/Xcode-8.2.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService) and version (338.14.2). 2016-11-29 08:07:58.141 xcodebuild[901:4348] Failed to locate a valid instance of CoreSimulatorService in the bootstrap. Adding it now. 2016-11-29 08:07:58.155 xcodebuild[901:4348] *** Assertion failure in -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreSimulator/CoreSimulator-209.19/CoreSimulator/SimServiceContext.m:536 ** INTERNAL ERROR: Uncaught exception ** Uncaught Exception: The loaded com.apple.CoreSimulator.CoreSimulatorService job does not match our expectations: pathOfLoadedJob: /Applications/Xcode-8.2.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService, our frameworkPath: /Applications/Xcode-7.3.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework Stack: 0 __exceptionPreprocess (in CoreFoundation) 1 objc_exception_throw (in libobjc.A.dylib) 2 +[NSException raise:format:arguments:] (in CoreFoundation) 3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] (in Foundation) 4 -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid] (in CoreSimulator) 5 -[SimServiceContext connect] (in CoreSimulator) 6 -[SimServiceContext initWithDeveloperDir:connectionType:] (in CoreSimulator) 7 __63+[SimServiceContext sharedServiceContextForDeveloperDir:error:]_block_invoke_2 (in CoreSimulator) 8 _dispatch_client_callout (in libdispatch.dylib)

My circle.yml file is pretty simple (see below). Any help would be appreciated!

machine:
environment:
GYM_CODE_SIGNING_IDENTITY: "iPhone Distribution: XXXXXXX, Inc. (XXXXXXXX)"
xcode:
version: 7.3

deployment:
staging:
branch: master
commands:
- gym
- ipa distribute:itunesconnect -i xxxxxxxxxx --upload --verbose


#2