Bundle WebDriverAgentRunner couldn't be loaded because the executable is not found

Hello,

Using appium 1.6.3 on iOS Xcode 8.2.1. I am experiencing the following error when running the test.

The app under test is being installed and I can see the WebDriverAgent installed but the WebDriver agent crashes. I’ve googled all over to see how to fix this but have been unsuccessful. . Need expert advice, this is the first time that we’re implementing appium with Apple devices and apps. Please see log below:

Note: ‘XXXX’ means the data has been stripped.

Please help! Thanks, we’re looking at implementing appium within our ATF.
Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“device”:“iPhone 7”,“deviceName”:“iPhone 7”,“platformName”:“iOS”,“platformVersion”:“10.2”,“udid”:“46538732-597E-4D72-BBBD-AC5F1E4C8172”,“app”:"/Users/XXXXXXX/Documents/qabuild/XXXXXXX22115.ipa",“automationName”:“XCUITest”,“xCodeOrgId”:“V43NJVDHLQ”,“CodeSigningId”:“iPhone Developer”,“noReset”:true}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“device”:“iPhone 7”,“deviceName”:“iPhone 7”,“platformName”:“iOS”,“platformVersion”:“10.2”,“udid”:“46538732-597E-4D72-BBBD-AC5F1E4C8172”,“app”:"/Users/XXXXXXX/Documents/qabuild/XXXXXXX22115.ipa",“automationName”:“XCUITest”,“xCodeOrgId”:“V43NJVDHLQ”,“CodeSigningId”:“iPhone Developer”,“noReset”:true},null,null,null,null]
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium] device: ‘iPhone 7’
[Appium] deviceName: ‘iPhone 7’
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘10.2’
[Appium] udid: ‘XXXXXXXX’
[Appium] app: ‘XXXXXXXX’
[Appium] automationName: ‘XCUITest’
[Appium] xCodeOrgId: ‘XXXXX’
[Appium] CodeSigningId: ‘iPhone Developer’
[Appium] noReset: true
[debug] [XCUITest] XCUITestDriver version: 2.4.2
[BaseDriver] The following capabilities were provided, but are not recognized by appium: device, xCodeOrgId, CodeSigningId.
[BaseDriver] Session created with session id: e574475e-d39e-458a-b46a-0d0b74bfd01d
[debug] [XCUITest] Xcode version set to ‘8.2.1’
[debug] [XCUITest] iOS SDK Version set to ‘10.2’
[iOSSim] Constructing iOS simulator for Xcode version 8.2.1 with udid ‘XXXXXXX’
[XCUITest] Determining device to run tests on: udid: ‘XXXXXX’, real device: false
[BaseDriver] Using local app ‘/Users/XXXXXXX/Documents/qabuild/XXXXX’
[debug] [BaseDriver] Copying local zip to tmp dir
[debug] [BaseDriver] Unzipping /var/folders/r2/7f2tj7ns5yg9tfr80y0b3q2508xrb_/T/2017017-972-1d41l2s.dbafsi3sor/appium-app.zip
[debug] [BaseDriver] Testing zip archive: /var/folders/r2/7f2tj7ns5yg9tfr80y0b3q2508xrb_/T/2017017-972-1d41l2s.dbafsi3sor/appium-app.zip
[BaseDriver] Unzipped local app to ‘/var/folders/r2/7f2tj7ns5yg9tfr80y0b3q2508xrb_/T/2017017-972-1d41l2s.dbafsi3sor/Payload/XXXXXXX.app’
[debug] [XCUITest] Checking whether app ‘/var/folders/r2/7f2tj7ns5yg9tfr80y0b3q2508xrb_/T/2017017-972-1d41l2s.dbafsi3sor/Payload/XXXXXXX.app’ is actually present
[debug] [XCUITest] App is present
[debug] [ios-app-utils] Getting bundle ID from app ‘/var/folders/r2/7f2tj7ns5yg9tfr80y0b3q2508xrb_/T/2017017-972-1d41l2s.dbafsi3sor/Payload/XXXXXXX.app’: ‘com.ra.mobile.creditapp’
[debug] [iOSLog] Starting iOS 10.2 simulator log capture
[debug] [iOSLog] System log path: /Users/XXXXXXX/Library/Logs/CoreSimulator/46538732-597E-4D72-BBBD-AC5F1E4C8172/system.log
[XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set
[XCUITest] Simulator with udid ‘46538732-597E-4D72-BBBD-AC5F1E4C8172’ already booted
[debug] [XCUITest] Installing app ‘/var/folders/r2/7f2tj7ns5yg9tfr80y0b3q2508xrb_/T/2017017-972-1d41l2s.dbafsi3sor/Payload/XXXXXXX.app’ on 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’
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Killing hanging processes
[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=46538732-597E-4D72-BBBD-AC5F1E4C8172 -configuration Debug’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Waiting for WebDriverAgent to start on device
[debug] [XCUITest] Log file for xcodebuild test: /Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/8654CF15-72B6-4DC6-9A5E-715F570B485A/Session-WebDriverAgentRunner-2017-01-17_114419-iR601v.log
[debug] [WebDriverAgent] Sim: Jan 17 11:44:19 RA7375D CoreSimulatorBridge[897]: Requesting installation of file:///Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app/ with options: {
[debug] [WebDriverAgent] Sim: CFBundleIdentifier = “com.apple.test.WebDriverAgentRunner-Runner”;
[debug] [WebDriverAgent] Sim: PackageType = Developer;
[debug] [WebDriverAgent] Sim: SimulatorRootPath = “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk”;
[debug] [WebDriverAgent] Sim: SimulatorUserPath = “/Users/XXXXXXX/Library/Developer/CoreSimulator/Devices/46538732-597E-4D72-BBBD-AC5F1E4C8172/data”;
[debug] [WebDriverAgent] Sim: }
[debug] [WebDriverAgent] Sim: Jan 17 11:44:19 RA7375D CoreSimulatorBridge[897]: Getting container class internal daemon!
[debug] [WebDriverAgent] Sim: Jan 17 11:44:25 RA7375D CoreSimulatorBridge[897]: Requesting launch of com.apple.test.WebDriverAgentRunner-Runner with options: {
[debug] [WebDriverAgent] Sim: arguments = (
[debug] [WebDriverAgent] Sim: “-NSTreatUnknownArgumentsAsOpen”,
[debug] [WebDriverAgent] Sim: NO,
[debug] [WebDriverAgent] Sim: “-ApplePersistenceIgnoreState”,
[debug] [WebDriverAgent] Sim: YES
[debug] [WebDriverAgent] Sim: );
[debug] [WebDriverAgent] Sim: environment = {
[debug] [WebDriverAgent] Sim: “DTX_CONNECTION_SERVICES_PATH” = “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/PrivateFrameworks/DTXConnectionServices.framework”;
[debug] [WebDriverAgent] Sim: “DYLD_FRAMEWORK_PATH” = “/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks”;
[debug] [WebDriverAgent] Sim: “DYLD_LIBRARY_PATH” = “/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks”;
[debug] [WebDriverAgent] Sim: NSUnbufferedIO = YES;
[debug] [WebDriverAgent] Sim: “OS_ACTIVITY_DT_MODE” = YES;
[debug] [WebDriverAgent] Sim: “XCODE_DBG_XPC_EXCLUSIONS” = “com.apple.dt.xctestSymbolicator”;
[debug] [WebDriverAgent] Sim: XCTestConfigurationFilePath = “/var/folders/r2/7f2tj7ns5yg9tfr80y0b3q2508xrb_/T/com.apple.dt.XCTest/F3BE3BD5-D386-4A24-A666-14BEAB765A77/remote-container/tmp/WebDriverAgentRunner-F3BE3BD5-D386-4A24-A666-14BEAB765A77.xctestconfiguration”;
[debug] [WebDriverAgent] Sim: “__XCODE_BUILT_PRODUCTS_DIR_PATHS” = “/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator”;
[debug] [WebDriverAgent] Sim: “__XPC_DYLD_FRAMEWORK_PATH” = “/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator”;
[debug] [WebDriverAgent] Sim: “__XPC_DYLD_LIBRARY_PATH” = “/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator”;
[debug] [WebDriverAgent] Sim: };
[debug] [WebDriverAgent] Sim: stderr = “/dev/ttys001”;
[debug] [WebDriverAgent] Sim: stdout = “/dev/ttys001”;
[debug] [WebDriverAgent] Sim: “wait_for_debugger” = 0;
[debug] [WebDriverAgent] Sim: }
[debug] [WebDriverAgent] Sim: Jan 17 11:44:25 RA7375D CoreSimulatorBridge[897]: Beginning launch sequence for bundle ‘com.apple.test.WebDriverAgentRunner-Runner’
[debug] [WebDriverAgent] Sim: retryTimeout: 120.000000 (default write com.apple.CoreSimulatorBridge LaunchRetryTimeout )
[debug] [WebDriverAgent] Sim: bootTimeout: 300.000000 (default write com.apple.CoreSimulatorBridge BootRetryTimeout )
[debug] [WebDriverAgent] Sim: bootLeeway: 120.000000 (default write com.apple.CoreSimulatorBridge BootLeeway )
[debug] [WebDriverAgent] Sim: Note: Use 'xcrun simctl spawn booted defaults write ’ to modify defaults in the booted Simulator device.
[debug] [WebDriverAgent] Sim: Simulator booted at: 2017-01-17 19:41:04 +0000
[debug] [WebDriverAgent] Sim: Current time: 2017-01-17 19:44:25 +0000
[debug] [WebDriverAgent] Sim: Within boot leeway: NO
[debug] [WebDriverAgent] Sim: Jan 17 11:44:25 RA7375D CoreSimulatorBridge[897]: Launch attempt #0 for bundle ‘com.apple.test.WebDriverAgentRunner-Runner’, have been trying to launch for 0 seconds. Modern launch services = YES
[debug] [WebDriverAgent] Sim: Jan 17 11:44:25 RA7375D CoreSimulatorBridge[897]: Got LSBundleProxy for ‘com.apple.test.WebDriverAgentRunner-Runner’, sequenceNumber 256, cacheGUID 86293272-6ECF-4F49-98FE-B714F8553F31
[debug] [WebDriverAgent] Sim: Jan 17 11:44:25 RA7375D CoreSimulatorBridge[897]: [Common] [FBSSystemService][0xae78] Sending request to open “com.apple.test.WebDriverAgentRunner-Runner”
[debug] [WebDriverAgent] Sim: Jan 17 11:44:25 RA7375D CoreSimulatorBridge[897]: [Common] [FBSSystemService][0xae78] Request successful: <FBSProcessHandle: 0x7fc7cf614d20; XCTRunner:1063; valid: YES>
[debug] [WebDriverAgent] Sim: Jan 17 11:44:25 RA7375D CoreSimulatorBridge[897]: Launch successful for ‘com.apple.test.WebDriverAgentRunner-Runner’
[debug] [WebDriverAgent] Sim: Jan 17 11:44:25 RA7375D XCTRunner[1063]: assertion failed: 16C68 14C89: libxpc.dylib + 62677 [0339A402-6531-30E9-8BC2-589C463CD6D6]: 0x7d
[debug] [WebDriverAgent] Sim: Jan 17 11:44:25 RA7375D XCTRunner[1063]: Running tests…
[debug] [WebDriverAgent] Sim: Jan 17 11:44:25 RA7375D XCTRunner[1063]: The bundle “WebDriverAgentRunner” couldn’t be loaded because its executable couldn’t be located. Try reinstalling the bundle.
[Xcode] 2017-01-17 11:44:25.525 xcodebuild[1035:21070] Error Domain=IDETestOperationsObserverErrorDomain Code=5 “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}

