Appium test script failure due to driver issues

I am trying to test an automation framework that is developed on eclipse with grade extension and cucumber interface. When I attempt to launch an app using the automation script I get the error below. The app was just a demo iOS app I developed using Xcode 7.3 all it does on launch is display a label and is just to test that the framework works for iOS. My appium capabilities are set as below:

             DesiredCapabilities capabilities = new DesiredCapabilities();
	capabilities.setCapability("platformName", "ios");
	capabilities.setCapability("command-timeout", 300);
	capabilities.setCapability("app", Settings.applicationUrl);
	capabilities.setCapability("bundleId", Settings.bundleID);
	capabilities.setCapability(CapabilityType.VERSION, "9.3");
	capabilities.setCapability("deviceName", "iPhone");    
	capabilities.setCapability("udid", "20ac3132c738d827e6466bb889ad87a61aa20cf4");

Error message:

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Trying to start iOS log capture but it’s already started! (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 62 milliseconds
Build info: version: ‘2.53.0’, revision: ‘35ae25b1534ae328c771e0856c93e187490ca824’, time: ‘2016-03-15 10:43:46’
System info: host: ‘LEEML0253701’, ip: ‘10.241.80.98’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.11.2’, java.version: ‘1.8.0_73’
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities [{app=/Users/msi15/Downloads/Debug-iphonesimulator/test.app, networkConnectionEnabled=false, noReset=true, bundleId=com.sky.sdc.test, databaseEnabled=false, version=9.3, deviceName=iPhone, platform=MAC, nativeInstrumentsLib=true, desired={app=/Users/msi15/Downloads/Debug-iphonesimulator/test.app, nativeInstrumentsLib=true, noReset=true, automationName=appium, command-timeout=300, bundleId=com.sky.sdc.test, platformName=iOS, udid=20ac3132c738d827e6466bb889ad87a61aa20cf4, version=9.3, deviceName=iPhone}, webStorageEnabled=false, locationContextEnabled=false, automationName=appium, command-timeout=300, browserName=, takesScreenshot=true, javascriptEnabled=true, platformName=iOS, udid=20ac3132c738d827e6466bb889ad87a61aa20cf4}]
Session ID: bd965dc6-b0e6-41af-ac81-d9549fa89998
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
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 io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:207)
at io.appium.java_client.AppiumDriver.launchApp(AppiumDriver.java:255)
at com.sky.appium.ios.iOSStepDef.OoyalaApp_is_launched(iOSStepDef.java:31)
at ✽.Given OoyalaApp is launched(com/sky/appium/ios/applaunchtest.feature:9)

Din’t this link help you?

Exception in thread “main” org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not find a device to launch. You requested ‘iphone 6 (9.3)’, but the available devices were: [“Apple TV 1080p (9.2) [16AE487C-05A0-4BAB-BBF7-FD0266F4FD63] (Simulator)”,“Apple Watch - 38mm (2.2) [21E58BF5-4FC5-4965-AC94-1D29A910F49B] (Simulator)”,“Apple Watch - 42mm (2.2) [6272937E-18DE-421A-B4B8-4055E3CE31E4] (Simulator)”,“iPhone 6 (9.3) [699BB30D-4398-44F7-8FB4-5DA6F4CA15F8] (Simulator)”] (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 4.56 seconds
Build info: version: ‘2.53.0’, revision: ‘35ae25b’, time: ‘2016-03-15 16:57:40’
System info: host: ‘Admins-Mac-mini.local’, ip: ‘192.168.0.109’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.11.5’, java.version: ‘1.8.0_91’
Driver info: io.appium.java_client.ios.IOSDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
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 io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:51)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
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:144)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:47)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:132)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:81)
at Fybr.main(Fybr.java:22)

server side
[iOS] Error: Could not find a device to launch. You requested ‘iphone 6 (9.3)’, but the available devices were: [“Apple TV 1080p (9.2) [16AE487C-05A0-4BAB-BBF7-FD0266F4FD63] (Simulator)”,“Apple Watch - 38mm (2.2) [21E58BF5-4FC5-4965-AC94-1D29A910F49B] (Simulator)”,“Apple Watch - 42mm (2.2) [6272937E-18DE-421A-B4B8-4055E3CE31E4] (Simulator)”,“iPhone 6 (9.3) [699BB30D-4398-44F7-8FB4-5DA6F4CA15F8] (Simulator)”]
at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)
at noDevicesError (lib/driver.js:912:14)
at IosDriver.checkSimAvailable$ (lib/driver.js:917:9)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[Error: Could not find a device to launch. You requested ‘iphone 6 (9.3)’, but the available devices were: [“Apple TV 1080p (9.2) [16AE487C-05A0-4BAB-BBF7-FD0266F4FD63] (Simulator)”,“Apple Watch - 38mm (2.2) [21E58BF5-4FC5-4965-AC94-1D29A910F49B] (Simulator)”,“Apple Watch - 42mm (2.2) [6272937E-18DE-421A-B4B8-4055E3CE31E4] (Simulator)”,“iPhone 6 (9.3) [699BB30D-4398-44F7-8FB4-5DA6F4CA15F8] (Simulator)”]]

[HTTP] <-- POST /wd/hub/session 500 4289 ms - 543

[MJSONWP] Encountered internal error running command: Error: Could not find a device to launch. You requested ‘iphone 6 (9.3)’, but the available devices were: [“Apple TV 1080p (9.2) [16AE487C-05A0-4BAB-BBF7-FD0266F4FD63] (Simulator)”,“Apple Watch - 38mm (2.2) [21E58BF5-4FC5-4965-AC94-1D29A910F49B] (Simulator)”,“Apple Watch - 42mm (2.2) [6272937E-18DE-421A-B4B8-4055E3CE31E4] (Simulator)”,“iPhone 6 (9.3) [699BB30D-4398-44F7-8FB4-5DA6F4CA15F8] (Simulator)”]
at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)
at noDevicesError (lib/driver.js:912:14)
at IosDriver.checkSimAvailable$ (lib/driver.js:917:9)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)

[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.5.3”…
[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.5.3”…

[HTTP] <-- GET /wd/hub/status 200 29 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.5.3”…
[HTTP] <-- GET /wd/hub/status 200 12 ms - 83

In case anyone is wondering the issue was due to isAppInstalled method failing for iOS automation.