{"action":"created","issue":{"url":"https://api.github.com/repos/appium/appium/issues/8839","repository_url":"https://api.github.com/repos/appium/appium","labels_url":"https://api.github.com/repos/appium/appium/issues/8839/labels{/name}","comments_url":"https://api.github.com/repos/appium/appium/issues/8839/comments","events_url":"https://api.github.com/repos/appium/appium/issues/8839/events","html_url":"https://github.com/appium/appium/issues/8839","id":242529505,"number":8839,"title":"Failed to launch webdriver agent for after every alternate builds","user":{"login":"AnuvrathElastica","id":12801898,"avatar_url":"https://avatars6.githubusercontent.com/u/12801898?v=4","gravatar_id":"","url":"https://api.github.com/users/AnuvrathElastica","html_url":"https://github.com/AnuvrathElastica","followers_url":"https://api.github.com/users/AnuvrathElastica/followers","following_url":"https://api.github.com/users/AnuvrathElastica/following{/other_user}","gists_url":"https://api.github.com/users/AnuvrathElastica/gists{/gist_id}","starred_url":"https://api.github.com/users/AnuvrathElastica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnuvrathElastica/subscriptions","organizations_url":"https://api.github.com/users/AnuvrathElastica/orgs","repos_url":"https://api.github.com/users/AnuvrathElastica/repos","events_url":"https://api.github.com/users/AnuvrathElastica/events{/privacy}","received_events_url":"https://api.github.com/users/AnuvrathElastica/received_events","type":"User","site_admin":false},"labels":[{"id":219921934,"url":"https://api.github.com/repos/appium/appium/labels/ThirdpartyIssue","name":"ThirdpartyIssue","color":"bfe5bf","default":false},{"id":427212191,"url":"https://api.github.com/repos/appium/appium/labels/XCUITest","name":"XCUITest","color":"c5def5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-07-12T22:04:20Z","updated_at":"2017-07-15T00:34:24Z","closed_at":"2017-07-14T11:25:14Z","body":"## The problem\r\n\r\nI am running iOS XC test on a real device which is connected to MacPro. these builds are triggered Jenkins running on same machine. Issue am seeing the following issue, \r\n\r\nSay build 1 on a iOS device runs smoothly, build 2 of same job/any other job on same iOS device fails with this error.\r\n\r\n14:30:18 [XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: \"xcodebuild failed with code 65\". 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.\r\n14:30:18     at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:422:13)\r\n14:30:18     at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)\r\n14:30:18     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)\r\n14:30:18     at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)\r\n14:30:18     at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)\r\n14:30:18  Error: Unable to launch WebDriverAgent because of xcodebuild failure: \"xcodebuild failed with code 65\". 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.\r\n14:30:18     at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:422:13)\r\n14:30:18     at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)\r\n14:30:18     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)\r\n14:30:18     at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)\r\n14:30:18     at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)\r\n14:30:18 [MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: \"xcodebuild failed with code 65\". 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.\r\n14:30:18     at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:422:13)\r\n14:30:18     at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)\r\n14:30:18     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)\r\n14:30:18     at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)\r\n14:30:18     at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)\r\n14:30:18 2017-07-12 14:30:18 [ERROR] Failed to start remove web driver for ios!!!... So stopping test execution\r\n14:30:18 org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: \"xcodebuild failed with code 65\". 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. (WARNING: The server did not provide any stacktrace information)\r\n14:30:18 Command duration or timeout: 57.54 seconds\r\n14:30:18 Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'\r\n\r\n## Environment\r\n\r\n* Appium version (or git revision) that exhibits the issue: 1.6.6-beta.2\r\n* Last Appium version that did not exhibit the issue (if applicable): 1.6.4\r\n* Desktop OS/version used to run Appium: MacOSX\r\n* Node.js version (unless using Appium.app|exe):\r\n* Mobile platform/version under test: iOS\r\n* Real device or emulator/simulator:Real Device\r\n* Appium CLI or Appium.app|exe:\r\n\r\n\r\nCapabilities used are: \r\npublic DesiredCapabilities getIOSCapabilities(SuiteDTO suiteData){\r\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\r\n\t\tcapabilities.merge(addDefaultCapabilities(suiteData));\r\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, suiteData.getDeviceName());\r\n\t\tcapabilities.setCapability(MobileCapabilityType.UDID, suiteData.getDeviceUDID());\r\n\t\tcapabilities.setCapability(\"locationServicesEnabled\", true);\r\n\t\tcapabilities.setCapability(\"locationServicesAuthorized\", true);\r\n\t\tcapabilities.setCapability(\"autoWebview\",false);\r\n\t\tcapabilities.setCapability(\"noReset\", true);\r\n\t\tcapabilities.setCapability(\"wdaLaunchTimeout\", 300000);\t\t\r\n\t\tcapabilities.setCapability(\"showXcodeLog\", false);\r\n\t\tcapabilities.setCapability(\"clearSystemFiles\", true);\r\n\t\tcapabilities.setCapability(MobileCapabilityType.APP, suiteData.getApp());\t\t\r\n\t\tcapabilities.setCapability(\"realDeviceLogger\", \"/usr/local/lib/node_modules/deviceconsole/deviceconsole\");\t\t\r\n\t\tcapabilities.setCapability(\"wdaLocalPort\", 8100);\r\n\t\tcapabilities.setCapability(\"usePrebuiltWDA\", true);\r\n\t\tcapabilities.setCapability(\"startIWDP\", true);\r\n\t\tcapabilities.setCapability(\"shouldUseSingletonTestManager\", false);\r\n\r\n\t\treturn capabilities;"},"comment":{"url":"https://api.github.com/repos/appium/appium/issues/comments/315496641","html_url":"https://github.com/appium/appium/issues/8839#issuecomment-315496641","issue_url":"https://api.github.com/repos/appium/appium/issues/8839","id":315496641,"user":{"login":"AnuvrathElastica","id":12801898,"avatar_url":"https://avatars6.githubusercontent.com/u/12801898?v=4","gravatar_id":"","url":"https://api.github.com/users/AnuvrathElastica","html_url":"https://github.com/AnuvrathElastica","followers_url":"https://api.github.com/users/AnuvrathElastica/followers","following_url":"https://api.github.com/users/AnuvrathElastica/following{/other_user}","gists_url":"https://api.github.com/users/AnuvrathElastica/gists{/gist_id}","starred_url":"https://api.github.com/users/AnuvrathElastica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnuvrathElastica/subscriptions","organizations_url":"https://api.github.com/users/AnuvrathElastica/orgs","repos_url":"https://api.github.com/users/AnuvrathElastica/repos","events_url":"https://api.github.com/users/AnuvrathElastica/events{/privacy}","received_events_url":"https://api.github.com/users/AnuvrathElastica/received_events","type":"User","site_admin":false},"created_at":"2017-07-15T00:34:24Z","updated_at":"2017-07-15T00:34:24Z","body":"[log.txt](https://github.com/appium/appium/files/1149928/log.txt)\r\nForgot to attach in previous message"}}
{"actor":{"display_login":"AnuvrathElastica"}}