Did not get session redirect from Chromedriver

Thanks @SergeyTichomirov. Chromedriver verison v2.12 is supported and its working fine for me. I’m able to access the webviews. I have tried in LG Optimus G2 with android version v4.4.2 and replaced the old chromedriver (Appium v1.3.1)

Hi @PRABU90,

Could you please help me resolve this issue, as I am using 2.12 chrome driver but still getting error as below:
info: [debug] Connecting to chrome-backed webview

info: [debug] Creating Chrome session
info: [debug] Set chromedriver binary as: D:\Appium\Appium_1.2.3\node_modules\appium\build\chromedriver\windows\chromedriver.exe
info: [debug] Ensuring Chromedriver exists
info: [debug] Killing any old chromedrivers, running: FOR /F “usebackq tokens=5” %a in (netstat -nao ^| findstr /R /C:"9515 ") do (FOR /F “usebackq” %b in (TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe) do (IF NOT %b==“” TASKKILL /F /PID %b))
info: [debug] No old chromedrivers seemed to exist
info: [debug] Spawning chromedriver with: D:\Appium\Appium_1.2.3\node_modules\appium\build\chromedriver\windows\chromedriver.exe
info: [debug] [CHROMEDRIVER] Starting ChromeDriver 2.12.301325 (962dea43ddd90e7e4224a03fa3c36a421281abb7) on port 9515
Only local connections are allowed.
info: [debug] Making http request with opts: {“url”:“http://127.0.0.1:9515/wd/hub/session",“method”:“POST”,“json”:{“sessionId”:null,“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.ineight.im”,“androidUseRunningApp”:true,“androidDeviceSerial”:"Mi498HA14090211”}}}}
error: Chromedriver create session did not work. Status was 200 and body was {“sessionId”:“53b7d3a6c172c35387162179ac37be5f”,“status”:13,“value”:{“message”:“unknown error: Chrome version must be >= 36.0.1985.0\n (Driver info: chromedriver=2.12.301325 (962dea43ddd90e7e4224a03fa3c36a421281abb7),platform=Windows NT 6.1 SP1 x86_64)”}}
info: [debug] Responding to client with error: {“status”:13,“value”:{“message”:“An unknown server-side error occurred while processing the command. (Original error: Did not get session redirect from Chromedriver)”,“origValue”:“Did not get session redirect from Chromedriver”},“sessionId”:“4de9e089-96b5-4fb5-9927-45c5f83ab5d3”}
info: e[37m<-- POST /wd/hub/session/4de9e089-96b5-4fb5-9927-45c5f83ab5d3/context e[39me[31m500e[39me[90m 2233.437 ms - 280e[39m e[90me[39m
info: [debug] Didn’t get a new command in 60 secs, shutting down…
info: Shutting down appium session
info: [debug] Pressing the HOME button
info: [debug] executing: “D:\Android-SDK\platform-tools\adb.exe” -s Mi498HA14090211 shell “input keyevent 3”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“shutdown”}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…

Hi sujata_kalluri:

Only one chrome driver session is allowed at a time. Just check whether the driver is running in somewhere. Try this work-around: kill chrome driver process through task manager. It may work.

Hi @PRABU90,

I tried but did not work. Any other alternate?
Also, on my machine, I have Chrome version 39, but still in Appium logs it shows below lines:
unknown error: Chrome version must be >= 36.0.1985.0\n (Driver info: chromedriver=2.12.301325

Is there anything I am doing wrong?

Thanks,
Sujata

@sujata_kalluri: Have you deleted the chromedriver.exe under both the process tab and applications tab in task manager??

@PRABU90:

Yes, but i will retry again. I am using below versions of libraries:
Appium: 1.2.4.1
Selenium Jars: 2.43.1
Java Client: 2.0.0

Please let me know if these are compatible and/or if there are any changes required.

Thanks,
Sujata

Hi,

Issue is resolved using Chromedriver from below link:
https://dl.dropboxusercontent.com/u/2350370/chromedriver_dev.exe

Thanks,
Sujata

Hi,

Follow below steps!!!

Prerequistes	

a) Install Latest Chrome Driver
https://sites.google.com/a/chromium.org/chromedriver/
b) Replace Chrome Driver in Appium Installation folder
C:\MobileLatestDownloads\Appium\AppiumForWindows-1.0.0\AppiumForWindows\node_modules\appium\build\chromedriver\windows
c) Install Chrome in Device under test from Google Play Store ensure that in Settings-> App Manager-> Chrome Apk available

d) Desired Capabilities Used
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, “Android”);
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, “Chrome”);
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, “4.3”);
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "45454);

Regards,
Hariharan.

I’m still face the same problem.
Any other could help pls!
It is highly appreciated!!

I have tried in
-Android v4.4.2
-HTC device
-Appium version 1.3.4
-chromedriver version 2.1.4
-chrome version 40.0.2214.89

the server logs:

info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.xxxxx.yyyyy:web

info: [debug] [“WEBVIEW_com.xxxxx.yyyyy:web”]
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.xxxxx.yyyyy:web
info: [debug] Connecting to chrome-backed webview
info: [debug] Creating Chrome session
info: [debug] Set chromedriver binary as: D:\appium\AppiumForWindows\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe
info: [debug] Ensuring Chromedriver exists
info: [debug] Killing any old chromedrivers, running: FOR /F “usebackq tokens=5” %a in (netstat -nao ^| findstr /R /C:"9515 ") do (FOR /F “usebackq” %b in (TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe) do (IF NOT %b==“” TASKKILL /F /PID %b))
info: [debug] No old chromedrivers seemed to exist
info: [debug] Spawning chromedriver with: D:\appium\AppiumForWindows\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe
info: [debug] [CHROMEDRIVER] Starting ChromeDriver 2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf) on port 9515
Only local connections are allowed.
info: [debug] Making http request with opts: {“url”:“http://127.0.0.1:9515/wd/hub/session",“method”:“POST”,“json”:{“sessionId”:null,“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.xxxxx.yyyyy”,“androidUseRunningApp”:true,“androidDeviceSerial”:"HC47VWW06348”}}}}
error: Chromedriver create session did not work. Status was 200 and body was {“sessionId”:“3dfd06350740afefdeb6792783bcfec5”,“status”:100,“value”:{“message”:“chrome not reachable\n (Driver info: chromedriver=2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf),platform=Windows NT 6.1 SP1 x86_64)”}}
info: [debug] Responding to client with error: {“status”:13,“value”:{“message”:“An unknown server-side error occurred while processing the command. (Original error: Did not get session redirect from Chromedriver)”,“origValue”:“Did not get session redirect from Chromedriver”},“sessionId”:“a88f3898-7314-42d9-96b3-4c495655dcd8”}

i tried with 2.14 version of chrome…but still getting same error

Does your chome work fine when you launch it manually?

I tried with chrome beta 41m, it is launching manually in 4.4 kitkat, but automation tests are not running on chrome

PLz check process=chromedriver.exe in Task Manager (cltr+Alt+Del) before running ur test script
if it is there then delete that process and run again … ur problem is resolved.

Sergey, that’s great it is working well for me.

@ashokkumarg
I am happy :smile:

Hi all can any one please help on this…

new DesiredCapabilities();
DesiredCapabilities capabilities = DesiredCapabilities.android();
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, “chrome”);
capabilities.setCapability(MobileCapabilityType.PLATFORM, “Android”);
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,“Android”);
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,“Galaxy S4”);
capabilities.setCapability(MobileCapabilityType.VERSION, “4.4.2”);
capabilities.setCapability(“udid”,“4d009f0bb9363017”);

