我使用Teamcity作为我的构建服务器,我有多个代理,代理上安装了多个Xcode版本。
就像我开始在构建代理上使用Xcode7.3一样,我随机遇到了构建问题。当我遇到这个问题时,我在构建日志中看到了类似的条目:
[19:16:50][Step 8/38] 2016-03-31 19:16:50.017 xcodebuild[87413:1812907] [MT] DVTSDK: Skipped SDK /xcode_7_3/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.5.sdk; its version (10.5) is below required minimum (10.11) for the macosx platform.
[19:16:50][Step 8/38] 2016-03-31 19:16:50.018 xcodebuild[87413:1812907] [MT] DVTSDK: Skipped SDK /xcode_7_3/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk; its version (10.6) is below required minimum (10.11) for the macosx platform.
[19:16:50][Step 8/38] 2016-03-31 19:16:50.018 xcodebuild[87413:1812907] [MT] DVTSDK: Skipped SDK /xcode_7_3/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk; its version (10.7) is below required minimum (10.11) for the macosx platform.
[19:16:50][Step 8/38] 2016-03-31 19:16:50.019 xcodebuild[87413:1812907] [MT] DVTSDK: Skipped SDK /xcode_7_3/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk; its version (10.8) is below required minimum (10.11) for the macosx platform.
[19:16:50][Step 8/38] 2016-03-31 19:16:50.019 xcodebuild[87413:1812907] [MT] DVTSDK: Skipped SDK /xcode_7_3/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk; its version (10.9) is below required minimum (10.11) for the macosx platform.
[19:16:50][Step 8/38] 2016-03-31 19:16:50.019 xcodebuild[87413:1812907] [MT] DVTSDK: Skipped SDK /xcode_7_3/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk; its version (10.10) is below required minimum (10.11) for the macosx platform.
[19:16:50][Step 8/38] 2016-03-31 19:16:50.461 xcodebuild[87413:1812925] CoreSimulator is attempting to unload a stale CoreSimulatorService job. Existing job (com.apple.CoreSimulator.CoreSimulatorService.117.15.1.lkhDXxRPp5yy) is from an older version and is being removed to prevent problems.
[19:16:50][Step 8/38] 2016-03-31 19:16:50.471 xcodebuild[87413:1812925] Job com.apple.CoreSimulator.CoreSimulatorService.117.15.1.lkhDXxRPp5yy exists after SMJobRemove(). This can occur if running sandboxed or with an unexpected bootstrap port (eg: using sudo). jobPath: /xcode_6_3_2/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService frameworkPath: /xcode_7_3/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework
[19:16:50][Step 8/38] 2016-03-31 19:16:50.471 xcodebuild[87413:1812925] CoreSimulator is attempting to unload a stale CoreSimulatorService job. Existing job (com.apple.CoreSimulator.CoreSimulatorService.179.1.E8ttyeDeVgWK) is from an older version and is being removed to prevent problems.
[19:16:50][Step 8/38] 2016-03-31 19:16:50.481 xcodebuild[87413:1812925] Job com.apple.CoreSimulator.CoreSimulatorService.179.1.E8ttyeDeVgWK exists after SMJobRemove(). This can occur if running sandboxed or with an unexpected bootstrap port (eg: using sudo). jobPath: /xcode_7/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService frameworkPath: /xcode_7_3/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework
[19:16:50][Step 8/38] 2016-03-31 19:16:50.496 xcodebuild[87413:1812925] CoreSimulator is attempting to unload a stale CoreSimulatorService job. Detected Xcode.app relocation or CoreSimulatorService version change. Framework path (/xcode_7_3/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework) and version (209.19) does not match existing job path (/xcode_7_2_1/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService) and version (201.3).
[19:16:50][Step 8/38] 2016-03-31 19:16:50.508 xcodebuild[87413:1812925] Job com.apple.CoreSimulator.CoreSimulatorService exists after SMJobRemove(). This can occur if running sandboxed or with an unexpected bootstrap port (eg: using sudo). jobPath: /xcode_7_2_1/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService frameworkPath: /xcode_7_3/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework
[19:16:50][Step 8/38] Not privileged to remove service.
[19:16:50][Step 8/38] 2016-03-31 19:16:50.514 xcodebuild[87413:1812925] Failed to us launchctl asuser, falling back to not using asuser.
[19:16:50][Step 8/38] Not privileged to remove service.
[19:16:50][Step 8/38] 2016-03-31 19:16:50.517 xcodebuild[87413:1812925] Failed to remove job com.apple.CoreSimulator.CoreSimulatorService via launchctl. Status: 256 : exited? 1,1 signaled? 0,0 stopped? 0,1
[19:16:50][Step 8/38] 2016-03-31 19:16:50.517 xcodebuild[87413:1812925] Failed to locate a valid instance of CoreSimulatorService in the bootstrap. Adding it now.
[19:16:50][Step 8/38] 2016-03-31 19:16:50.533 xcodebuild[87413:1812925] *** Assertion failure in -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreSimulator/CoreSimulator-209.19/CoreSimulator/SimServiceContext.m:536
[19:16:50][Step 8/38] ** INTERNAL ERROR: Uncaught exception **
[19:16:50][Step 8/38] Uncaught Exception: The loaded com.apple.CoreSimulator.CoreSimulatorService job does not match our expectations: pathOfLoadedJob: /xcode_7_2_1/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService, our frameworkPath: /xcode_7_3/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework
[19:16:50][Step 8/38] Stack:
[19:16:51][Step 8/38] 0 __exceptionPreprocess (in CoreFoundation)
[19:16:51][Step 8/38] 1 objc_exception_throw (in libobjc.A.dylib)
[19:16:51][Step 8/38] 2 +[NSException raise:format:arguments:] (in CoreFoundation)
[19:16:51][Step 8/38] 3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] (in Foundation)
[19:16:51][Step 8/38] 4 -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid] (in CoreSimulator)
[19:16:51][Step 8/38] 5 -[SimServiceContext connect] (in CoreSimulator)
[19:16:51][Step 8/38] 6 -[SimServiceContext initWithDeveloperDir:connectionType:] (in CoreSimulator)
[19:16:51][Step 8/38] 7 __63+[SimServiceContext sharedServiceContextForDeveloperDir:error:]_block_invoke_2 (in CoreSimulator)
[19:16:51][Step 8/38] 8 _dispatch_client_callout (in libdispatch.dylib)
[19:16:51][Step 8/38] 9 _dispatch_barrier_sync_f_invoke (in libdispatch.dylib)
[19:16:51][Step 8/38] 10 +[SimServiceContext sharedServiceContextForDeveloperDir:error:] (in CoreSimulator)
[19:16:51][Step 8/38] 11 __60+[SimServiceContext(DVTAdditions) dvt_sharedServiceContext:]_block_invoke (in DVTiPhoneSimulatorRemoteClient)
[19:16:51][Step 8/38] 12 _dispatch_client_callout (in libdispatch.dylib)
[19:16:51][Step 8/38] 13 dispatch_once_f (in libdispatch.dylib)
[19:16:51][Step 8/38] 14 +[SimServiceContext(DVTAdditions) dvt_sharedServiceContext:] (in DVTiPhoneSimulatorRemoteClient)
[19:16:51][Step 8/38] 15 __42-[DVTiPhoneSimulatorLocator startLocating]_block_invoke (in IDEiOSSupportCore)
[19:16:51][Step 8/38] 16 __DVTDispatchAsync_block_invoke (in DVTFoundation)
[19:16:51][Step 8/38] 17 _dispatch_call_block_and_release (in libdispatch.dylib)
[19:16:51][Step 8/38] 18 _dispatch_client_callout (in libdispatch.dylib)
[19:16:51][Step 8/38] 19 _dispatch_root_queue_drain (in libdispatch.dylib)
[19:16:51][Step 8/38] 20 _dispatch_worker_thread3 (in libdispatch.dylib)
[19:16:51][Step 8/38] 21 _pthread_wqthread (in libsystem_pthread.dylib)
[19:16:51][Step 8/38] 22 start_wqthread (in libsystem_pthread.dylib)
[19:16:51][Step 8/38]
[19:16:51][Step 8/38] ~/build.tc/greenhorn-mac/work/f81b5b0cbda273df ~/build.tc/greenhorn-mac/work/f81b5b0cbda273df
[19:16:52][Step 8/38] ~/build.tc/greenhorn-mac/work/f81b5b0cbda273df
[19:16:52][Step 8/38]
[19:16:52][Step 8/38]
[19:16:52][Step 8/38] Process exited with code 0
我不确定,但是当这个问题发生时,我已经在具有不同Xcode版本的代理上同时运行了多个“xcodebuild”。
您是否知道如何解决此问题?
提前感谢您的帮助!
答案 0 :(得分:2)
我遇到了同样的问题。我似乎能够通过在执行com.apple.CoreSimulator.CoreSimulatorService
之前卸载xcodebuild
这样来解决它。
$launchctl remove com.apple.CoreSimulator.CoreSimulatorService
我想当用DEVELOPER_DIR
执行多个xcode版本时,可以运行不合适的com.apple.CoreSimulator.CoreSimulatorService。