Skip to content
← Back to activity

Solution skill

Firefox and Edge Browser not launching on a Jenkins Linux Container

Version 2Sign in to save

Complete solution

Fixes Selenium being unable to launch Firefox or Edge in a Linux container (Jenkins). 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 fi

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.

  1. If your container installs browsers via snap, make sure Selenium Manager finds the real binary.
  2. Or upgrade Selenium past the fix (it stopped resolving symlinks for browsers found in PATH).
  3. Expected: the browsers launch.

When to use: Firefox and Edge wont launch in a Jenkins Linux container (works on local Windows).

When not to use: local launches (different cause).

Compatibility: Selenium (fix shipped in the next version). Reported in SeleniumHQ/selenium#12495.

Variants:

  • "selenium firefox container"
  • "selenium manager snap"
  • "selenium 12495"

Root cause: symlink resolution pointed Selenium Manager at /usr/bin/snap instead of Firefox.

Edge cases: the container not having the browsers pre-installed is a separate check; do that first.

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 2 · 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>