Install firefox driver on Ubuntu 16.04.3 LTS

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I have installed firefox driver on Ubuntu 16.04.3 LTS and it's installed under



$ which firefox
/usr/bin/firefox


I am using the following simple python script to test selenium



#!/usr/bin/env python
from pyvirtualdisplay import Display
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
display = Display(visible=0, size=(1024, 768))
display.start()
#binary = FirefoxBinary('/usr/bin/firefox')
browser = webdriver.Firefox()
browser.get('http://www.ubuntu.com/')
print(browser.page_source)
browser.close()
display.stop()


I am getting the following errors:



File "tests.py", line 16, in <module>
browser = webdriver.Firefox()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 162, in __init__
keep_alive=True)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 1


Complete version information:



Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial


This is a 100% OS issue because on other OSes like Windows and macOS I have tested, and the code works. Any assistance will be appreciated.



Which reading the suggested duplicate thread provided one of the solution was to look into geckodriver.log. My geckodriver.log stated



1524778083599 geckodriver INFO geckodriver 0.20.1
1524778083603 geckodriver INFO Listening on 127.0.0.1:58448
1524778084607 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.xBi1jOarZ06h"
Failed to connect to Mir: Failed to connect to server socket: No such file or directory


In command line I exported the display like



$ export DISPLAY=:0


After export, geckodriver.log is stating



 1524778146749 geckodriver INFO geckodriver 0.20.1
1524778146753 geckodriver INFO Listening on 127.0.0.1:55524
1524778147756 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.nWOzb0ngG3gm"


But now I am getting following error on the command line



Traceback (most recent call last):
File "tests.py", line 16, in <module>
browser = webdriver.Firefox()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 162, in __init__
keep_alive=True)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Failed to start browser /usr/bin/firefox: other os error






share|improve this question






















  • Possible duplicate on Stack Overflow: Webdriver Exception:Process unexpectedly closed with status: 1. There are some other questions about the same issue on Stack Overflow.
    – wjandrea
    Apr 26 at 21:25











  • @wjandrea already read and posted the feedback in the question
    – spider22
    Apr 26 at 21:35










  • OK, looks like you're making progress. Please keep researching the issue. I've found more questions related to the error you're currently getting. If it wasn't clear, we expect you to thoroughly research an issue before asking a question. See How to Ask
    – wjandrea
    Apr 26 at 21:46






  • 1




    Under which display server are you running Firefox and Selenium? One of the error messages is “Failed to connect to Mir”.
    – David Foerster
    Apr 27 at 20:43














up vote
0
down vote

favorite












I have installed firefox driver on Ubuntu 16.04.3 LTS and it's installed under



$ which firefox
/usr/bin/firefox


I am using the following simple python script to test selenium



#!/usr/bin/env python
from pyvirtualdisplay import Display
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
display = Display(visible=0, size=(1024, 768))
display.start()
#binary = FirefoxBinary('/usr/bin/firefox')
browser = webdriver.Firefox()
browser.get('http://www.ubuntu.com/')
print(browser.page_source)
browser.close()
display.stop()


I am getting the following errors:



File "tests.py", line 16, in <module>
browser = webdriver.Firefox()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 162, in __init__
keep_alive=True)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 1


Complete version information:



Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial


This is a 100% OS issue because on other OSes like Windows and macOS I have tested, and the code works. Any assistance will be appreciated.



Which reading the suggested duplicate thread provided one of the solution was to look into geckodriver.log. My geckodriver.log stated



1524778083599 geckodriver INFO geckodriver 0.20.1
1524778083603 geckodriver INFO Listening on 127.0.0.1:58448
1524778084607 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.xBi1jOarZ06h"
Failed to connect to Mir: Failed to connect to server socket: No such file or directory


In command line I exported the display like



$ export DISPLAY=:0


After export, geckodriver.log is stating



 1524778146749 geckodriver INFO geckodriver 0.20.1
