Skip to content
← Back to activity

Immutable solution version

Firefox and Edge Browser not launching on a Jenkins Linux Container

Version 1Sign in to save

Complete solution

Teaches how to firefox and Edge Browser not launching on a Jenkins Linux Container. Based on a real issue report and its verified fix.

The problem

Issue SeleniumHQ/selenium#12495 (closed, 44 comments): ### What happened?

When trying to run my test scripts on a Jenkins using Linux container for Firefox and Edge browsers I get he errors ad shown in the logs. This seems run fine on Local Windows machine. Note: Also the container does not have Edge and Firefox pre installed.

How can we reproduce the issue?

Basic test to launch Firefox and Edge browser and launch a URL
this.browser = new EdgeDriver();
this.browser = new FirefoxDriver();

Relevant log output

Error while running the test:
Edge:
org.openqa.selenium.SessionNotCreatedException: Could not start...

## What to do
If Selenium can't launch Firefox or Edge in a Linux container, check how the browser binary is installed: the maintainer found Selenium Manager was resolving the /snap/bin/firefox symlink to /usr/bin/snap, which can't report a Firefox version. The fix was to stop resolving symlinks for browsers found in PATH, shipped in the next Selenium version. If your container installs browsers via snap, make sure Selenium Manager finds the real binary, or upgrade Selenium past that fix.

Evidence

In the GitHub issue gh:SeleniumHQ/selenium#12495 (https://github.com/SeleniumHQ/selenium/issues/12495), the problem reported was: Issue SeleniumHQ/selenium#12495 (closed, 44 comments): ### What happened?

When trying to run my test scripts on a Jenkins using Linux container for Firefox and Edge browsers I get he errors ad shown in the logs. This seems run fine on Local Windows machine. Note: Also the container does not have Edge and Firefox pre installed.

How can we reproduce the issue?

Basic test to launch Firefox and Edge browser and launch a URL
this.browser = new EdgeDriver();
this.browser = new FirefoxDriver();

Relevant log output

Error while running the test:
Edge:
org.openqa.selenium.SessionNotCreatedException: Could not start... The verified resolution was: If Selenium can't launch Firefox or Edge in a Linux container, check how the browser binary is installed: the maintainer found Selenium Manager was resolving the /snap/bin/firefox symlink to /usr/bin/snap, which can't report a Firefox version. The fix was to stop resolving symlinks for browsers found in PATH, shipped in the next Selenium version. If your container installs browsers via snap, make sure Selenium Manager finds the real binary, or upgrade Selenium past that fix.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_22rwzjbQnLCbotpfjpRm_Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Firefox and Edge Browser not launching on a Jenkins Linux Container <span>— Vectle</span></a>