XCodebuild failed with code 70

Hi,

I am getting an error when I launch a test on real device.
My error is xcodebuild failed with code 70.

ENVIRONMENT

Appium: 1.6.4
XCode: 8.3.2
iPad with iOS 10.3.1
MacOS: 10.12.2

I have two mac mini and the test on one goes, while on the other no.
The environment of two mac min is identical and has been executed the same installation procedure.

LOGS

2017-05-03 08:50:53:054 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:53:565 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:54:071 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:54:580 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:55:087 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:55:594 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:56:104 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:56:615 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:57:120 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:57:628 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:58:136 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:58:644 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:59:151 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:50:59:661 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:51:00:169 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:51:00:678 - info: [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/status] with no body
2017-05-03 08:51:00:855 - info: [Xcode] xcodebuild: error: Unable to find a destination matching the provided destination specifier:
2017-05-03 08:51:00:855 - info: [Xcode] { id:80abf2957815622bba9a1f36cab1d311c2b6a977 }
2017-05-03 08:51:00:855 - info: [Xcode]
2017-05-03 08:51:00:855 - info: [Xcode] Unsupported device specifier option.
2017-05-03 08:51:00:855 - info: [Xcode] The device “My Mac” does not support the following options: id
2017-05-03 08:51:00:855 - info: [Xcode] Please supply only supported device specifier options.
2017-05-03 08:51:00:855 - info: [Xcode]
2017-05-03 08:51:00:855 - info: [Xcode] Available destinations for the “WebDriverAgentRunner” scheme:
2017-05-03 08:51:00:855 - info: [Xcode] { platform:iOS Simulator, id:7C707853-6A28-4B4C-9C50-D583B419D796, OS:10.3, name:iPhone 5 }
2017-05-03 08:51:00:855 - info: [Xcode] { platform:iOS Simulator, id:3918D6EC-8684-4B53-9D8B-58463E53E008, OS:10.3, name:iPhone 5s }
2017-05-03 08:51:00:855 - info: [Xcode] { platform:iOS Simulator, id:62D6A7ED-96B9-44E2-8C81-292E0C1AAA53, OS:10.3, name:iPhone 6 }
2017-05-03 08:51:00:856 - info: [Xcode] { platform:iOS Simulator, id:60B61A7A-38BD-4AB2-95F3-9C9AC80A8C5C, OS:10.3, name:iPhone 6s }
2017-05-03 08:51:00:856 - info: [Xcode] { platform:iOS Simulator, id:44118E3E-4D55-4CC0-91B0-3576705F11C0, OS:10.3, name:iPhone 7 }
2017-05-03 08:51:00:856 - info: [Xcode] { platform:iOS Simulator, id:B062164C-0291-4E46-93A1-7A33AC33033E, OS:10.3, name:iPhone 7 Plus }
2017-05-03 08:51:00:856 - info: [Xcode] { platform:iOS Simulator, id:C0019DAA-C69B-4AFE-BFB5-E885E3E73011, OS:10.3, name:iPhone SE }
2017-05-03 08:51:00:856 - info: [Xcode]
2017-05-03 08:51:00:856 - info: [Xcode] Ineligible destinations for the “WebDriverAgentRunner” scheme:
2017-05-03 08:51:00:856 - info: [Xcode] { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
2017-05-03 08:51:00:856 - info: [Xcode] { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
2017-05-03 08:51:00:856 - info: [Xcode]
2017-05-03 08:51:00:874 - info: [XCUITest] xcodebuild exited with code ‘70’ and signal ‘null’
2017-05-03 08:51:00:875 - info: [debug] [BaseDriver] Event ‘wdaStartFailed’ logged at 1493801460875 (10:51:00 GMT+0200 (CEST))
2017-05-03 08:51:00:875 - info: [debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 70
2017-05-03 08:51:00:876 - info: [debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
2017-05-03 08:51:00:876 - info: [XCUITest] Shutting down sub-processes
2017-05-03 08:51:00:876 - info: [XCUITest] Shutting down iproxy process (pid 1259)
2017-05-03 08:51:00:877 - info: [debug] [XCUITest] iproxy exited with code ‘null’
2017-05-03 08:51:00:878 - info: [debug] [XCUITest] Removing WDA application from device
2017-05-03 08:51:01:188 - info: [debug] [XCUITest] Unable to connect to running WebDriverAgent: Could not proxy command to remote server. Original error: Error: socket hang up
2017-05-03 08:51:01:189 - warn: [XCUITest] Getting status of WebDriverAgent on device timed out. Continuing
2017-05-03 08:51:11:293 - error: [XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 70
at XCUITestDriver.quitAndUninstall$ (…/…/lib/driver.js:374:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 70
at XCUITestDriver.quitAndUninstall$ (…/…/lib/driver.js:374:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:136:37)
2017-05-03 08:51:11:294 - info: [debug] [XCUITest] No WebDriverAgent derived data available, so unable to clear system files
2017-05-03 08:51:11:294 - info: [debug] [iOSLog] Stopping iOS log capture
2017-05-03 08:51:11:295 - error: [MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 70
at XCUITestDriver.quitAndUninstall$ (…/…/lib/driver.js:374:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:136:37)
2017-05-03 08:51:11:297 - info: [HTTP] <-- POST /wd/hub/session 500 154602 ms - 230
2017-05-03 08:51:11:303 - info: [HTTP] --> POST /wd/hub/session {“capabilities”:[{“desiredCapabilities”:{“noReset”:false,“clearSystemFiles”:true,“bundleId”:“com.google.ios.youtube,”,“xcodeConfigFile”:"/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettings.xcconfig",“deviceName”:“iPad di Media”,“launchTimeout”:500000,“wdaLocalPort”:8200,“showXcodeLog”:true,“realDeviceLogger”:"/usr/local/lib/node_modules/deviceconsole/deviceconsole",“newCommandTimeout”:3600,“automationName”:“XCUITest”,“useNewWDA”:true,“takesScreenshot”:“true”,“platformName”:“iOS”,“udid”:“80abf2957815622bba9a1f36cab1d311c2b6a977”}},{“requiredCapabilities”:{}}]}
2017-05-03 08:51:11:304 - info: [debug] [MJSONWP] Bad parameters: BadParametersError: Parameters were incorrect. We wanted {“required”:[“desiredCapabilities”],“optional”:[“requiredCapabilities”,“capabilities”,“sessionId”,“id”]} and you sent [“capabilities”]
2017-05-03 08:51:11:305 - info: [HTTP] <-- POST /wd/hub/session 400 2 ms - 171

Can you check appium github issues, I remember seeing many posts with solutions for this kind of error.

Regards,
Vikram