OS: Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-1066-aws x86_64)
Selenium Version: selenium==3.6.0
Browser: Mozilla Firefox 63.0
Geckodriver version : geckodriver-v0.19.0-linux64
Create a new firefox browser and do some steps - parsing the website.
Crashing with a log :-
self.driver = webdriver.Firefox()
File "/home/ubuntu/env/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 154, in __init__
keep_alive=True)
File "/home/ubuntu/env/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 151, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/home/ubuntu/env/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 240, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/ubuntu/env/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute
self.error_handler.check_response(response)
File "/home/ubuntu/env/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: newSession
Has anyone faced this issue before and has a possible solution ?
UPDATE :
Ran the following command : geckodriver --log trace & curl -d '{}' 127.0.0.1:4444/session
Log :- https://pastebin.com/TirTNKrG
I fixed the issue by updating the selenium python package and using the latest geckodriver.
Thanks @fzbd for all your help.
Additional context -
Refer to the compatibility chart here - https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html#supported-platforms
update selenium :
pip install -U selenium
update geckodriver (choose the correct version for your needs based on the above compatibility chart)
Check the versions for all components -
firefox -v
geckodriver -V
pip freeze | grep selenium
Thanks @skyfail. Your answer helped me. The following sequence was performed and resolved the issue.
To upgrade selenium run: sudo pip3 install selenium --upgrade
To upgrade geckodriver follow steps 1-3 from this
sudo mv geckodriver /usr/local/bin/geckodriver
, /usr/local/bin is usually in your PATH so no need to edit it.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With