The browser appears to have exited before we could connect

194 views
Skip to first unread message

Venu

unread,
Apr 28, 2015, 2:22:50 AM4/28/15
to seleniu...@googlegroups.com
I have upgraded to Selenium 2.43 and Firefox 29 (selenium 2.33 , Firefox 16). I run my scripts in headless mode using pyvirtualdisplay.

Once in a while (say for every 4 days) I am getting below error:
Failed to retrieve Firefox Driver - Exception: Message: 'The browser appears to have exited before we could connect. The output was: Error: cannot open display: :1071\n' 

I got one link but it states that 1071 is related to serialization

And sometimes it hangs unconditionally at the starting point itself.
      firefoxdriver = webdriver.Firefox(firefox_profile=profile)

In my framework, 5 to 10 GUI scripts using selenium can run in parallel.

Can anyone let me know which factors lead to above conditions?

Message has been deleted

Venu

unread,
Jul 7, 2015, 2:57:45 AM7/7/15
to seleniu...@googlegroups.com
I am updating post with more details:

I have upgraded to Selenium 2.43 and Firefox 29 (selenium 2.33 , Firefox 16). I run my scripts in headless mode using pyvirtualdisplay.

Once in a while (say for every 4 days) I am getting below error:
Failed to retrieve Firefox Driver - Exception: Message: 'The browser appears to have exited before we could connect. The output was: Error: cannot open display: :1071\n' 

Failed to retrieve Firefox Driver - Exception: Message: 'The browser appears to have exited before we could connect. The output was: Error: cannot open display: :1342

Failed to retrieve Firefox Driver - Exception: Message: 'The browser appears to have exited before we could connect. The output was: Error: cannot open display: :1379\n'

Failed to retrieve Firefox Driver - Exception: Message: 'The browser appears to have exited before we could connect. The output was: Error: cannot open display: :1327\n'

I got one link but it states that 1071 is related to serialization

And sometimes it hangs unconditionally at the starting point itself.
      firefoxdriver = webdriver.Firefox(firefox_profile=profile)

In my framework, 50 to 80 scripts can run in parallel out of which 10 GUI scripts are included. Only GUI scripts use selenium other scripts use python.

Can anyone let me know which factors lead to above conditions?

SeleniumWebDriverAnalysis.xlsx

Alasdair Macmillan

unread,
Jul 17, 2015, 4:40:57 PM7/17/15
to seleniu...@googlegroups.com
Hi Venu,

Not sure, to be honest. Which backend are you running for pyvirtualdisplay?

It does sound like a case of Firefox failing to startup, rather than anything wrong with Selenium. The string "Error: cannot open display" implies that there could be something wrong with Firefox connecting to your X Server (firefox won't startup without being able to do that). Check the logs of your virtual X server, and if you're running Xephyr... check that wherever the window was running wasn't closed?

Note that if your virtual X server goes away while the Selenium Java process stays around, I would expect you would see an error like that.

Good luck,

Alasdair
Reply all
Reply to author
Forward
0 new messages