Selenium / chromedriver stopped working:WebDriverException: Message: session not created exception

2,541 views
Skip to first unread message

John Paxton

unread,
Jan 14, 2017, 12:40:05 AM1/14/17
to webdriver

Greetings, 

I wasn't sure if this issue is better in the chromedrivers mailing list but there appears to be material closer to what I'm trying to do  here. 

Up until  three weeks ago I had no issues connecting to Chrome  via selenium/python 3.6 to drive it. 

Now I can't even  attach to chrome  through the python shell. I've  tried  the current chromedriver version 2.27 all the way back to 2.24  same result. I can still use FF.  

e.g., in the python shell 

from selenium import webdriver
driver = webdriver.Chrome() 

Immediately shows me this.   Not hanging just an immediate shutdown.    

=================== RESTART: C:\chromedriver\sel test2.py ===================
Traceback (most recent call last):
  File "C:\chromedriver\sel test2.py", line 4, in <module>
    driver = webdriver.Chrome()
  File "C:\Users\jpaxton\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
    desired_capabilities=desired_capabilities)
  File "C:\Users\jpaxton\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 92, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "C:\Users\jpaxton\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 179, in start_session
    response = self.execute(Command.NEW_SESSION, capabilities)
  File "C:\Users\jpaxton\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute
    self.error_handler.check_response(response)
  File "C:\Users\jpaxton\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: session not created exception
from disconnected: Unable to receive message from renderer
  (Session info: chrome=55.0.2883.87)
  (Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Windows NT 6.1.7601 SP1 x86_64)
 selenium 3.02 

darrell grainger

unread,
Jan 15, 2017, 4:08:31 PM1/15/17
to webdriver
Selenium can be very cryptic when you don't have all the right version. If you go into Chrome and enter: chrome://version/ into the address bar you can find out which version of Chrome you are currently using. If you go to https://www.chromium.org/developers/calendar you can figure out what date your version of Chrome was released. For example, I have Chrome 55.0 installed. So my Chrome was released Oct 6th, 2016. Any version of ChromeDriver.exe released before Oct 6th, 2016 could not have been tested with Chrome 55.0. So I want to use a ChromeDriver.exe which was released shortly after Oct 6th, 2016. 

If I go to http://chromedriver.storage.googleapis.com/index.html and search, i find that ChromeDriver.exe 2.25 was released on Oct 22nd, 2016. So that is the ChromeDriver.exe I want to use.

Next is the version of Selenium bindings. You want bindings which were also released after your version of Chrome. Since my version of Chrome was released in Oct 6th, 2016. Since you are interested in Python bindings, I go to https://github.com/SeleniumHQ/selenium/tree/master/py. Then I change the MASTER to a different TAG. The last tag from Selenium 2.x is version 2.53. When I check the last commitment I see it was Mar 15, 2016. This is very old. It is doubtful that these bindings have been tested with Chrome 55.0. If I check Selenium 3.0.0 I see it had the last commitment on Oct 12th, 2016. So I must use Selenium 3.0.0 bindings.

You need to do the same thing for your version of Chrome.

If you do all this and it still doesn't work, then maybe it is the version of Python you are using.

John Paxton

unread,
Jan 16, 2017, 10:38:55 PM1/16/17
to webdriver
Darrel, 

Thanks for the reply,   I have basically the latest release for each element,  Browser, driver, selenium and it all used to work.  I  have tried two variants,  3.5 and 3.6 of  python,   going to remove it all and try again,  If not  It looks like there's a new release of Chrome coming on  1/ 19 so  maybe that  automagically fixes it ( Not basing that on anything other than optimism :)  

have fun 


John 

darrell grainger

unread,
Jan 17, 2017, 8:21:46 AM1/17/17
to webdriver
I know with Python, sometimes having the latest is an issue. I have not using the Python binding in 9 years. Have they moved to 3.x? I'd hope so in 9 years but I have since some Python projects which still require 2.7. The last Python I used was also 3.3. I remember there was significant different between 2.6 and 2.7. Does the Python bindings work with 3.5 or 3.6? Are there significant differences between 3.3 and 3.5? A quick look at the changelog for Python bindings and I do see 3.2+. Considering the Python bindings for Selenium 2.x are almost a year old, I'd question whether they are keeping up with the latest Python. Downgrading to Python 3.2 might be a possible solution.

Getting the different versions correct has always been a issue with most the bindings. There used to be a CI site that the Selenium team ran all the tests with. I used to go there and see which version of language, bindings, drivers, etc. they tested with and just make sure I was using the same. They used to guarantee supporting the last three versions. So being off by one or two versions shouldn't be an issue with the bindings.
Reply all
Reply to author
Forward
0 new messages