[Xcode] ** TEST EXECUTE FAILED **

[Xcode] 2017-01-17 11:44:25.506 XCTRunner[1063:21361] Running tests…
2017-01-17 11:44:25.517 XCTRunner[1063:21361] The bundle “WebDriverAgentRunner” couldn’t be loaded because its executable couldn’t be located. Try reinstalling the bundle.

[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[debug] [XCUITest] xcodebuild failure warrants retry. Retrying…
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down Logger process (pid 1041)
[XCUITest] Simulator log exited with code ‘null’
[debug] [XCUITest] Removing WDA application from device
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Killing hanging processes
[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=46538732-597E-4D72-BBBD-AC5F1E4C8172 -configuration Debug’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Waiting for WebDriverAgent to start on device
[debug] [XCUITest] Log file for xcodebuild test: /Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/2F16AF10-F974-4520-943C-3910FA5AC5DE/Session-WebDriverAgentRunner-2017-01-17_114427-qLiP1o.log
[debug] [WebDriverAgent] Sim: Jan 17 11:44:27 RA7375D CoreSimulatorBridge[897]: Requesting installation of file:///Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app/ with options: {
[debug] [WebDriverAgent] Sim: CFBundleIdentifier = “com.apple.test.WebDriverAgentRunner-Runner”;
[debug] [WebDriverAgent] Sim: PackageType = Developer;
[debug] [WebDriverAgent] Sim: SimulatorRootPath = “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk”;
[debug] [WebDriverAgent] Sim: SimulatorUserPath = “/Users/XXXXXXX/Library/Developer/CoreSimulator/Devices/46538732-597E-4D72-BBBD-AC5F1E4C8172/data”;
[debug] [WebDriverAgent] Sim: }
[debug] [WebDriverAgent] Sim: Jan 17 11:44:32 RA7375D CoreSimulatorBridge[897]: Requesting launch of com.apple.test.WebDriverAgentRunner-Runner with options: {
[debug] [WebDriverAgent] Sim: arguments = (
[debug] [WebDriverAgent] Sim: “-NSTreatUnknownArgumentsAsOpen”,
[debug] [WebDriverAgent] Sim: NO,
[debug] [WebDriverAgent] Sim: “-ApplePersistenceIgnoreState”,
[debug] [WebDriverAgent] Sim: YES
[debug] [WebDriverAgent] Sim: );
[debug] [WebDriverAgent] Sim: environment = {
[debug] [WebDriverAgent] Sim: “DTX_CONNECTION_SERVICES_PATH” = “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/PrivateFrameworks/DTXConnectionServices.framework”;
[debug] [WebDriverAgent] Sim: “DYLD_FRAMEWORK_PATH” = “/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks”;
[debug] [WebDriverAgent] Sim: “DYLD_LIBRARY_PATH” = “/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks”;
[debug] [WebDriverAgent] Sim: NSUnbufferedIO = YES;
[debug] [WebDriverAgent] Sim: “OS_ACTIVITY_DT_MODE” = YES;
[debug] [WebDriverAgent] Sim: “XCODE_DBG_XPC_EXCLUSIONS” = “com.apple.dt.xctestSymbolicator”;
[debug] [WebDriverAgent] Sim: XCTestConfigurationFilePath = “/var/folders/r2/7f2tj7ns5yg9tfr80y0b3q2508xrb_/T/com.apple.dt.XCTest/4566DDFD-2CEF-4C86-A9F7-86D449873175/remote-container/tmp/WebDriverAgentRunner-4566DDFD-2CEF-4C86-A9F7-86D449873175.xctestconfiguration”;
[debug] [WebDriverAgent] Sim: “__XCODE_BUILT_PRODUCTS_DIR_PATHS” = “/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator”;
[debug] [WebDriverAgent] Sim: “__XPC_DYLD_FRAMEWORK_PATH” = “/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator”;
[debug] [WebDriverAgent] Sim: “__XPC_DYLD_LIBRARY_PATH” = “/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator”;
[debug] [WebDriverAgent] Sim: };
[debug] [WebDriverAgent] Sim: stderr = “/dev/ttys001”;
[debug] [WebDriverAgent] Sim: stdout = “/dev/ttys001”;
[debug] [WebDriverAgent] Sim: “wait_for_debugger” = 0;
[debug] [WebDriverAgent] Sim: }
[debug] [WebDriverAgent] Sim: Jan 17 11:44:32 RA7375D CoreSimulatorBridge[897]: Beginning launch sequence for bundle ‘com.apple.test.WebDriverAgentRunner-Runner’
[debug] [WebDriverAgent] Sim: retryTimeout: 120.000000 (default write com.apple.CoreSimulatorBridge LaunchRetryTimeout )
[debug] [WebDriverAgent] Sim: bootTimeout: 300.000000 (default write com.apple.CoreSimulatorBridge BootRetryTimeout )
[debug] [WebDriverAgent] Sim: bootLeeway: 120.000000 (default write com.apple.CoreSimulatorBridge BootLeeway )
[debug] [WebDriverAgent] Sim: Note: Use 'xcrun simctl spawn booted defaults write ’ to modify defaults in the booted Simulator device.
[debug] [WebDriverAgent] Sim: Simulator booted at: 2017-01-17 19:41:04 +0000
[debug] [WebDriverAgent] Sim: Current time: 2017-01-17 19:44:32 +0000
[debug] [WebDriverAgent] Sim: Within boot leeway: NO
[debug] [WebDriverAgent] Sim: Jan 17 11:44:32 RA7375D CoreSimulatorBridge[897]: Launch attempt #0 for bundle ‘com.apple.test.WebDriverAgentRunner-Runner’, have been trying to launch for 0 seconds. Modern launch services = YES
[debug] [WebDriverAgent] Sim: Jan 17 11:44:32 RA7375D CoreSimulatorBridge[897]: Got LSBundleProxy for ‘com.apple.test.WebDriverAgentRunner-Runner’, sequenceNumber 260, cacheGUID 86293272-6ECF-4F49-98FE-B714F8553F31
[debug] [WebDriverAgent] Sim: Jan 17 11:44:32 RA7375D CoreSimulatorBridge[897]: [Common] [FBSSystemService][0xd96c] Sending request to open “com.apple.test.WebDriverAgentRunner-Runner”
[debug] [WebDriverAgent] Sim: Jan 17 11:44:32 RA7375D CoreSimulatorBridge[897]: [Common] [FBSSystemService][0xd96c] Request successful: <FBSProcessHandle: 0x7fc7cf614330; XCTRunner:1107; valid: YES>
[debug] [WebDriverAgent] Sim: Jan 17 11:44:32 RA7375D CoreSimulatorBridge[897]: Launch successful for ‘com.apple.test.WebDriverAgentRunner-Runner’
[debug] [WebDriverAgent] Sim: Jan 17 11:44:32 RA7375D XCTRunner[1107]: assertion failed: 16C68 14C89: libxpc.dylib + 62677 [0339A402-6531-30E9-8BC2-589C463CD6D6]: 0x7d
[debug] [WebDriverAgent] Sim: Jan 17 11:44:32 RA7375D XCTRunner[1107]: Running tests…
[debug] [WebDriverAgent] Sim: Jan 17 11:44:32 RA7375D XCTRunner[1107]: The bundle “WebDriverAgentRunner” couldn’t be loaded because its executable couldn’t be located. Try reinstalling the bundle.
[Xcode] 2017-01-17 11:44:32.373 xcodebuild[1086:21494] Error Domain=IDETestOperationsObserverErrorDomain Code=5 “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}