1524778146753 geckodriver INFO Listening on 127.0.0.1:55524
1524778147756 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.nWOzb0ngG3gm"


But now I am getting following error on the command line



Traceback (most recent call last):
File "tests.py", line 16, in <module>
browser = webdriver.Firefox()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 162, in __init__
keep_alive=True)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Failed to start browser /usr/bin/firefox: other os error






share|improve this question






















  • Possible duplicate on Stack Overflow: Webdriver Exception:Process unexpectedly closed with status: 1. There are some other questions about the same issue on Stack Overflow.
    – wjandrea
    Apr 26 at 21:25











  • @wjandrea already read and posted the feedback in the question
    – spider22
    Apr 26 at 21:35










  • OK, looks like you're making progress. Please keep researching the issue. I've found more questions related to the error you're currently getting. If it wasn't clear, we expect you to thoroughly research an issue before asking a question. See How to Ask
    – wjandrea
    Apr 26 at 21:46






  • 1




    Under which display server are you running Firefox and Selenium? One of the error messages is “Failed to connect to Mir”.
    – David Foerster
    Apr 27 at 20:43












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have installed firefox driver on Ubuntu 16.04.3 LTS and it's installed under



$ which firefox
/usr/bin/firefox


I am using the following simple python script to test selenium



#!/usr/bin/env python
from pyvirtualdisplay import Display
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
display = Display(visible=0, size=(1024, 768))
display.start()
#binary = FirefoxBinary('/usr/bin/firefox')
browser = webdriver.Firefox()
browser.get('http://www.ubuntu.com/')
print(browser.page_source)
browser.close()
display.stop()


I am getting the following errors:



File "tests.py", line 16, in <module>
browser = webdriver.Firefox()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 162, in __init__
keep_alive=True)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 1


Complete version information:



Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial


This is a 100% OS issue because on other OSes like Windows and macOS I have tested, and the code works. Any assistance will be appreciated.



Which reading the suggested duplicate thread provided one of the solution was to look into geckodriver.log. My geckodriver.log stated



1524778083599 geckodriver INFO geckodriver 0.20.1
1524778083603 geckodriver INFO Listening on 127.0.0.1:58448
1524778084607 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.xBi1jOarZ06h"
Failed to connect to Mir: Failed to connect to server socket: No such file or directory


In command line I exported the display like



$ export DISPLAY=:0


After export, geckodriver.log is stating



 1524778146749 geckodriver INFO geckodriver 0.20.1
1524778146753 geckodriver INFO Listening on 127.0.0.1:55524
1524778147756 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.nWOzb0ngG3gm"


But now I am getting following error on the command line



Traceback (most recent call last):
File "tests.py", line 16, in <module>
browser = webdriver.Firefox()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 162, in __init__
keep_alive=True)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Failed to start browser /usr/bin/firefox: other os error






share|improve this question














I have installed firefox driver on Ubuntu 16.04.3 LTS and it's installed under



$ which firefox
/usr/bin/firefox


I am using the following simple python script to test selenium



#!/usr/bin/env python
from pyvirtualdisplay import Display
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
display = Display(visible=0, size=(1024, 768))
display.start()
#binary = FirefoxBinary('/usr/bin/firefox')
browser = webdriver.Firefox()
browser.get('http://www.ubuntu.com/')
print(browser.page_source)
browser.close()
display.stop()


I am getting the following errors:



File "tests.py", line 16, in <module>
browser = webdriver.Firefox()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 162, in __init__
keep_alive=True)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 1


Complete version information:



Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial


This is a 100% OS issue because on other OSes like Windows and macOS I have tested, and the code works. Any assistance will be appreciated.



Which reading the suggested duplicate thread provided one of the solution was to look into geckodriver.log. My geckodriver.log stated



