测试环境:iOS 11,OSX 10.12,Appium Desktop 1.2.5,Xcode 8.1
所需的能力:
{
"platformName": "iOS",
"deviceName": "iPhone 7",
"udid": "93551a7d721b790b0188642402f1ada96892b816",
"app": "/Users/globalit/Desktop/IntegrationApp.app",
"automationName": "XCUITest"
}
我可以使用xcode在设备中启动集成应用。 还成功在我的设备中部署了Web驱动程序代理。
但是当我尝试通过appium桌面启动我的ios应用程序时,我遇到了以下错误。
错误:
处理命令时发生未知的服务器端错误。原始错误:由于xcodebuild失败,无法启动WebDriverAgent会话:"无法将命令代理到远程服务器。原始错误:错误:套接字挂断"。请务必按照https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md上的教程进行操作。尝试从设备中删除WebDriverAgentRunner应用程序(如果已安装)并重新启动设备。
Appium Logs:
XCUITest] Failed to create WDA session. Retrying...
[BaseDriver] Event 'wdaSessionAttempted' logged at 1509096179356 (14:52:59 GMT+0530 (IST))
[XCUITest] Sending createSession command to WDA
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[XCUITest] Failed to create WDA session. Retrying...
[XCUITest] Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: socket hang up". 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.
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 576)
[XCUITest] iproxy exited with code 'null'
[XCUITest] Shutting down xcodebuild process (pid 577)
[XCUITest] xcodebuild exited with code 'null' and signal 'SIGTERM'
[XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: socket hang up". 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.
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: socket hang up". 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.
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: socket hang up". 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.
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 118446 ms - 526