Hans
Hans

Reputation: 750

Firefox crashes on driver last window close

I have a project that sometimes uses multiple FF windows and sometimes multiple FF drivers. During init, I create a custom FirefoxProfile (or load a default from Selenium without any changes), add it to DesiredCapabilities, add capabilities to FirefoxOptions and start FF with FirefoxOptions.

Test case executes fine, until I need to close the window:

driver.getWindowHandles().forEach(name -> driver.switchTo().window(name).close());

or

driver.quit();

After either one of these pass, FF shuts down and "Firefox has crashed" popup appears. No exception is shown in logs.

enter image description here

If I remove FirefoxProfile, no crash popup appears, but FirefoxProfile is needed to enable Flash support and do more.

Using:

Upvotes: 9

Views: 534

Answers (2)

Florent B.
Florent B.

Reputation: 42518

The driver is failing to properly terminate the sub processes created by Firefox like flash.

https://github.com/mozilla/geckodriver/issues/285

To avoid the dialogue box, you can set the environemnt variable XRE_NO_WINDOWS_CRASH_DIALOG to 1.

Upvotes: 6

user6071082
user6071082

Reputation:

Yeah the same error happened for me as well. I've tried all possibilities but nothing did works except downgrading the firefox.

Now I've 46.01 which is working for me without crash issue.

Upvotes: 3

Related Questions