Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 xcodebuild error message: 2020-08-11 14:42:52.089 xcodebuild[25142:4109283] [MT] PluginLoading: Required plug-in compatibility UUID BAB79788-ACEE-4291-826B-EC4667A6BEC5 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/SparkInspectorXcodePlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs Build settings from command line: COMPILER_INDEX_STORE_ENABLE = NO GCC_TREAT_WARNINGS_AS_ERRORS = 0 IPHONEOS_DEPLOYMENT_TARGET = 10.3 Build settings from configuration file '/var/folders/7g/wthmww9s3d307k50f6fk9zvr0000gq/T/2020711-24908-17gssbm.36fr/appium-temp.xcconfig': CODE_SIGN_IDENTITY = iPhone Developer DEVELOPMENT_TEAM = (intentionally removed) note: Using new build system note: Planning build note: Using build description from disk ** TEST BUILD SUCCEEDED ** 2020-08-11 14:42:53.504 xcodebuild[25142:4109333] IDETestOperationsObserverDebug: Writing diagnostic log for test session to: /Users/jasonlegako/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2020.08.11_14-42-53--0500.xcresult/Staging/2_Test/Diagnostics/WebDriverAgentRunner-C0E422DC-CCC4-4DE5-945A-782B9750DBDB/WebDriverAgentRunner-DFC6B7AC-4AEC-417F-BA55-29F359655E84/Session-WebDriverAgentRunner-2020-08-11_144253-LXyXFs.log 2020-08-11 14:42:53.505 xcodebuild[25142:4109283] [MT] IDETestOperationsObserverDebug: (A6D8723A-B364-4B4E-9EDA-97979F5A774B) Beginning test session WebDriverAgentRunner-A6D8723A-B364-4B4E-9EDA-97979F5A774B at 2020-08-11 14:42:53.505 with Xcode 11C504 on target 📱<DVTiOSDevice (0x7fe83430dd60), Jason's iPad, iPad, 10.3.3 (14G60), (intentionally removed)> { deviceSerialNumber: DVGK2503F182 identifier: (intentionally removed) deviceClass: iPad deviceName: Jason's iPad deviceIdentifier: (intentionally removed) productVersion: 10.3.3 buildVersion: 14G60 deviceSoftwareVersion: 10.3.3 (14G60) deviceArchitecture: armv7s deviceTotalCapacity: 13099438080 deviceAvailableCapacity: 3033419776 deviceIsTransient: NO ignored: NO deviceIsBusy: NO deviceIsPaired: YES deviceIsActivated: YES deviceActivationState: Activated isPasscodeLocked: YES deviceType: <DVTDeviceType:0x7fe8342402a0 Xcode.DeviceType.iPhone> supportedDeviceFamilies: ( 1, 2 ) applications: (null) provisioningProfiles: (null) hasInternalSupport: NO hasWritableSystem: NO isSupportedOS: YES bootArgs: (null) nextBootArgs: (null) connected: YES isWirelessEnabled: NO connectionType: direct hostname: (null) bonjourServiceName: cc:78:5f:de:2a:99@fe80::ce78:5fff:fede:2a99._apple-mobdev2._tcp.local. activeProxiedDevice: (null) } (10.3.3 (14G60)) 2020-08-11 14:42:55.809 xcodebuild[25142:4109283] [MT] IDETestOperationsObserverDebug: (A6D8723A-B364-4B4E-9EDA-97979F5A774B) Finished requesting crash reports. Continuing with testing. 2020-08-11 14:43:00.212 xcodebuild[25142:4109332] DTDeviceKit: Could not start house arrest service for app identifier com.facebook.WebDriverAgentRunner.xctrunner [Error Domain=com.apple.dtdevicekit Code=-402653093 "Xcode encountered an error" UserInfo={NSLocalizedFailureReason=Too many instances of this service are already running., com.apple.dtdevicekit.stacktrace=( 0 DTDeviceKitBase 0x000000011f44c6e7 DTDKCreateNSError + 109 1 DTDeviceKitBase 0x000000011f44cde9 DTDK_AMDErrorToNSError + 792 2 DTDeviceKitBase 0x000000011f45e467 __70-[DTDKRemoteDeviceConnection startHouseArrestServiceForAppIdentifier:]_block_invoke + 98 3 DTDeviceKitBase 0x000000011f45d4db __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_3 + 22 4 DTDeviceKitBase 0x000000011f44f15f __DTDKExecuteInSession_block_invoke_2 + 35 5 DTDeviceKitBase 0x000000011f44e593 __DTDKExecuteWithConnection_block_invoke_2 + 473 6 DTDeviceKitBase 0x000000011f44e391 __DTDKExecuteWithConnection_block_invoke + 106 7 libdispatch.dylib 0x00007fff645d563d _dispatch_client_callout + 8 8 libdispatch.dylib 0x00007fff645e1129 _dispatch_lane_barrier_sync_invoke_and_complete + 60 9 DVTFoundation 0x000000010f19e110 DVTDispatchBarrierSync + 208 10 DVTFoundation 0x000000010f175538 -[DVTDispatchLock performLockedBlock:] + 64 11 DTDeviceKitBase 0x000000011f44e292 DTDKExecuteWithConnection + 226 12 DTDeviceKitBase 0x000000011f44efc9 DTDKExecuteInSession + 376 13 DTDeviceKitBase 0x000000011f45d410 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_2 + 112 14 DVTFoundation 0x000000010f19be7a __DVT_CALLING_CLIENT_BLOCK__ + 7 15 DVTFoundation 0x000000010f19d552 __DVTDispatchAsync_block_invoke + 809 16 libdispatch.dylib 0x00007fff645d45f8 _dispatch_call_block_and_release + 12 17 libdispatch.dylib 0x00007fff645d563d _dispatch_client_callout + 8 18 libdispatch.dylib 0x00007fff645db8e0 _dispatch_lane_serial_drain + 602 19 libdispatch.dylib 0x00007fff645dc396 _dispatch_lane_invoke + 385 20 libdispatch.dylib 0x00007fff645e46ed _dispatch_workloop_worker_thread + 598 21 libsystem_pthread.dylib 0x00007fff64815611 _pthread_wqthread + 421 22 libsystem_pthread.dylib 0x00007fff648153fd start_wqthread + 13 ), DVTRadarComponentKey=487927, NSLocalizedDescription=Xcode encountered an error}] 2020-08-11 14:43:00.212 xcodebuild[25142:4109336] iPhoneConnect: 📱<DVTiOSDevice (0x7fe83430dd60), Jason's iPad, iPad, 10.3.3 (14G60), 554bda3c4a4f7d75b6636d49eec2d4630f39d8df> error uploading test configuration to app container: Error Domain=com.apple.dtdevicekit Code=-402653093 "Xcode encountered an error" UserInfo={NSLocalizedFailureReason=Too many instances of this service are already running., com.apple.dtdevicekit.stacktrace=( 0 DTDeviceKitBase 0x000000011f44c6e7 DTDKCreateNSError + 109 1 DTDeviceKitBase 0x000000011f44cde9 DTDK_AMDErrorToNSError + 792 2 DTDeviceKitBase 0x000000011f45e467 __70-[DTDKRemoteDeviceConnection startHouseArrestServiceForAppIdentifier:]_block_invoke + 98 3 DTDeviceKitBase 0x000000011f45d4db __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_3 + 22 4 DTDeviceKitBase 0x000000011f44f15f __DTDKExecuteInSession_block_invoke_2 + 35 5 DTDeviceKitBase 0x000000011f44e593 __DTDKExecuteWithConnection_block_invoke_2 + 473 6 DTDeviceKitBase 0x000000011f44e391 __DTDKExecuteWithConnection_block_invoke + 106 7 libdispatch.dylib 0x00007fff645d563d _dispatch_client_callout + 8 8 libdispatch.dylib 0x00007fff645e1129 _dispatch_lane_barrier_sync_invoke_and_complete + 60 9 DVTFoundation 0x000000010f19e110 DVTDispatchBarrierSync + 208 10 DVTFoundation 0x000000010f175538 -[DVTDispatchLock performLockedBlock:] + 64 11 DTDeviceKitBase 0x000000011f44e292 DTDKExecuteWithConnection + 226 12 DTDeviceKitBase 0x000000011f44efc9 DTDKExecuteInSession + 376 13 DTDeviceKitBase 0x000000011f45d410 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_2 + 112 14 DVTFoundation 0x000000010f19be7a __DVT_CALLING_CLIENT_BLOCK__ + 7 15 DVTFoundation 0x000000010f19d552 __DVTDispatchAsync_block_invoke + 809 16 libdispatch.dylib 0x00007fff645d45f8 _dispatch_call_block_and_release + 12 17 libdispatch.dylib 0x00007fff645d563d _dispatch_client_callout + 8 18 libdispatch.dylib 0x00007fff645db8e0 _dispatch_lane_serial_drain + 602 19 libdispatch.dylib 0x00007fff645dc396 _dispatch_lane_invoke + 385 20 libdispatch.dylib 0x00007fff645e46ed _dispatch_workloop_worker_thread + 598 21 libsystem_pthread.dylib 0x00007fff64815611 _pthread_wqthread + 421 22 libsystem_pthread.dylib 0x00007fff648153fd start_wqthread + 13 ), DVTRadarComponentKey=487927, NSLocalizedDescription=Xcode encountered an error} *** If you believe this error represents a bug, please attach the result bundle at /Users/jasonlegako/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2020.08.11_14-42-53--0500.xcresult 2020-08-11 14:43:00.221 xcodebuild[25142:4109283] [MT] IDETestOperationsObserverDebug: 6.730 elapsed -- Testing started completed. 2020-08-11 14:43:00.221 xcodebuild[25142:4109283] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start 2020-08-11 14:43:00.221 xcodebuild[25142:4109283] [MT] IDETestOperationsObserverDebug: 6.730 sec, +6.730 sec -- end 2020-08-11 14:43:00.221 xcodebuild[25142:4109283] Error Domain=com.apple.dtdevicekit Code=-402653093 "Xcode encountered an error" UserInfo={NSLocalizedFailureReason=Too many instances of this service are already running., com.apple.dtdevicekit.stacktrace=( 0 DTDeviceKitBase 0x000000011f44c6e7 DTDKCreateNSError + 109 1 DTDeviceKitBase 0x000000011f44cde9 DTDK_AMDErrorToNSError + 792 2 DTDeviceKitBase 0x000000011f45e467 __70-[DTDKRemoteDeviceConnection startHouseArrestServiceForAppIdentifier:]_block_invoke + 98 3 DTDeviceKitBase 0x000000011f45d4db __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_3 + 22 4 DTDeviceKitBase 0x000000011f44f15f __DTDKExecuteInSession_block_invoke_2 + 35 5 DTDeviceKitBase 0x000000011f44e593 __DTDKExecuteWithConnection_block_invoke_2 + 473 6 DTDeviceKitBase 0x000000011f44e391 __DTDKExecuteWithConnection_block_invoke + 106 7 libdispatch.dylib 0x00007fff645d563d _dispatch_client_callout + 8 8 libdispatch.dylib 0x00007fff645e1129 _dispatch_lane_barrier_sync_invoke_and_complete + 60 9 DVTFoundation 0x000000010f19e110 DVTDispatchBarrierSync + 208 10 DVTFoundation 0x000000010f175538 -[DVTDispatchLock performLockedBlock:] + 64 11 DTDeviceKitBase 0x000000011f44e292 DTDKExecuteWithConnection + 226 12 DTDeviceKitBase 0x000000011f44efc9 DTDKExecuteInSession + 376 13 DTDeviceKitBase 0x000000011f45d410 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_2 + 112 14 DVTFoundation 0x000000010f19be7a __DVT_CALLING_CLIENT_BLOCK__ + 7 15 DVTFoundation 0x000000010f19d552 __DVTDispatchAsync_block_invoke + 809 16 libdispatch.dylib 0x00007fff645d45f8 _dispatch_call_block_and_release + 12 17 libdispatch.dylib 0x00007fff645d563d _dispatch_client_callout + 8 18 libdispatch.dylib 0x00007fff645db8e0 _dispatch_lane_serial_drain + 602 19 libdispatch.dylib 0x00007fff645dc396 _dispatch_lane_invoke + 385 20 libdispatch.dylib 0x00007fff645e46ed _dispatch_workloop_worker_thread + 598 21 libsystem_pthread.dylib 0x00007fff64815611 _pthread_wqthread + 421 22 libsystem_pthread.dylib 0x00007fff648153fd start_wqthread + 13 ), DVTRadarComponentKey=487927, NSLocalizedDescription=Xcode encountered an error} Test session results, code coverage, and logs: /Users/jasonlegako/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2020.08.11_14-42-53--0500.xcresult Testing failed: WebDriverAgentRunner: WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: Xcode encountered an error. Too many instances of this service are already running.)) ** TEST EXECUTE FAILED ** Testing started on 'Jason's iPad'. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.