[Xcode] ** TEST EXECUTE FAILED **

[Xcode] 2017-01-17 11:44:32.357 XCTRunner[1107:21632] Running tests…
2017-01-17 11:44:32.365 XCTRunner[1107:21632] The bundle “WebDriverAgentRunner” couldn’t be loaded because its executable couldn’t be located. Try reinstalling the bundle.

[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[XCUITest] Error: xcodebuild failed with code 65
at SubProcess. (…/…/lib/webdriveragent.js:355:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:191:7)
at ChildProcess. (…/…/lib/teen_process.js:197:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
Error: xcodebuild failed with code 65
at SubProcess. (…/…/lib/webdriveragent.js:355:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:191:7)
at ChildProcess. (…/…/lib/teen_process.js:197:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down Logger process (pid 1094)
[XCUITest] Simulator log exited with code ‘null’
[debug] [XCUITest] Reset not set, not ending sim
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: xcodebuild failed with code 65
at SubProcess. (…/…/lib/webdriveragent.js:355:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:191:7)
at ChildProcess. (…/…/lib/teen_process.js:197:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
[HTTP] <-- POST /wd/hub/session 500 25087 ms - 167

When you open a terminal, what displays when you do…

which appium
which node

which appium returns:
/usr/local/bin/appium

which node returns:
/usr/local/bin/node

Thanks for responding. Look forward to your reply.

It appears that you are pointing to the wrong appium and node.

Open Terminal
Enter: brew install node
Enter: nvm install 6.0.0
Enter: which node
If the node path changes continue with 6 and 7
npm install -g appium
npm install -g appium-doctor

Thank you so much, I will try that and keep you posted.

Just a follow up. I got rid of the error after I reinstalled carthage and work through the provisioning profiles and certificate signing part. Not sure if that’s what really fixed my issues but after several uninstalling and reinstalling appium, i attempted to uninstall and reinstall carthage and no longer encountered the same error. It gave me the certificate signing error instead which I was able to quickly resolve. I will take it for now and maybe try to repro it on a different environment as I don’t want to risk messing up this one. However, I now am experiencing “WebDriverAgentRunner encountered an error(Early unexpected exit, operation never finished bootsrapping- no restart will be attempted)” error when I try to launch the inspector. Any ideas? Thanks for your feedback.

How are you starting the appium server? You should be using the terminal.

Below is my code to start the appium server:

CommandLine command = new CommandLine("/Users/"+strAutomationUser+"/.nvm/versions/node/v6.0.0/bin/node"); //<-which node
command.addArgument("/Users/"+strAutomationUser+"/.nvm/versions/node/v6.0.0/bin/appium",false); <-which appium
command.addArgument("–address", false);
command.addArgument(“127.0.0.1”);
command.addArgument("–port", false);
command.addArgument(strAppiumPort);
command.addArgument("-bp", false);
command.addArgument(strBootstrapPort);
command.addArgument("–full-reset", true);
command.addArgument("–session-override", true);
//command.addArgument("–no-reset", true);
DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
DefaultExecutor executor = new DefaultExecutor();
executor.setExitValue(1);
try {executor.execute(command, resultHandler);
Thread.sleep(5000);System.out.println(“Appium server started.”);}
catch (IOException e)
{e.printStackTrace();}
catch (InterruptedException e)
{e.printStackTrace();}

What are your capabilities?

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“newCommandTimeout”, 60 * 5);
capabilities.setCapability(“platformName”,“iOS”);
capabilities.setCapability(“deviceName”,strIOSDeviceName);
capabilities.setCapability(“platformVersion”, “10.2”);
capabilities.setCapability(“udid”,strIOSUdid);
capabilities.setCapability(“deviceName”,strIOSDeviceName+"("+strIOSUdid+")");
File f = new File(strIOSPath);
if(f.exists()) {capabilities.setCapability(“app”,strIOSPath);}
else{String strErrorMsg = “The IOS application path didn’t exists (”+strIOSPath+")";Reporter.log(""+strErrorMsg+"");Assert.fail(strErrorMsg);return null;}
capabilities.setCapability(“launchTimeout”, 60000);
capabilities.setCapability(“sendKeyStrategy”,“setValue”);

I have try a real device in a while. Can you get the simulator to work?

Hey, there, haven’t had any luck with running tests on simulator yet. The app launches but immediately shuts down. Not sure what the heck is going on. So far it works flawlessly on the real device.

@RobC

Hey Rob.

I think you have to build the APP for the simulator. The app you currently have was build for a real device and they cannot be shared.

Or there is something that isn’t getting cleared when you switch from Simulator to Real Device. I have found myself having to restart my machine to move from Simulator to Real and vice versa.

Thanks for the tip! I will give that a try and let you know. I’m working on an Android issue now :slight_smile: with Appium 1.4.16. The issue does not occur when I am running the same tests on IOS. On Android, when I click or tap on a checkbox, it appears that appium recognizes the action is taken and passed but it’s not happening on the app/device. I tried different things to make it work but no luck yet. Maybe you some ideas/experience around the issue am having? Thanks!

Without seeing the screen, I’m guessing you might have 2 checkboxes with the same id.

Try indexing.

Hi,

AAHHH! 'bout to blow my brains on this issue with the check boxes! Tried everything I can think to not have to write a function to handle this issue. If I scroll down a bit to put the checkboxes on focus(viewable), the checkbox actions are taken by the app and works as expected. If they’re not visible I encounter the problem. I tried to scroll with coordinates or gestures nothing happens. Everyone is talking about “scrollTo” but seems like scrolling methods have been deprecated on appium. Most of sample scrolling codes are in Java, I am coding with C#. Any help will be appreciated. I’ve been on this issue for weeks and I cannot get pass it. Unfortunately, it’s a blocker for me in completing my android automation at this time. Thanks!

Maybe try something like this.

MobileElement objFrame = androiddriver.findElement(By.xpath("//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.ScrollView[1]"));
clsCommonMobile.ScrollDownOnElement(androiddriver, objFrame);

public void ScrollDownOnElement(AndroidDriver androiddriver, MobileElement element)
{
int topY = element.getLocation().getY();
int bottomY = (int)((topY + element.getSize().getHeight()) * 0.84);
int centerX = element.getLocation().getX() + (element.getSize().getWidth()/2);
androiddriver.swipe(centerX, bottomY, centerX, topY, 2000);
}
public void ScrollUpOnElement(IOSDriver iosdriver, MobileElement element)
{
int topY = element.getLocation().getY();
int bottomY = (int)((topY + element.getSize().getHeight()) * 0.84);
int centerX = element.getLocation().getX() + (element.getSize().getWidth()/2);
androiddriver.swipe(centerX,bottomY,topY,-centerX,1000);
}