When attempting to run our code on iPhone, the app is installed but Fails to launch.
This is the error in the log:
Unable to launch WebDriverAgent because of xcodebuild failure: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
This is the capabilities we use:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,genMeth.getValueFromPropFile("deviceName"));
capabilities.setCapability(MobileCapabilityType.UDID, genMeth.getValueFromPropFile("udid"));
capabilities.setCapability("app",genMeth.getValueFromPropFile("appPath"));
capabilities.setCapability("automationName", "XCUITest");
capabilities.setCapability("xcodeOrgId", "7Y5J2RJXYV");
capabilities.setCapability("xcodeSigningId", "iPhone Developer");
capabilities.setCapability("useNewWDA", "true");
capabilities.setCapability("wdaLaunchTimeout", 10000);
capabilities.setCapability("updatedWDABundleId", genMeth.getValueFromPropFile("appIdentifier"));
capabilities.setCapability("wdaConnectionTimeout", 10000);
try {
driver = new IOSDriver<MobileElement>(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
ENV:
MacOS Sierra 10.12.2
iPhone --> . 10.2.1
Appium--> 1.6.4 Beta
This is the full Log:
Last login: Wed Feb 1 23:10:42 on ttys000
Menys-MacBook-Pro:~ menypeled$ appium -g
usage: appium [-h] [-v] [--shell] [--reboot] [--ipa IPA] [-a ADDRESS]
[-p PORT] [-ca CALLBACKADDRESS] [-cp CALLBACKPORT]
[-bp BOOTSTRAPPORT] [-r BACKENDRETRIES] [--session-override]
[-l] [-g LOG]
[--log-level {info,info:debug,info:info,info:warn,info:error,warn,warn:debug,warn:info,warn:warn,warn:error,error,error:debug,error:info,error:warn,error:error,debug,debug:debug,debug:info,debug:warn,debug:error}]
[--log-timestamp] [--local-timezone] [--log-no-colors]
[-G WEBHOOK] [--safari] [--default-device] [--force-iphone]
[--force-ipad] [--tracetemplate AUTOMATIONTRACETEMPLATEPATH]
[--instruments INSTRUMENTSPATH] [--nodeconfig NODECONFIG]
[-ra ROBOTADDRESS] [-rp ROBOTPORT]
[--selendroid-port SELENDROIDPORT]
[--chromedriver-port CHROMEDRIVERPORT]
[--chromedriver-executable CHROMEDRIVEREXECUTABLE]
[--show-config] [--no-perms-check] [--strict-caps]
[--isolate-sim-device] [--tmp TMPDIR] [--trace-dir TRACEDIR]
[--debug-log-spacing] [--suppress-adb-kill-server]
[--async-trace] [--webkit-debug-proxy-port WEBKITDEBUGPROXYPORT]
[--webdriveragent-port WDALOCALPORT] [-dc DEFAULTCAPABILITIES]
[--command-timeout DEFAULTCOMMANDTIMEOUT] [-k]
[--platform-name PLATFORMNAME]
[--platform-version PLATFORMVERSION]
[--automation-name AUTOMATIONNAME] [--device-name DEVICENAME]
[--browser-name BROWSERNAME] [--app APP] [-lt LAUNCHTIMEOUT]
[--language LANGUAGE] [--locale LOCALE] [-U UDID]
[--orientation ORIENTATION] [--no-reset] [--full-reset]
[--app-pkg APPPACKAGE] [--app-activity APPACTIVITY]
[--app-wait-package APPWAITPACKAGE]
[--app-wait-activity APPWAITACTIVITY]
[--device-ready-timeout DEVICEREADYTIMEOUT]
[--android-coverage ANDROIDCOVERAGE] [--avd AVD]
[--avd-args AVDARGS] [--use-keystore]
[--keystore-path KEYSTOREPATH]
[--keystore-password KEYSTOREPASSWORD] [--key-alias KEYALIAS]
[--key-password KEYPASSWORD] [--intent-action INTENTACTION]
[--intent-category INTENTCATEGORY] [--intent-flags INTENTFLAGS]
[--intent-args OPTIONALINTENTARGUMENTS]
[--dont-stop-app-on-reset] [--calendar-format CALENDARFORMAT]
[--native-instruments-lib] [--keep-keychains]
[--localizable-strings-dir LOCALIZABLESTRINGSDIR]
[--show-ios-log]
appium: error: argument "-g/--log": Expected one argument. null
Menys-MacBook-Pro:~ menypeled$ npm install wd
wd@1.1.3 install /Users/menypeled/node_modules/wd
node scripts/build-browser-scripts
/Users/menypeled
βββ¬ wd@1.1.3
βββ¬ archiver@1.3.0
β βββ¬ archiver-utils@1.3.0
β β βββ graceful-fs@4.1.11
β β βββ lazystream@1.0.0
β β βββ normalize-path@2.0.1
β βββ buffer-crc32@0.2.13
β βββ¬ glob@7.1.1
β β βββ fs.realpath@1.0.0
β β βββ¬ inflight@1.0.6
β β β βββ wrappy@1.0.2
β β βββ inherits@2.0.3
β β βββ¬ minimatch@3.0.3
β β β βββ¬ brace-expansion@1.1.6
β β β βββ balanced-match@0.4.2
β β β βββ concat-map@0.0.1
β β βββ once@1.4.0
β β βββ path-is-absolute@1.0.1
β βββ¬ readable-stream@2.2.2
β β βββ buffer-shims@1.0.0
β β βββ core-util-is@1.0.2
β β βββ isarray@1.0.0
β β βββ process-nextick-args@1.0.7
β β βββ string_decoder@0.10.31
β βββ¬ tar-stream@1.5.2
β β βββ bl@1.2.0
β β βββ¬ end-of-stream@1.1.0
β β β βββ once@1.3.3
β β βββ xtend@4.0.1
β βββ walkdir@0.0.11
β βββ¬ zip-stream@1.1.1
β βββ¬ compress-commons@1.1.0
β βββ¬ crc32-stream@1.0.1
β βββ crc@3.4.4
βββ async@2.0.1
βββ lodash@4.16.2
βββ¬ mkdirp@0.5.1
β βββ minimist@0.0.8
βββ q@1.4.1
βββ¬ request@2.79.0
β βββ aws-sign2@0.6.0
β βββ aws4@1.5.0
β βββ caseless@0.11.0
β βββ¬ combined-stream@1.0.5
β β βββ delayed-stream@1.0.0
β βββ extend@3.0.0
β βββ forever-agent@0.6.1
β βββ¬ form-data@2.1.2
β β βββ asynckit@0.4.0
β βββ¬ har-validator@2.0.6
β β βββ¬ chalk@1.1.3
β β β βββ ansi-styles@2.2.1
β β β βββ escape-string-regexp@1.0.5
β β β βββ¬ has-ansi@2.0.0
β β β β βββ ansi-regex@2.1.1
β β β βββ strip-ansi@3.0.1
β β β βββ supports-color@2.0.0
β β βββ¬ commander@2.9.0
β β β βββ graceful-readlink@1.0.1
β β βββ¬ is-my-json-valid@2.15.0
β β β βββ generate-function@2.0.0
β β β βββ¬ generate-object-property@1.2.0
β β β β βββ is-property@1.0.2
β β β βββ jsonpointer@4.0.1
β β βββ¬ pinkie-promise@2.0.1
β β βββ pinkie@2.0.4
β βββ¬ hawk@3.1.3
β β βββ boom@2.10.1
β β βββ cryptiles@2.0.5
β β βββ hoek@2.16.3
β β βββ sntp@1.0.9
β βββ¬ http-signature@1.1.1
β β βββ assert-plus@0.2.0
β β βββ¬ jsprim@1.3.1
β β β βββ extsprintf@1.0.2
β β β βββ json-schema@0.2.3
β β β βββ verror@1.3.6
β β βββ¬ sshpk@1.10.2
β β βββ asn1@0.2.3
β β βββ assert-plus@1.0.0
β β βββ bcrypt-pbkdf@1.0.1
β β βββ¬ dashdash@1.14.1
β β β βββ assert-plus@1.0.0
β β βββ ecc-jsbn@0.1.1
β β βββ¬ getpass@0.1.6
β β β βββ assert-plus@1.0.0
β β βββ jodid25519@1.0.2
β β βββ jsbn@0.1.0
β β βββ tweetnacl@0.14.5
β βββ is-typedarray@1.0.0
β βββ isstream@0.1.2
β βββ json-stringify-safe@5.0.1
β βββ¬ mime-types@2.1.14
β β βββ mime-db@1.26.0
β βββ oauth-sign@0.8.2
β βββ qs@6.3.0
β βββ stringstream@0.0.5
β βββ¬ tough-cookie@2.3.2
β β βββ punycode@1.4.1
β βββ tunnel-agent@0.4.3
β βββ uuid@3.0.1
βββ¬ underscore.string@3.3.4
β βββ sprintf-js@1.0.3
β βββ util-deprecate@1.0.2
βββ vargs@0.1.0
npm WARN enoent ENOENT: no such file or directory, open '/Users/menypeled/package.json'
npm WARN menypeled No description
npm WARN menypeled No repository field.
npm WARN menypeled No README data
npm WARN menypeled No license field.
Menys-MacBook-Pro:~ menypeled$ npm install wd
wd@1.1.3 install /Users/menypeled/node_modules/wd
node scripts/build-browser-scripts
/Users/menypeled
βββ wd@1.1.3
npm WARN enoent ENOENT: no such file or directory, open '/Users/menypeled/package.json'
npm WARN menypeled No description
npm WARN menypeled No repository field.
npm WARN menypeled No README data
npm WARN menypeled No license field.
Menys-MacBook-Pro:~ menypeled$ appium &
[1] 3179
Menys-MacBook-Pro:~ menypeled$ [Appium] Welcome to Appium v1.6.4-beta
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
Menys-MacBook-Pro:~ menypeled$ clear
Menys-MacBook-Pro:~ menypeled$ [HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/menypeled/Documents/workspace/iOS_Appium/SkyGiraffe.app","wdaLaunchTimeout":10000,"xcodeOrgId":"7Y5J2RJXYV","automationName":"XCUITest","useNewWDA":"true","udid":"51d8c712258a5b0ac63516aa5be9d10014b0c270","platformName":"iOS","deviceName":"SG iPhone 5s","updatedWDABundleId":"beta.SkyGiraffe.SkyGiraffe","wdaConnectionTimeout":10000,"xcodeSigningId":"iPhone Developer"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/menypeled/Documents/workspace/iOS_Appium/SkyGiraffe.app","wdaLaunchTimeout":10000,"xcodeOrgId":"7Y5J2RJXYV","automationName":"XCUITest","useNewWDA":"true","udid":"51d8c712258a5b0ac63516aa5be9d10014b0c270","platformName":"iOS","deviceName":"SG iPhone 5s","updatedWDABundleId":"beta.SkyGiraffe.SkyGiraffe","wdaConnectionTimeout":10000,"xcodeSigningId":"iPhone Developer"},null,null,null,null]
[Appium] Creating new XCUITestDriver (v2.6.0) session
[Appium] Capabilities:
[Appium] app: '/Users/menypeled/Documents/workspace/iOS_Appium/SkyGiraffe.app'
[Appium] wdaLaunchTimeout: 10000
[Appium] xcodeOrgId: '7Y5J2RJXYV'
[Appium] automationName: 'XCUITest'
[Appium] useNewWDA: 'true'
[Appium] udid: '51d8c712258a5b0ac63516aa5be9d10014b0c270'
[Appium] platformName: 'iOS'
[Appium] deviceName: 'SG iPhone 5s'
[Appium] updatedWDABundleId: 'beta.SkyGiraffe.SkyGiraffe'
[Appium] wdaConnectionTimeout: 10000
[Appium] xcodeSigningId: 'iPhone Developer'
[debug] [XCUITest] XCUITestDriver version: 2.6.0
[BaseDriver] Capability 'useNewWDA' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Session created with session id: 7039285c-2996-4408-8593-b70cb47cfd26
[debug] [XCUITest] Xcode version set to '8.2.1'
[debug] [XCUITest] iOS SDK Version set to '10.2'
[debug] [XCUITest] Available devices: 51d8c712258a5b0ac63516aa5be9d10014b0c270
[debug] [XCUITest] Creating iDevice object with udid 51d8c712258a5b0ac63516aa5be9d10014b0c270
[XCUITest] Determining device to run tests on: udid: '51d8c712258a5b0ac63516aa5be9d10014b0c270', real device: true
[BaseDriver] Using local app '/Users/menypeled/Documents/workspace/iOS_Appium/SkyGiraffe.app'
[debug] [XCUITest] Checking whether app '/Users/menypeled/Documents/workspace/iOS_Appium/SkyGiraffe.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app '/Users/menypeled/Documents/workspace/iOS_Appium/SkyGiraffe.app': 'beta.SkyGiraffe.SkyGiraffe'
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'
[XCUITest] Setting up real device
[debug] [XCUITest] App is not installed. Will try to install.
[debug] [XCUITest] App installed successfully.
[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] Capability 'useNewWDA' set, so uninstalling WDA before proceeding
[debug] [XCUITest] Removing WDA application from device
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
[debug] [XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[debug] [XCUITest] Error resetting project file: ENOENT: no such file or directory, unlink '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj/project.pbxproj.old'
[XCUITest] Unable to reset project file '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj/project.pbxproj' with bundle id 'com.facebook.WebDriverAgentRunner'. WebDriverAgent has been modified and not returned to the original state.
[debug] [XCUITest] Removing WDA application from device
[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] Capability 'useNewWDA' set, so uninstalling WDA before proceeding
[debug] [XCUITest] Removing WDA application from device
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
[debug] [XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[debug] [XCUITest] Error resetting project file: ENOENT: no such file or directory, unlink '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj/project.pbxproj.old'
[XCUITest] Unable to reset project file '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj/project.pbxproj' with bundle id 'com.facebook.WebDriverAgentRunner'. WebDriverAgent has been modified and not returned to the original state.
[debug] [XCUITest] Removing WDA application from device
[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] Capability 'useNewWDA' set, so uninstalling WDA before proceeding
[debug] [XCUITest] Removing WDA application from device
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
[debug] [XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[XCUITest] Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
at ChildProcess. (../../lib/teen_process.js:70:19)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:885:16)
at Socket. (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close as _onclose
{ Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
at ChildProcess. (../../lib/teen_process.js:70:19)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:885:16)
at Socket. (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close as _onclose
stdout: '\u001b[1mFetching dependencies\n',
stderr: 'Error: Command "bootstrap" does not exist.\n',
code: 1 }
[debug] [XCUITest] Running ios real device reset flow
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
at ChildProcess. (../../lib/teen_process.js:70:19)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:885:16)
at Socket. (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close as _onclose
[HTTP] <-- POST /wd/hub/session 500 13643 ms - 199