Error in loading XCUITEST driver

I have installed the latest server version (1.6.0).
When I am checking the server version it is ok…

Asis-Mac-mini:/ asihizkiahu$ appium -v
1.6.0

I am loading the appium server and driver via the code, and get this log…

  • Observe at the server version, it indicates Appium v1.6.0-beta1 (wrong version)
  • Does this causes the error?

[node, /Users/asihizkiahu/node_modules/appium/build/lib/main.js, --address, 127.0.0.1, --port, 4723]
Appium server started.
(node:13191) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[Appium] Welcome to Appium v1.6.0-beta1
[Appium] Non-default server args:
[Appium] address: ‘127.0.0.1’
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
Trying to set IOS driver
Property file src/test/resources/messaging_sanity_test/capabilities.properties parsed successfully
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“newCommandTimeout”:“600”,“automationName”:“XCUITest”,“waitForAppScript”:“true”,“platformVersion”:“10.0”,“app”:"/Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app",“autoWebview”:“true”,“fullReset”:“true”,“deviceName”:“iPhone 6s”,“platformName”:“ios”,“sendKeyStrategy”:“setValue”}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“newCommandTimeout”:“600”…
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium] newCommandTimeout: ‘600’
[Appium] automationName: ‘XCUITest’
[Appium] waitForAppScript: ‘true’
[Appium] platformVersion: ‘10.0’
[Appium] app: ‘/Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app’
[Appium] autoWebview: ‘true’
[Appium] fullReset: ‘true’
[Appium] deviceName: ‘iPhone 6s’
[Appium] platformName: ‘ios’
[Appium] sendKeyStrategy: ‘setValue’
[debug] [XCUITest] XCUITestDriver version: 2.0.24
[BaseDriver] Capability ‘autoWebview’ changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability ‘fullReset’ changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability ‘newCommandTimeout’ changed from string (‘600’) to integer (600). This may cause unexpected behavior
[BaseDriver] Session created with session id: 1f98fa65-1bd4-4a43-bb0b-0f486455e0b8
[debug] [XCUITest] Xcode version set to ‘8.0’
[debug] [XCUITest] iOS SDK Version set to ‘10.0’
[iOSSim] Constructing iOS simulator for Xcode version 8.0 with udid ‘5A494E7A-EE78-4095-8922-CF1C3CC89FAB’
[debug] [XCUITest] Full reset requested. Cleaning and stopping simulator
[debug] [iOSSim] Killing any simulator daemons for 5A494E7A-EE78-4095-8922-CF1C3CC89FAB
[iOSSim] Cleaning simulator 5A494E7A-EE78-4095-8922-CF1C3CC89FAB
[debug] [iOSSim] Killing all iOS Simulators
[XCUITest] Determining device to run tests on: udid: ‘5A494E7A-EE78-4095-8922-CF1C3CC89FAB’, real device: false
[BaseDriver] Using local app ‘/Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app’
[debug] [XCUITest] Checking whether app is actually present
[debug] [ios-app-utils] Getting bundle ID from app
[debug] [iOSLog] Starting iOS 10.0 simulator log capture
[debug] [iOSLog] System log path: /Users/asihizkiahu/Library/Logs/CoreSimulator/5A494E7A-EE78-4095-8922-CF1C3CC89FAB/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 ‘5A494E7A-EE78-4095-8922-CF1C3CC89FAB’ not booted. Booting up now
[debug] [iOSSim] Killing all iOS Simulators
[iOSSim] Starting simulator with command: open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID 5A494E7A-EE78-4095-8922-CF1C3CC89FAB
[iOSSim] Tailing simulator logs until we encounter the string “SMS Plugin initialized”
[iOSSim] We will time out after 60000ms
[debug] [iOSSim] Simulator startup timed out. Continuing anyway.
[debug] [iOSSim] Waiting an extra 10000ms for the simulator to really finish booting
[debug] [iOSSim] Done waiting extra time for simulator
[iOSSim] Simulator booted in 70288ms
[debug] [XCUITest] Full reset requested. Removing app from device
[debug] [XCUITest] Installing app ‘/Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app’ on device
[XCUITest] Using default agent: /Users/asihizkiahu/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[XCUITest] Using default bootstrap: /Users/asihizkiahu/node_modules/appium-xcuitest-driver/WebDriverAgent
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage not found. Install using brew install 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:66:19)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:885:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
{ Error: Command ‘/bin/bash Scripts/bootstrap.sh -d’ exited with code 1
at ChildProcess. (lib/teen_process.js:66:19)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:885:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
stdout: ‘\u001b[1mFetching dependencies\nPlease make sure that you have Carthage installed (https://github.com/Carthage/Carthage)\nNote: We are expecting that carthage installed in /usr/local/bin/\n’,
stderr: ‘’,
code: 1 }
[debug] [XCUITest] Running iOS simulator reset flow
[debug] [XCUITest] Shutting down simulator
[debug] [iOSSim] Killing all iOS Simulators
[debug] [XCUITest] Full reset is on. Cleaning simulator
[debug] [iOSSim] Killing any simulator daemons for 5A494E7A-EE78-4095-8922-CF1C3CC89FAB
[iOSSim] Cleaning simulator 5A494E7A-EE78-4095-8922-CF1C3CC89FAB
[debug] [XCUITest] Resetting simulator
[debug] [XCUITest] Shutting down simulator
[debug] [iOSSim] Killing all iOS Simulators
[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:66:19)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:885:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
[HTTP] <-- POST /wd/hub/session 500 134478 ms - 199
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Command ‘/bin/bash Scripts/bootstrap.sh -d’ exited with code 1 (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 134.80 seconds
Build info: version: ‘2.53.0’, revision: ‘35ae25b1534ae328c771e0856c93e187490ca824’, time: ‘2016-03-15 10:43:46’
System info: host: ‘Asis-Mac-mini.local’, ip: ‘192.168.1.194’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.11.6’, java.version: ‘1.7.0_79’
Driver info: org.openqa.selenium.remote.RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:158)
at com.ui.service.drivers.Drivers$Appium.createIOSDriver(Drivers.java:474)
at com.ui.service.drivers.Drivers$Appium.setDriver(Drivers.java:420)
at com.ui.service.drivers.Drivers.setDriver(Drivers.java:59)
at com.test.BaseTest$StaticRouter.before(BaseTest.java:80)
at appium.messaging.MessagingSanityTest.setUp(MessagingSanityTest.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

Progress:

i installed the brew install carthage…
Now I get a different error…

[debug] [RemoteDebugger] Receiving data from remote debugger: ‘{"__argument":{“WIRApplicationDictionaryKey”:{}},"__selector":"_rpc_reportConnectedApplicationList:"}’
[debug] [RemoteDebugger] Received no apps from remote debugger. Unable to connect.
[debug] [RemoteDebugger] Receiving data from remote debugger: ‘{"__argument":{“WIRDriverDictionaryKey”:{}},"__selector":"_rpc_reportConnectedDriverList:"}’
[debug] [RemoteDebugger] Notified of connected drivers: {}.
[debug] [RemoteDebugger] Connected to application
[debug] [RemoteDebugger] Sim name: iPhone
[debug] [RemoteDebugger] Sim build: 14A345
[debug] [RemoteDebugger] Sim platform version: 10.0
[debug] [RemoteDebugger] Selecting application
[debug] [RemoteDebugger] No applications currently connected.
[debug] [iOS] No web frames found.
[iOS] Could not find any webviews yet, refreshing/retrying
[debug] [iOS] Retrieving contexts and views
[debug] [iOS] Selecting by url: false
[debug] [RemoteDebugger] useNewSafari --> false
[debug] [RemoteDebugger] Debugger socket connected to ::1:27753
[debug] [RemoteDebugger] Sending connection key request
[debug] [RemoteDebugger] Sending ‘_rpc_reportIdentifier:’ message to remote debugger
[debug] [RemoteDebugger] Receiving data from remote debugger: ‘{"__argument":{“WIRSimulatorBuildKey”:“14A345”,“WIRSimulatorProductVersionKey”:“10.0”,“WIRSimulatorNameKey”:“iPhone”},"__selector":"_rpc_reportSetup:"}’
[debug] [RemoteDebugger] Received response from socket send: ‘[“iPhone”,“14A345”,“10.0”]’
[debug] [RemoteDebugger] Receiving data from remote debugger: ‘{"__argument":{“WIRApplicationDictionaryKey”:{}},"__selector":"_rpc_reportConnectedApplicationList:"}’
[debug] [RemoteDebugger] Received no apps from remote debugger. Unable to connect.
[debug] [RemoteDebugger] Connected to application
[debug] [RemoteDebugger] Sim name: iPhone
[debug] [RemoteDebugger] Sim build: 14A345
[debug] [RemoteDebugger] Sim platform version: 10.0
[debug] [RemoteDebugger] Selecting application
[debug] [RemoteDebugger] No applications currently connected.
[debug] [iOS] No web frames found.
[XCUITest] Error: Could not navigate to webview; there are none!
at XCUITestDriver.spinHandles$ (lib/commands/context.js:506:13)
at tryCatch (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: Could not navigate to webview; there are none!
at XCUITestDriver.spinHandles$ (lib/commands/context.js:506:13)
at tryCatch (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[JSONWP Proxy] Proxying [DELETE /session/34948802-75b5-4ee5-922f-20b4b658fa18] to [DELETE http://localhost:8100/session/E545A2AC-EB6F-4BD1-A419-DB6CF7B04987] with no body
[debug] [RemoteDebugger] Receiving data from remote debugger: ‘{"__argument":{“WIRDriverDictionaryKey”:{}},"__selector":"_rpc_reportConnectedDriverList:"}’
[debug] [RemoteDebugger] Notified of connected drivers: {}.
[JSONWP Proxy] Got response with status 200: "{\n “value” : {\n\n },…
[XCUITest] Shutting down WebDriverAgent
[XCUITest] Simulator log exited with code ‘null’
[XCUITest] xcodebuild exited with code ‘null’ and signal ‘SIGTERM’
[debug] [XCUITest] Running iOS simulator reset flow
[debug] [XCUITest] Shutting down simulator
[debug] [iOSSim] Killing all iOS Simulators
[debug] [XCUITest] Full reset is on. Cleaning simulator
[debug] [iOSSim] Killing any simulator daemons for 5A494E7A-EE78-4095-8922-CF1C3CC89FAB
[iOSSim] Cleaning simulator 5A494E7A-EE78-4095-8922-CF1C3CC89FAB
[debug] [XCUITest] Resetting simulator
[debug] [XCUITest] Shutting down simulator
[debug] [iOSSim] Killing all iOS Simulators
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Could not navigate to webview; there are none!
at XCUITestDriver.spinHandles$ (lib/commands/context.js:506:13)
at tryCatch (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 305866 ms - 183
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not navigate to webview; there are none! (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 306.28 seconds
Build info: version: ‘2.53.0’, revision: ‘35ae25b1534ae328c771e0856c93e187490ca824’, time: ‘2016-03-15 10:43:46’
System info: host: ‘Asis-Mac-mini.local’, ip: ‘192.168.1.194’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.11.6’, java.version: ‘1.7.0_79’
Driver info: org.openqa.selenium.remote.RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:158)
at com.ui.service.drivers.Drivers$Appium.createIOSDriver(Drivers.java:474)
at com.ui.service.drivers.Drivers$Appium.setDriver(Drivers.java:420)
at com.ui.service.drivers.Drivers.setDriver(Drivers.java:59)
at com.test.BaseTest$StaticRouter.before(BaseTest.java:80)
at appium.messaging.MessagingSanityTest.setUp(MessagingSanityTest.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)

Do you have the “autoWebview” capability set to true?