Server log:

info: [debug] Ensuring Chromedriver exists
info: [debug] Killing any old chromedrivers, running: FOR /F “usebackq tokens=5” %a in (netstat -nao ^| findstr /R /C:"9515 ") do (FOR /F “usebackq” %b in (TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe) do (IF NOT %b==“” TASKKILL /F /PID %b))
info: [debug] No old chromedrivers seemed to exist
info: [debug] Spawning chromedriver with: C:\Program Files (x86)\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe
info: [debug] [CHROMEDRIVER] Starting ChromeDriver 2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf) on port 9515
Only local connections are allowed.
info: [debug] Making http request with opts: {“url”:“http://127.0.0.1:9515/wd/hub/session",“method”:“POST”,“json”:{“sessionId”:null,“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.android.chrome”,“androidDeviceSerial”:"4d009f0bb9363017”}}}}
info: [debug] [CHROMEDRIVER STDERR] [0.002][SEVERE]: bind() returned an error: Only one usage of each socket address (protocol/network address/port) is normally permitted. (0x2740)
[0.003][WARNING]: Unknown error 10038 mapped to net::ERR_FAILED
info: [debug] [CHROMEDRIVER] Port not available. Exiting…
info: [debug] Chromedriver exited with code 1
info: [debug] Getting connected devices…
info: [debug] executing cmd: C:\Users\suresh.jashti\Downloads\ANDROID\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\platform-tools\adb.exe -s 4d009f0bb9363017 devices
error: Chromedriver create session did not work. Status was 200 and body was {“sessionId”:“34f3ad4f0d959e63ba1dc14c027e4ff4”,“status”:13,“value”:{“message”:“unknown error: Device 4d009f0bb9363017 is already in use\n (Driver info: chromedriver=2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf),platform=Windows NT 6.1 x86_64)”}}
info: [debug] Cleaning up appium session
info: [debug] Error: Did not get session redirect from Chromedriver
at null. (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\chromedriver.js:223:12)
at Request._callback (C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\common.js:121:5)

I have tried to delete the chromedriver to paster Chromedriver_dev as mention above, but system is not allowing to delete the exsiting file. Can any one please help on this :frowning:

Hi all am able to launch the test Url successfully in Samsung device. i have followed the steps mention by PRABU90 and sujata_kalluri.

i have used:

Eclipse Luna
Appium 1.3.7.2
Latest Selenium and JavaClient jars.

thanks,
Suresh jashti,

thanks all PRABU90, sujata_kalluri and other for Suggestion…

Thank U very much , It’s work :

  I use chromedriver2.12 to replace the old version ChromeDriver,and this problem closed . :grin::grin::grin::grin:

Thank u SergeyTichomirov.

===============================================

but it’s not work again。。。