selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status: 1

3,238 views
Skip to first unread message

shari...@gmail.com

unread,
Dec 31, 2017, 10:26:19 PM12/31/17
to Selenium Users
I'm trying to set up Selenium to work with Python on Ubuntu. Can't get through Example 0 from https://pypi.python.org/pypi/selenium.

Python code:
from selenium import webdriver

browser = webdriver.Firefox()
browser.get('http://seleniumhq.org/')

Python error:

Traceback (most recent call last):                                                                                              
 
File "seleniumsearch.py", line 3, in <module>                                                                                
    browser
= webdriver.Firefox()                                                                                              
 
File "/home/ulrich/.local/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 158, in __init__        
    keep_alive
=True)                                                                                                            
 
File "/home/ulrich/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__          
   
self.start_session(desired_capabilities, browser_profile)                                                                  
 
File "/home/ulrich/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session    
    response
= self.execute(Command.NEW_SESSION, parameters)                                                                    
 
File "/home/ulrich/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 311, in execute          
   
self.error_handler.check_response(response)                                                                                
 
File "/home/ulrich/.local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 237, in check_response
   
raise exception_class(message, screen, stacktrace)                                                                          
selenium
.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status: 1  

geckodriver.log:
1514678080494   geckodriver     INFO    geckodriver 0.19.1                                                                                                                                                        
1514678080497   geckodriver     INFO    Listening on 127.0.0.1:48255                                                                                                                                              
1514678081608   mozrunner::runner       INFO    Running command: "/usr/bin/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.mL3I0GKtdR15"                                                                  
No protocol specified                                                                                                                                                                                              
Unable to init server: Could not connect: Connection refused                                                                                                                                                      
Error: cannot open display: :0

Version info:
Ubuntu 17.10
Firefox Quantum 57.0.3 (64 bit)
Selenium 3.8.0
geckodriver v0.19.1 (linux 64 bit)

Other (possibly) relevant info:
~/Documents/demos/python # pgrep -a X                                                                                                                                                                              
934 /usr/bin/Xwayland :1024 -rootless -terminate -core -listen 4 -listen 5 -displayfd 6                                                                                                                            
1305 /usr/bin/Xwayland :0 -rootless -terminate -core -listen 4 -listen 5 -displayfd 6                                                                                                                              
~/Documents/demos/python # echo $DISPLAY                                                                                                                                                                          
:0                                                                                                                                                                                                                
~/Documents/demos/python # lspci | grep -e VGA -e 3D                                                                                                                                                              
00:02.0 VGA compatible controller: Intel Corporation Device 5917 (rev 07)                                                                                                                                          
00:13.0 Non-VGA unclassified device: Intel Corporation Device 9d35 (rev 21)


I appreciate the help!

shari...@gmail.com

unread,
Jan 1, 2018, 5:11:39 PM1/1/18
to Selenium Users
I'm willing to pay for help via PayPal. I'll pay up front if you can prove you're an active member in this group.

Reply all
Reply to author
Forward
0 new messages