1524778083599 geckodriver INFO geckodriver 0.20.1
1524778083603 geckodriver INFO Listening on 127.0.0.1:58448
1524778084607 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.xBi1jOarZ06h"
Failed to connect to Mir: Failed to connect to server socket: No such file or directory


In command line I exported the display like



$ export DISPLAY=:0


After export, geckodriver.log is stating



 1524778146749 geckodriver INFO geckodriver 0.20.1
1524778146753 geckodriver INFO Listening on 127.0.0.1:55524
1524778147756 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.nWOzb0ngG3gm"


But now I am getting following error on the command line



Traceback (most recent call last):
File "tests.py", line 16, in <module>
browser = webdriver.Firefox()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 162, in __init__
keep_alive=True)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Failed to start browser /usr/bin/firefox: other os error








share|improve this question













share|improve this question




share|improve this question








edited Apr 27 at 18:54









Zanna

48k13119227




48k13119227










asked Apr 26 at 21:19









spider22

11




11











  • Possible duplicate on Stack Overflow: Webdriver Exception:Process unexpectedly closed with status: 1. There are some other questions about the same issue on Stack Overflow.
    – wjandrea
    Apr 26 at 21:25











  • @wjandrea already read and posted the feedback in the question
    – spider22
    Apr 26 at 21:35










  • OK, looks like you're making progress. Please keep researching the issue. I've found more questions related to the error you're currently getting. If it wasn't clear, we expect you to thoroughly research an issue before asking a question. See How to Ask
    – wjandrea
    Apr 26 at 21:46






  • 1




    Under which display server are you running Firefox and Selenium? One of the error messages is “Failed to connect to Mir”.
    – David Foerster
    Apr 27 at 20:43
















  • Possible duplicate on Stack Overflow: Webdriver Exception:Process unexpectedly closed with status: 1. There are some other questions about the same issue on Stack Overflow.
    – wjandrea
    Apr 26 at 21:25











  • @wjandrea already read and posted the feedback in the question
    – spider22
    Apr 26 at 21:35










  • OK, looks like you're making progress. Please keep researching the issue. I've found more questions related to the error you're currently getting. If it wasn't clear, we expect you to thoroughly research an issue before asking a question. See How to Ask
    – wjandrea
    Apr 26 at 21:46






  • 1




    Under which display server are you running Firefox and Selenium? One of the error messages is “Failed to connect to Mir”.
    – David Foerster
    Apr 27 at 20:43















Possible duplicate on Stack Overflow: Webdriver Exception:Process unexpectedly closed with status: 1. There are some other questions about the same issue on Stack Overflow.
– wjandrea
Apr 26 at 21:25





Possible duplicate on Stack Overflow: Webdriver Exception:Process unexpectedly closed with status: 1. There are some other questions about the same issue on Stack Overflow.
– wjandrea
Apr 26 at 21:25













@wjandrea already read and posted the feedback in the question
– spider22
Apr 26 at 21:35




@wjandrea already read and posted the feedback in the question
– spider22
Apr 26 at 21:35












OK, looks like you're making progress. Please keep researching the issue. I've found more questions related to the error you're currently getting. If it wasn't clear, we expect you to thoroughly research an issue before asking a question. See How to Ask
– wjandrea
Apr 26 at 21:46




OK, looks like you're making progress. Please keep researching the issue. I've found more questions related to the error you're currently getting. If it wasn't clear, we expect you to thoroughly research an issue before asking a question. See How to Ask
– wjandrea
Apr 26 at 21:46




1




1




Under which display server are you running Firefox and Selenium? One of the error messages is “Failed to connect to Mir”.
– David Foerster
Apr 27 at 20:43




Under which display server are you running Firefox and Selenium? One of the error messages is “Failed to connect to Mir”.
– David Foerster
Apr 27 at 20:43















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028548%2finstall-firefox-driver-on-ubuntu-16-04-3-lts%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028548%2finstall-firefox-driver-on-ubuntu-16-04-3-lts%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491