--session-override issue in appium 1.5

I sometimes can’t start new session and see error:

org.openqa.selenium.SessionNotCreatedException: A new session could not be created. Details: Problem getting session data for driver type IosDriver; does it implement ‘get driverData’? (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 356 milliseconds
Build info: version: ‘2.52.0’, revision: ‘4c2593cfc3689a7fcd7be52549167e5ccc93ad28’, time: ‘2016-02-11 11:22:43’
System info: host: ‘Shynkevich-MacBook-Pro.local’, ip: ‘192.168.1.240’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.10.5’, java.version: ‘1.8.0_60’
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: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: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:37)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:162)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:171)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:56)
at com.cityindex.TestRunner.setUp(TestRunner.java:98)
at com.cityindex.BaseTestRunner.runTest(BaseTestRunner.java:39)
at com.cityindex.BaseTestRunner.main(BaseTestRunner.java:9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

It started appears only on appium 1.5.
I use 3.4.0 client

Logs from server below:

[debug] [UIAuto] Got result from instruments: {“status”:0,“value”:{“UIAApplication”:{“@”:{“name”:“APP_NAME”,“label”:“APP_NAME”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0”,“x”:0,“y”:0,“width”:375,“height”:667},“>”:[{“UIAWindow”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:tru
[Appium] New IosDriver session created successfully, session 77404716-f89f-46f2-b1ca-ba9e523290cd added to master session list
[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium] app: ‘/Users/alex/Downloads/CityIndex_Release.ipa’
[Appium] platformVersion: ‘9.2’
[Appium] browserName: ‘’
[Appium] deviceOrientation: ‘portrait’
[Appium] language: ‘en’
[Appium] platformName: ‘iOS’
[Appium] locale: ‘en_GB’
[Appium] version: ‘’
[Appium] deviceName: ‘iPhone 6s’
[Appium] platform: ‘MAC’
[Appium] noReset: true
[MJSONWP] Responding to client with driver.createSession() result: {“webStorageEnabled”:false,“locationContextEnabled”:false,“browserName”:“”,“platform”:“MAC”,“javascriptEnabled”:true,“databaseEnabled”:false,"takes…
[HTTP] ← POST /wd/hub/session 500 299 ms - 189

Also sometimes I see error “Bad app” but everything fine with path to application.

3 Likes

I’m also getting the same error as well, along with the occasional ‘Bad App’ error. I have not been able to resolve this, and was forced to downgrade to 1.4.13.

Did you find a solution? I hope the Appium team looks into this… There is definitely a bug when running tests on after the other, at least on iOS.

I have experienced similar behavior on 1.5.2.

If I start a second client session after the first session has ended I get following error (same as OP), even when the Override Existing Sessions option is on in the Appium GUI and I can see it’s launching the server with that flag.

A new session could not be created. Details: Problem getting session data for driver type IosDriver; does it implement ‘get driverData’

I have been manually stopping the server between runs during development but this will become an issue when we start executing them consecutively during testing cycles.

Perhaps I’m missing something in my setup or client code?

Issue already reported, should be working on 1.5.3

1 Like

@norekinc --session-override where we need to define it ??

If you use command line:

appium -p «port» --session-override

If you use GUI, there is a checkbox for it in there.

1 Like

I am facing this issue on 1.5.3.

Its working fine on me. Are you using --session-override via command line or GUI?

Hi @Telmo_Cardoso, I am using GUI.

I dont use GUI for long time. Are you in OSX?

When you hit start server, it should print the appium start command and --session-override should be there, is it?

Yes, I am using OS X. I have pasted the logs upon starting the server.

Launching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ appium/build/lib/main.js --debug-log-spacing --automation-name “Appium” --platform-name “Android” --platform-version “4.4”

[Appium] Welcome to Appium v1.5.3

[Appium] Non-default server args:

[Appium] debugLogSpacing: true
[Appium] platformName: ‘Android’

[Appium] platformVersion: ‘4.4’
[Appium] automationName: ‘Appium’
[Appium] Deprecated server args:
[Appium] --platform-name => --default-capabilities ‘{“platformName”:“Android”}’
[Appium] --platform-version => --default-capabilities ‘{“platformVersion”:“4.4”}’
[Appium] --automation-name => --default-capabilities ‘{“automationName”:“Appium”}’

[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:

[Appium] platformName: ‘Android’
[Appium] platformVersion: ‘4.4’
[Appium] automationName: ‘Appium’

[Appium] Appium REST http interface listener started on 0.0.0.0:4723

Hey BVer, did you able to resolve this issue I am facing the same currently.

Hi @Telmo_Cardoso i am right now starting appium server using bat file “C:\Program Files (x86)\Appium\node.exe” “C:\Program Files (x86)\Appium\node_modules\appium\bin\appium.js” .Is there any way i can implement --session-override here?
Also advise on the code if i want to start appium server programmatically and use session override how can i do it.
it would be great help if you could share your code for starting appium server and using --session-override.

thanks