I am trying to run my first test through Appium and getting the below error.
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Orig
Though this issue is quite an old one and a lot of definition has changed on appium client usage along with the chrome driver version updates as well. Yet to what I could figure out was that the issue here was this from the logs :
ERROR: error: Chromedriver create session did not work. Status was 200 and body was {"sessionId":"ba9a494082776d6b4836da850072cbcb","status":13,"value":{"message":"unknown error: Device emulator-5554 is already in use\n (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86)"}}
which resulted further into :
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Did not get session redirect from Chromedriver) (WARNING: The server did not provide any stacktrace information)
and hence SessionNotCreatedException.
Simpler fix to this could be ensuring no other session is in progress before initiating another to avoid conflicts of ports and session failure.