No signing certificate "iOS Development" found | Protractor | iPad real device - ios

I'm trying to run my protractor script through Mac machine on iPad real device. When I'm running my config.ts file I'm getting the error
No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "sand***#***.com" with a private key was found.
the log file.
ICPL11611:~ sandeepraulo$ cd /Users/sandeepraulo/git/alldata_protractorpoc
ICPL11611:alldata_protractorpoc sandeepraulo$ appium --chromedriver-executable /Users/sandeepraulo/Downloads/chromedriver
[Appium] Welcome to Appium v1.7.2
[Appium] Non-default server args:
[Appium] chromedriverExecutable: /Users/sandeepraulo/Downloads/chromedriver
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"browserName":"","app":"/Users/sandeepraulo/Downloads/MyALLDATAiOS-QA-1.4.8.2544.ipa","deviceName":"iPad","udid":"046e4469d6cb14ff57e378599bd4b1d09390472b","platformName":"iOS","platformVersion":"11.2.6","autoWebview":true,"autoWebviewTimeout":10000,"autoAcceptAlerts":"true","xcodeOrgId":"sandeep.raulo#infostretch.com","xcodeSigningId":"iPhone Developer","bundleId":"com.allDataProtractorPOC","count":1}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":"","app":"/Users/sandeepraulo/Downloads/MyALLDATAiOS-QA-1.4.8.2544.ipa","deviceName":"iPad","udid":"046e4469d6cb14ff57e378599bd4b1d09390472b","platformName":"iOS","platformVersion":"11.2.6","autoWebview":true,"autoWebviewTimeout":10000,"autoAcceptAlerts":"true","xcodeOrgId":"sandeep.raulo#infostretch.com","xcodeSigningId":"iPhone Developer","bundleId":"com.allDataProtractorPOC","count":1},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1524203290697 (11:18:10 GMT+0530 (IST))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.64.0) session
[Appium] Capabilities:
[Appium] browserName:
[Appium] app: /Users/sandeepraulo/Downloads/MyALLDATAiOS-QA-1.4.8.2544.ipa
[Appium] deviceName: iPad
[Appium] udid: 046e4469d6cb14ff57e378599bd4b1d09390472b
[Appium] platformName: iOS
[Appium] platformVersion: 11.2.6
[Appium] autoWebview: true
[Appium] autoWebviewTimeout: 10000
[Appium] autoAcceptAlerts: true
[Appium] xcodeOrgId: sandeep.raulo#infostretch.com
[Appium] xcodeSigningId: iPhone Developer
[Appium] bundleId: com.allDataProtractorPOC
[Appium] count: 1
[BaseDriver] Capability 'autoAcceptAlerts' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by appium: autoWebviewTimeout, count.
[XCUITest] The capabilities 'autoAcceptAlerts' and 'autoDismissAlerts' do not work for XCUITest-based tests. Please adjust your alert handling accordingly.
[BaseDriver] Session created with session id: 1b29951e-c335-499e-876d-f9df97c6270b
[debug] [XCUITest] Current user: 'sandeepraulo'
[debug] [XCUITest] Current version of libimobiledevice: stable 1.2.0 (bottled), HEAD
[debug] [XCUITest] Xcode version set to '9.3' (tools v9.3.0.0.1.1521514116)
[debug] [XCUITest] iOS SDK Version set to '11.3'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1524203321506 (11:18:41 GMT+0530 (IST))
[debug] [XCUITest] Available devices: 046e4469d6cb14ff57e378599bd4b1d09390472b
[debug] [XCUITest] Creating iDevice object with udid '046e4469d6cb14ff57e378599bd4b1d09390472b'
[XCUITest] Determining device to run tests on: udid: '046e4469d6cb14ff57e378599bd4b1d09390472b', real device: true
[BaseDriver] Using local app '/Users/sandeepraulo/Downloads/MyALLDATAiOS-QA-1.4.8.2544.ipa'
[debug] [BaseDriver] Copying local zip to tmp dir
[BaseDriver] Unzipping local app '/var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-1aqd19o.xbs6k/appium-app.zip'...
[debug] [BaseDriver] Unzipping /var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-1aqd19o.xbs6k/appium-app.zip
[debug] [BaseDriver] Testing zip archive: /var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-1aqd19o.xbs6k/appium-app.zip
[BaseDriver] Unzipped local app to '/var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-1aqd19o.xbs6k/Payload/MyALLDATAiOS.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1524203331806 (11:18:51 GMT+0530 (IST))
[debug] [XCUITest] Checking whether app '/var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-1aqd19o.xbs6k/Payload/MyALLDATAiOS.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [BaseDriver] Event 'resetStarted' logged at 1524203331807 (11:18:51 GMT+0530 (IST))
[debug] [XCUITest] Reset: running ios real device reset flow
[debug] [BaseDriver] Event 'resetComplete' logged at 1524203331809 (11:18:51 GMT+0530 (IST))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Starting iOS device log capture with: 'idevicesyslog'
[debug] [XCUITest] Crash reports root '/Users/sandeepraulo/Library/Logs/CrashReporter/MobileDevice/iPad' does not exist. Got nothing to gather.
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1524203332640 (11:18:52 GMT+0530 (IST))
[XCUITest] Setting up real device
[debug] [XCUITest] Installing '/var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-1aqd19o.xbs6k/Payload/MyALLDATAiOS.app' on device with UUID '046e4469d6cb14ff57e378599bd4b1d09390472b'...
[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event 'appInstalled' logged at 1524203341912 (11:19:01 GMT+0530 (IST))
[XCUITest] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] WDA is not listening at 'http://localhost:8100/'
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1524203342196 (11:19:02 GMT+0530 (IST))
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
[debug] [XCUITest] Killing running processes 'xcodebuild.*046e4469d6cb14ff57e378599bd4b1d09390472b, iproxy 8100' for the device 046e4469d6cb14ff57e378599bd4b1d09390472b...
[debug] [XCUITest] 'pgrep -nif xcodebuild.*046e4469d6cb14ff57e378599bd4b1d09390472b' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[debug] [XCUITest] Using Xcode 9.3, so fixing WDA codebase
[debug] [XCUITest] Generating xcode config file for orgId 'sandeep.raulo#infostretch.com' and signingId 'iPhone Developer'
[debug] [XCUITest] Writing xcode config file to /var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-10h7j1e.x2tlh/appium-temp.xcconfig
[debug] [XCUITest] Using Xcode configuration file: '/var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-10h7j1e.x2tlh/appium-temp.xcconfig'
[debug] [XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=046e4469d6cb14ff57e378599bd4b1d09390472b IPHONEOS_DEPLOYMENT_TARGET=11.2 -xcconfig /var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/2018320-693-10h7j1e.x2tlh/appium-temp.xcconfig' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[debug] [XCUITest] Output from xcodebuild will not be logged. To see xcode logging, use 'showXcodeLog' desired capability
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Log file for xcodebuild test: /var/folders/hd/lfrrrq3d0pj4tzpc7c4nb3ww0000gp/T/com.apple.dt.XCTest/IDETestRunSession-FEF68B9B-C2F4-44BB-B11D-74E1E35B31AA/WebDriverAgentRunner-DF45FB1B-AC7D-4154-B485-2BFAFB2E4479/Session-WebDriverAgentRunner-2018-04-20_111920-cW0Kl1.log
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[Xcode] 2018-04-20 11:19:30.291 xcodebuild[920:14416] Error Domain=com.apple.platform.iphoneos Code=-12 "Unable to launch com.apple.test.WebDriverAgentRunner-Runner" UserInfo={NSLocalizedDescription=Unable to launch com.apple.test.WebDriverAgentRunner-Runner}
[Xcode]
[Xcode] 2018-04-20 11:19:30.291 xcodebuild[920:14416] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted, NSUnderlyingError=0x7fd69035d610 {Error Domain=com.apple.platform.iphoneos Code=-12 "Unable to launch com.apple.test.WebDriverAgentRunner-Runner" UserInfo={NSLocalizedDescription=Unable to launch com.apple.test.WebDriverAgentRunner-Runner}}}
[Xcode]
[Xcode]
[Xcode] Testing failed:
[Xcode]
[Xcode] No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "sand***#***.com" with a private key was found.
[Xcode] Early unexpected exit, operation never finished bootstrapping - no restart will be attempted
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[debug] [BaseDriver] Event 'wdaStartFailed' logged at 1524203370374 (11:19:30 GMT+0530 (IST))
[debug] [XCUITest] 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.
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 919)
[debug] [XCUITest] iproxy exited with code 'null'
[debug] [XCUITest] Removing WDA application from device
[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.
at XCUITestDriver.quitAndUninstall$ (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
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.
at XCUITestDriver.quitAndUninstall$ (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
[debug] [XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[debug] [iOSLog] Stopping iOS log capture
[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.
at XCUITestDriver.quitAndUninstall$ (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
[HTTP] <-- POST /wd/hub/session 500 80617 ms - 470

You're "team ID" isn't generally your email address. When you login to your dev account at https://developer.apple.com/ and then click on "Membership" on the left you should see your team ID. Make sure that matches your xCodeOrgId desired capability.

Related

Getting error as xcodebuild failed with code 65 Event 'wdaStartFailed'

Hi getting below error while running appium automation sript for ios device using xcode 14.I tried all th possible solutions but no luck so far.
As per below link there is a changes in xcode 14 which support only appium 2,but before trying appium 2 i wanted to confirm once whether this is the actual root cause or there is any other config issue https://forum.katalon.com/t/failed-to-build-webdriveragent-to-deployed-on-ios-16/78524
Below is the complete appium log
[info] [35m[Appium][39m Appium v1.22.0 creating new XCUITestDriver (v3.53.1) session
[info] [35m[Appium][39m Applying relaxed security to 'XCUITestDriver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[debug] [35m[BaseDriver][39m Creating session with W3C capabilities: {
[debug] [35m[BaseDriver][39m "alwaysMatch": {
[debug] [35m[BaseDriver][39m "platformName": "ios",
[debug] [35m[BaseDriver][39m "appium:VERSION": "15.6.1",
[debug] [35m[BaseDriver][39m "appium:automationName": "XCUITest",
[debug] [35m[BaseDriver][39m "appium:bundleId": "com.mobisy.bizom",
[debug] [35m[BaseDriver][39m "appium:deviceName": "Bizom Iphone",
[debug] [35m[BaseDriver][39m "appium:udid": "00008110-001475EE0C80401E",
[debug] [35m[BaseDriver][39m "appium:xcodeOrgId": "CM3KB1234",
[debug] [35m[BaseDriver][39m "appium:xcodeSigningId": "iPhone Developer"
[debug] [35m[BaseDriver][39m },
[debug] [35m[BaseDriver][39m "firstMatch": [
[debug] [35m[BaseDriver][39m {}
[debug] [35m[BaseDriver][39m ]
[debug] [35m[BaseDriver][39m }
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [35m[iProxy#00008110:8100][39m Connection was refused to port 8100
[info] [35m[WD Proxy][39m socket hang up[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [35m[iProxy#00008110:8100][39m Connection was refused to port 8100
[info] [35m[WD Proxy][39m socket hang up[error] [35m[WebDriverAgent][39m xcodebuild exited with code '65' and signal 'null'
[info] [35m[WebDriverAgent][39m Launching WebDriverAgent on the device
[info] [35m[WebDriverAgent][39m WebDriverAgent does not need a cleanup. The sources are up to date (1644399105000 >= 1632535255000)
[debug] [35m[WebDriverAgent][39m Killing running processes 'xcodebuild.*00008110-001475EE0C80401E' for the device 00008110-001475EE0C80401E...[debug] [35m[WebDriverAgent][39m 'pgrep -if xcodebuild.*00008110-001475EE0C80401E' didn't detect any matching processes. Return code: 1
[debug] [35m[WebDriverAgent][39m Using Xcode configuration file: '/var/folders/nt/rb3yh81n7m543x9rl4996v7c0000gp/T/202303-842-1lzs80g.e5g4/appium-temp.xcconfig'
[debug] [35m[WebDriverAgent][39m Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/divya.p/Library/Developer/Xcode/DerivedData/WebDriverAgent-aghlrsejdreqngftgvcqwnjgrbou -destination id=00008110-001475EE0C80401E IPHONEOS_DEPLOYMENT_TARGET=15.6 -xcconfig /var/folders/nt/rb3yh81n7m543x9rl4996v7c0000gp/T/202303-842-1lzs80g.e5g4/appium-temp.xcconfig GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent'
[debug] [35m[WebDriverAgent][39m Output from xcodebuild will only be logged if any errors are present there. To change this, use 'showXcodeLog' desired capability[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[info] [35m[WD Proxy][39m socket hang up[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [35m[iProxy#00008110:8100][39m Connection was refused to port 8100
[info] [35m[WD Proxy][39m socket hang up
[error] [35m[WebDriverAgent][39m xcodebuild exited with code '65' and signal 'null'
[debug] [35m[BaseDriver][39m Event 'wdaStartFailed' logged at 1672738945363 (15:12:25 GMT+0530 (India Standard Time))
[debug] [35m[XCUITest][39m Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[debug] [35m[XCUITest][39m xcodebuild error message:
[debug] [35m[XCUITest][39m . 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.
[warn] [35m[XCUITest][39m Quitting and uninstalling WebDriverAgent
[info] [35m[WebDriverAgent][39m Shutting down sub-processes[debug] [35m[WebDriverAgent][39m Uninstalling WDAs: 'com.mobisy.bizom.xctrunner'[error] [35m[XCUITest][39m {}
[info] [35m[DevCon Factory][39m Releasing connections for 00008110-001475EE0C80401E device on any port number
[info] [35m[DevCon Factory][39m Found cached connections to release: ["00008110-001475EE0C80401E:8100"]
[info] [35m[DevCon Factory][39m Releasing the listener for '00008110-001475EE0C80401E:8100'
[debug] [35m[iProxy#00008110:8100][39m Closing the connection
[debug] [35m[DevCon Factory][39m Cached connections count: 0
[debug] [35m[XCUITest][39m Not clearing log files. Use `clearSystemFiles` capability to turn on.
[info] [35m[iProxy#00008110:8100][39m The connection has been closed

Getting WebdriverAgent issue on Appium after doing upgrade of iOS from 14.8.1 to 15.1

Getting the below error when started Appium server on MAC.
[XCUITest] Executing command 'getScreenshot' [XCUITest] Taking screenshot with WDA [WD Proxy] Matched '/screenshot' to command name 'getScreenshot' [WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/DCB933A9-4D32-4CA3-8BC3-D2555E436DA8/screenshot] with no body [WD Proxy] Got response with status 500: {"value":{"error":"unable to capture screen","message":"A screen capture was made impossible","traceback":""},"sessionId":"DCB933A9-4D32-4CA3-8BC3-D2555E436DA8"} [W3C] Matched W3C error code 'unable to capture screen' to UnableToCaptureScreen [XCUITest] Error getting screenshot: A screen capture was made impossible [XCUITest] Taking screenshot with WDA [WD Proxy] Matched '/screenshot' to command name 'getScreenshot' [WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/DCB933A9-4D32-4CA3-8BC3-D2555E436DA8/screenshot] with no body [WD Proxy] Got response with status 500: {"value":{"error":"unable to capture screen","message":"A screen capture was made impossible","traceback":""},"sessionId":"DCB933A9-4D32-4CA3-8BC3-D2555E436DA8"} [W3C] Matched W3C error code 'unable to capture screen' to UnableToCaptureScreen [XCUITest] Taking screenshot with WDA [WD Proxy] Matched '/screenshot' to command name 'getScreenshot' [WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/DCB933A9-4D32-4CA3-8BC3-D2555E436DA8/screenshot] with no body [WD Proxy] Got response with status 500: {"value":{"error":"unable to capture screen","message":"A screen capture was made impossible","traceback":""},"sessionId":"DCB933A9-4D32-4CA3-8BC3-D2555E436DA8"} [W3C] Matched W3C error code 'unable to capture screen' to UnableToCaptureScreen [MJSONWP (03f67526)] Encountered internal error running command: UnableToCaptureScreen: A screen capture was made impossible [MJSONWP (03f67526)] at errorFromW3CJsonCode (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:780:25) [MJSONWP (03f67526)] at ProxyRequestError.getActualError (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:663:14) [MJSONWP (03f67526)] at JWProxy.command (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:272:19) [MJSONWP (03f67526)] at runMicrotasks () [MJSONWP (03f67526)] at processTicksAndRejections (internal/process/task_queues.js:85:5) [HTTP] <-- GET /wd/hub/session/03f67526-fd53-4743-96bd-8cbb9a23eafb/screenshot 500 1062 ms - 123 [HTTP]
What is your Appium version? Can you update Appium to the latest version and try again?
I know this problem has been fixed after 1.22 version.

Jenkins Appium job getting terminated while finding xpath

I am facing below issue on jenkins, job getting terminated once appium driver start finding xpath.
Same code is working fine in local script execution in my system.
Appium Logs:
[debug] [W3C (fb32b0a7)] Calling AppiumDriver.getWindowRect() with args: ["fb32b0a7-cca3-48cd-97e1-4e42fb0b9ea8"]
[debug] [WD Proxy] Matched '/window/current/size' to command name 'getWindowSize'
[debug] [WD Proxy] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/c07ca9f1-c603-4ce8-a589-6d44b8935f58/window/current/size] with body: {}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"c07ca9f1-c603-4ce8-a589-6d44b8935f58","value":{"height":2560,"width":1440}}
[debug] [W3C (fb32b0a7)] Responding to client with driver.getWindowRect() result: {"width":1440,"height":2560,"x":0,"y":0}
[HTTP] <-- GET /wd/hub/session/fb32b0a7-cca3-48cd-97e1-4e42fb0b9ea8/window/rect 200 41 ms - 50
[HTTP]
[HTTP] --> POST /wd/hub/session/fb32b0a7-cca3-48cd-97e1-4e42fb0b9ea8/touch/perform
[HTTP] {"actions":[{"action":"press","options":{"x":1008,"y":1792}},{"action":"wait","options":{"ms":2000}},{"action":"moveTo","options":{"x":1,"y":1792}},{"action":"release","options":{}}]}
[debug] [W3C (fb32b0a7)] Calling AppiumDriver.performTouch() with args: [[{"action":"press","options":{"x":1008,"y":1792}},{"action":"wait","options":{"ms":2000}},{"action":"moveTo","options":{"x":1,"y":1792}},{"action":"release","options":{}}],"fb32b0a7-cca3-48cd-97e1-4e42fb0b9ea8"]
[debug] [WD Proxy] Matched '/touch/perform' to command name 'performTouch'
[debug] [WD Proxy] Proxying [POST /touch/perform] to [POST http://127.0.0.1:8200/wd/hub/session/c07ca9f1-c603-4ce8-a589-6d44b8935f58/touch/perform] with body: {"startX":1008,"startY":1792,"endX":1,"endY":1792,"steps":56}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"c07ca9f1-c603-4ce8-a589-6d44b8935f58","value":null}
[debug] [W3C (fb32b0a7)] Responding to client with driver.performTouch() result: null
[HTTP] <-- POST /wd/hub/session/fb32b0a7-cca3-48cd-97e1-4e42fb0b9ea8/touch/perform 200 2940 ms - 14
[HTTP]
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.16.0"}}
[HTTP] <-- GET /wd/hub/status 200 1 ms - 68
[HTTP]
[HTTP] --> POST /wd/hub/session/fb32b0a7-cca3-48cd-97e1-4e42fb0b9ea8/element
[HTTP] {"using":"xpath","value":"//*[contains(#text,'Not Now')]"}
[debug] [W3C (fb32b0a7)] Calling AppiumDriver.findElement() with args: ["xpath","//*[contains(#text,'Not Now')]","fb32b0a7-cca3-48cd-97e1-4e42fb0b9ea8"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:8200/wd/hub/session/c07ca9f1-c603-4ce8-a589-6d44b8935f58/element] with body: {"strategy":"xpath","selector":"//*[contains(#text,'Not Now')]","context":"","multiple":false}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"c07ca9f1-c603-4ce8-a589-6d44b8935f58","value":{"ELEMENT":"d9a20579-ec83-44c3-b25b-303103eea1e0","element-6066-11e4-a52e-4f735466cecf":"d9a20579-ec83-44c3-b25b-303103eea1e0"}}
[debug] [W3C (fb32b0a7)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"d9a20579-ec83-44c3-b25b-303103eea1e0","ELEMENT":"d9a20579-ec83-44c3-b25b-303103eea1e0"}
[HTTP] <-- POST /wd/hub/session/fb32b0a7-cca3-48cd-97e1-4e42fb0b9ea8/element 200 233 ms - 137
[HTTP]
[HTTP] --> DELETE /wd/hub/session/fb32b0a7-cca3-48cd-97e1-4e42fb0b9ea8
[HTTP] {}
[debug] [W3C (fb32b0a7)] Calling AppiumDriver.deleteSession() with args: ["fb32b0a7-cca3-48cd-97e1-4e42fb0b9ea8"]
[debug] [BaseDriver] Event 'quitSessionRequested' logged at 1583220093867 (12:51:33 GMT+0530 (India Standard Time))
[Appium] Removing session fb32b0a7-cca3-48cd-97e1-4e42fb0b9ea8 from our master session list
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched '/' to command name 'deleteSession'
[debug] [WD Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8200/wd/hub/session/c07ca9f1-c603-4ce8-a589-6d44b8935f58] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"c07ca9f1-c603-4ce8-a589-6d44b8935f58","value":null}

Appium: Waiting for elements on iOS doesn't work anymore

I'm automizing tests for Android and iOS. Lately (probably after I've updated to appium 1.9.1 and java-client 6.1.0) I have issues with the iOS tests.
Many tests fail, because WebElements couldn't be found. I'm using WebDriverWait to find elements like in this example:
private WebElement getWebElement(By by, int timeOutInSeconds) {
return (new WebDriverWait(appiumDriver, timeOutInSeconds)).until(ExpectedConditions.presenceOfElementLocated(by));
}
The tests don't wait to find the element anymore. Instead an exception is thrown immediately.
I'm using XCUITest for iOS and uiautomator2 on android. On android the tests are still fine.
Edit (2018-10-29 18:33):
It feels like page factory is reporting the element is there, then randomElement.isDisplayed() will be executed on the element which throws directly an error, because it can't find the element.
And another observation:
In some cases the waiting duration works properly on iOS, but I couldn't find a pattern yet.
Edit (2018-12-14 15:56):
Still no solution found. Note: My tests make screenshots on failure. I can see on a lot of screenshots, the elements that caused the failure. The logs say they couldn't be found, but I can clearly see them on the screen. Makes no sense. Hoping for ideas!
Edit (2019-01-11 15:05):
In the logs, it looks like the element is found (response 200), but when I want to perform a click, it says it's 'not visible on the screen an thus not interactable'.
...
[HTTP] --> POST /wd/hub/session/59e9ace4-55a5-4b07-ad0e-af874dc42a6d/element
[HTTP] {"using":"id","value":"myapp"}
[debug] [W3C] Calling AppiumDriver.findElement() with args: ["id","buttonNext","59e9ace4-55a5-4b07-ad0e-af874dc42a6d"]
[debug] [XCUITest] Executing command 'findElement'
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [JSONWP Proxy] Matched '/element' to command name 'findElement'
[debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/CE691ADA-FC54-48AE-9AA0-1DA6212DB2CC/element] with body: {"using":"id","value":"buttonNext"}
[debug] [JSONWP Proxy] Got response with status 200: {"value":{"ELEMENT":"24010000-0000-0000-0308-000000000000"},"sessionId":"CE691ADA-FC54-48AE-9AA0-1DA6212DB2CC","status":0}
[debug] [W3C] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"24010000-0000-0000-0308-000000000000"}
[HTTP] <-- POST /wd/hub/session/59e9ace4-55a5-4b07-ad0e-af874dc42a6d/element 200 180 ms - 88
[HTTP]
[HTTP] --> POST /wd/hub/session/59e9ace4-55a5-4b07-ad0e-af874dc42a6d/element/24010000-0000-0000-0308-000000000000/click
[HTTP] {"id":"24010000-0000-0000-0308-000000000000"}
[W3C] Driver proxy active, passing request on via HTTP proxy
[debug] [XCUITest] Executing command 'proxyReqRes'
[debug] [JSONWP Proxy] Matched '/wd/hub/session/59e9ace4-55a5-4b07-ad0e-af874dc42a6d/element/24010000-0000-0000-0308-000000000000/click' to command name 'click'
[debug] [JSONWP Proxy] Proxying [POST /wd/hub/session/59e9ace4-55a5-4b07-ad0e-af874dc42a6d/element/24010000-0000-0000-0308-000000000000/click] to [POST http://localhost:8100/session/CE691ADA-FC54-48AE-9AA0-1DA6212DB2CC/element/24010000-0000-0000-0308-000000000000/click] with body: {"id":"24010000-0000-0000-0308-000000000000"}
[debug] [JSONWP Proxy] Got response with status 200: {"value":"Error Domain=com.facebook.WebDriverAgent Code=1 \"The element '\"buttonNext\" Button' is not visible on the screen and thus is not interactable\" UserInfo={NSLocalizedDescription=The element '\"buttonNext\" Button' is not visible on the screen and thus is not interactable}","sessionId":"CE691ADA-FC54-48AE-9AA0-1DA6212DB2CC","status":13}
[debug] [W3C] Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: The request to /wd/hub/session/59e9ace4-55a5-4b07-ad0e-af874dc42a6d/element/24010000-0000-0000-0308-000000000000/click has failed
[debug] [W3C] at JWProxy.proxy$ (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:182:13)
[debug] [W3C] at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[debug] [W3C] at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[debug] [W3C] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[debug] [W3C] at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
[HTTP] <-- POST /wd/hub/session/59e9ace4-55a5-4b07-ad0e-af874dc42a6d/element/24010000-0000-0000-0308-000000000000/click 500 4875 ms - 1779
[HTTP]
[HTTP] --> GET /wd/hub/session/59e9ace4-55a5-4b07-ad0e-af874dc42a6d/screenshot
[HTTP] {}
...

Appium Inspector not connecting to an app

I'm trying to open up an appium inspector session on my local machine but i'm getting this error:
Appium] Welcome to Appium v1.7.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 8 ms - 40
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 13 ms - 40
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 13 ms - 40
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/haroonnaderi/Desktop/WebView.ipa","deviceName":"iPhone Simulator","noReset":true,"platformName":"iOS","platformVersion":"11.2","showXcodeLog":true,"useNewWDA":true,"newCommandTimeout":0,"connectHardwareKeyboard":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/haroonnaderi/Desktop/WebView.ipa","deviceName":"iPhone Simulator","noReset":true,"platformName":"iOS","platformVersion":"11.2","showXcodeLog":true,"useNewWDA":true,"newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[BaseDriver] Event 'newSessionRequested' logged at 1514939642784 (16:34:02 GMT-0800 (PST))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.51.1) session
[Appium] Capabilities:
[Appium] app: '/Users/haroonnaderi/Desktop/WebView.ipa'
[Appium] deviceName: 'iPhone Simulator'
[Appium] noReset: true
[Appium] platformName: 'iOS'
[Appium] platformVersion: '11.2'
[Appium] showXcodeLog: true
[Appium] useNewWDA: true
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[BaseDriver] Session created with session id: 112da0db-de59-4ec6-9274-0d0141943b92
[XCUITest] Xcode version set to '9.2' (tools v9.2.0.0.1.1510905681)
[XCUITest] iOS SDK Version set to '11.2'
[BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1514939642987 (16:34:02 GMT-0800 (PST))
[XCUITest] Changing deviceName from 'iPhone Simulator' to 'iPhone 6'
[iOSSim] Constructing iOS simulator for Xcode version 9.2 with udid '4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218'
[XCUITest] Determining device to run tests on: udid: '4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218', real device: false
[BaseDriver] Using local app '/Users/haroonnaderi/Desktop/WebView.ipa'
[BaseDriver] Copying local zip to tmp dir
[BaseDriver] Unzipping /var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/201802-15290-1peg17v.s8kccba9k9/appium-app.zip
[BaseDriver] Testing zip archive: /var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/201802-15290-1peg17v.s8kccba9k9/appium-app.zip
[BaseDriver] Unzipped local app to '/var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/201802-15290-1peg17v.s8kccba9k9/Payload/WebView Test.app'
[BaseDriver] Event 'appConfigured' logged at 1514939643653 (16:34:03 GMT-0800 (PST))
[XCUITest] Checking whether app '/var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/201802-15290-1peg17v.s8kccba9k9/Payload/WebView Test.app' is actually present on file system
[XCUITest] App is present
[iOS] Getting bundle ID from app '/var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/201802-15290-1peg17v.s8kccba9k9/Payload/WebView Test.app': 'com.hnbs.WebView-Test'
[BaseDriver] Event 'resetStarted' logged at 1514939643676 (16:34:03 GMT-0800 (PST))
[XCUITest] Reset: noReset is on. Leaving simulator as is
[BaseDriver] Event 'resetComplete' logged at 1514939643677 (16:34:03 GMT-0800 (PST))
[iOSLog] Starting iOS 11.2 simulator log capture
[iOSLog] System log path: /Users/haroonnaderi/Library/Logs/CoreSimulator/4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218/system.log
[BaseDriver] Event 'logCaptureStarted' logged at 1514939643817 (16:34:03 GMT-0800 (PST))
[XCUITest] Setting up simulator
[iOS] No reason to set locale
[iOS] No iOS / app preferences to set
[iOSSim] Setting common Simulator preferences to {"ConnectHardwareKeyboard":true}
[iOSSim] Updated shared Simulator preferences at '/Users/haroonnaderi/Library/Preferences/com.apple.iphonesimulator.plist' with {"ConnectHardwareKeyboard":true}
[iOSSim] The count of running Simulator UI client instances is 0
[iOSSim] Booting Simulator with UDID 4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218...
[iOSSim] Starting Simulator UI with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID 4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218 -ConnectHardwareKeyboard 1
[iOSSim] The count of running Simulator UI client instances is 1
[iOSSim] Simulator with UDID 4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218 booted in 24 seconds
[BaseDriver] Event 'simStarted' logged at 1514939668953 (16:34:28 GMT-0800 (PST))
[XCUITest] App 'com.hnbs.WebView-Test' is already installed. No need to reinstall.
[BaseDriver] Event 'appInstalled' logged at 1514939669788 (16:34:29 GMT-0800 (PST))
[XCUITest] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] Capability 'useNewWDA' set to true, so uninstalling WDA before proceeding
[XCUITest] Shutting down sub-processes
[XCUITest] Removing WDA application from device
[BaseDriver] Event 'wdaUninstalled' logged at 1514939672408 (16:34:32 GMT-0800 (PST))
[BaseDriver] Event 'wdaStartAttempted' logged at 1514939672412 (16:34:32 GMT-0800 (PST))
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: '/usr/local/bin/carthage'
[XCUITest] Killing running processes 'xcodebuild.*4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218, iproxy 8100, 4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218.*XCTRunner' for the device 4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218...
[XCUITest] 'pgrep -nif xcodebuild.*4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218' didn't detect any matching processes. Return code: 1
[XCUITest] 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
[XCUITest] 'pgrep -nif 4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218.*XCTRunner' didn't detect any matching processes. Return code: 1
[XCUITest] Using Xcode 9.2, so fixing WDA codebase
[XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218 IPHONEOS_DEPLOYMENT_TARGET=11.2' in directory '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Output from xcodebuild will be logged. To see xcode logging, use 'showXcodeLog' desired capability
[Xcode] Build settings from command line:
[Xcode]
[XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[Xcode] IPHONEOS_DEPLOYMENT_TARGET = 11.2
[Xcode]
[Xcode]
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[Xcode] === BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
[Xcode]
[Xcode]
[Xcode]
[Xcode]
[Xcode] Check dependencies
[Xcode]
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[Xcode]
[Xcode]
[Xcode] === BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
[Xcode]
[Xcode]
[Xcode] Check dependencies
[Xcode]
[Xcode]
[Xcode]
[Xcode] ** TEST BUILD SUCCEEDED **
[Xcode]
[Xcode]
[XCUITest] Log file for xcodebuild test: /var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-C4E50138-7963-4E50-9E87-5E0235A18F86/WebDriverAgentRunner-6A750461-303B-48FA-9A69-691803753120/Session-WebDriverAgentRunner-2018-01-02_163441-TDxxwq.log
[Xcode] 2018-01-02 16:34:41.626 xcodebuild[15977:644204] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[Xcode] /var/folders/0s/hqdpyw0j08d_blg1fx2fygsr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-C4E50138-7963-4E50-9E87-5E0235A18F86/WebDriverAgentRunner-6A750461-303B-48FA-9A69-691803753120/Session-WebDriverAgentRunner-2018-01-02_163441-TDxxwq.log
[Xcode]
[Xcode] 2018-01-02 16:34:41.628 xcodebuild[15977:644045] [MT] IDETestOperationsObserverDebug: (EE11AE25-8D70-4187-B122-33281CA5D5D7) Beginning test session WebDriverAgentRunner-EE11AE25-8D70-4187-B122-33281CA5D5D7 at 2018-01-02 16:34:41.627 with Xcode 9C40b on target {
[Xcode] SimDevice: iPhone 6 (4CD1A28A-9305-4E4A-AC48-5B5F5CAC1218, iOS 11.2, Booted)
[Xcode] } (11.2 (15C107))
[Xcode]
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Got response with status 200: "{\n \"value\" : {\n \"state\" : \"success\",\n \"os\" : {\n \"name\" : \"iOS\",\n \"version\" : \"11.2\"\n },\n \"ios\" : {\n \"simulatorVersion\" : \"11.2\",\n \"ip\" : \"10.33.110.179\"\n },\n \"build\" : {\n \"time\" : \"Jan 2 2018 14:11:22\"\n }\n },\n \"sessionId\" : \"F8D9C4DB-FD04-490E-921F-7C777B905551\",\n \"status\" : 0\n}"
[XCUITest] WebDriverAgent running on ip '10.33.110.179'
[XCUITest] WebDriverAgent successfully started after 17999ms
[BaseDriver] Event 'wdaSessionAttempted' logged at 1514939690641 (16:34:50 GMT-0800 (PST))
[XCUITest] Sending createSession command to WDA
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.hnbs.WebView-Test","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
[JSONWP Proxy] Got response with status 200: {"value":"Failed to launch com.hnbs.WebView-Test application","sessionId":"F8D9C4DB-FD04-490E-921F-7C777B905551","status":13}
[XCUITest] Failed to create WDA session. Retrying...
I've been stuck on this for a while and there doesn't seem to be any good documentation on this, I would appreciate any help I can get. I deleted a few repeated lines in the log so that I would be able to post this. The lines that I deleted were just repeats of: [JSONWP Proxy] Got response with status 200: {"value":"Failed to launch com.hnbs.WebView-Test application","sessionId":"F8D9C4DB-FD04-490E-921F-7C777B905551","status":13}
[XCUITest] Failed to create WDA session. Retrying...
Are you using Appium Desktop (https://github.com/appium/appium-desktop/releases) or command line appium? I ran into a problem with the WebDriverAgent not getting installed on the simulator with the command line version of appium (/usr/local/bin/appium). I tried via npm install -g appium and npm install -g appium#1.7.1 and both failed to work. If I run appium server from the Appium Desktop, the WebDriverAgent installed fine and launched. I ended up working around this problem by starting appium from the /Applications directory.
In my script I have this:
DIR=`pwd`
LOG=$DIR/reports/appium_server_output.txt
APPIUM_LOG=$DIR/reports/appium_output.txt
APPIUM_APP_MODULES=/Applications/Appium.app/Contents/Resources/app/node_modules
export NODE_PATH=$APPIUM_APP_MODULES:$NODE_PATH
$APPIUM_APP_MODULES/appium/build/lib/main.js --address 127.0.0.1 --port 4723 --default-capabilities '{"platformName": "iOS"}' --session-override --log $LOG > $APPIUM_LOG 2>&1 &
Before I was just launching 'appium'.
try not to use bundleID if you are running test on simulator. This should work without bundleID

Resources