question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IOSDriver cannot be created from AppiumDriverLocalService, because of Problem getting session data for driver type IosDriver

See original GitHub issue

Description

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)

Environment

  • java client build version or git revision if you use some shapshot: 3.4.0
  • Appium server version or git revision you is use some shapshot:1.5.0
  • Desktop OS/version used to run Appium if necessary:Mac OS X 10.11
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: 5.6.0
  • Mobile platform/version under test: 8.1.1
  • Real device or emulator/simulator: iphone 5s

Details

I run my test in testng I created AppiumDriverLocalService and started() it in @BeforeSuite then in @BeforeTest I created IOSDriver as follow:

IOSDriver<MobileElement> iosDriver = new IOSDriver<>(getLocalService().getUrl(), desiredCapabilities);

But this statement got stacks

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)

detailed full logs, please see https://gist.github.com/truebit/f017d57fc887ec0e3be6

Code To Reproduce Issue [ Good To Have ]

None

Ecxeption stacktraces

https://gist.github.com/truebit/f017d57fc887ec0e3be6

Link to Appium logs

https://gist.github.com/truebit/f017d57fc887ec0e3be6

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
juhlilacommented, Jun 23, 2016

I just restarted appium and it worked for me

0reactions
shahulprofilecommented, Jul 20, 2017

Run Appium. It will create new session, Find the port number. (always it will be like - address “127.0.0.1” --robot- port 4) Port number should match with the capability.

Example: If my port number is 4, then

	AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4/wd/hub"),cap);

Thanks, Shameed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to start appium service by AppiumDriverLocalSerivce
Hi Guys, Now i am trying to use page object model to design my selenium + appium framework. I wan to start the...
Read more >
[MacOS Ventura 13.0.1] Unable to test real iOS device
I can inspect the device with Appium inspector but i cant with ... SessionNotCreatedException: Unable to create a new remote session.
Read more >
org.openqa.selenium.SessionNotCreatedException: A new ...
This happens because the previous session wasn't shutdown properly and it happens when there is exception thrown in your test. Restart the appium...
Read more >
Automated App Testing Using Appium With TestNG [Tutorial]
However, Android and iOS are the major platforms because many people use smartphones compared to desktops for accessing web applications. As per ...
Read more >
appium/java-client - Gitter
SessionNotCreatedException: A new session could not be created. Details: Problem getting session data for driver type AndroidDriver; does it implement 'get ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found