selenium: [πŸ› Bug]: Firefox and Edge Browser not launching on a Jenkins Linux Container

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 a new session. Response code 500. Message: unknown error: unrecognized Microsoft Edge version: Chrome/114.0.5735.90 
Host info: host: 'k8s-alm-pod-large-mem-oci-142hh', ip: '192.168.211.176'
Build info: version: '4.11.0', revision: '040bc5406b'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.14.35-2047.502.4.el7uek.x86_64', java.version: '17.0.5-ea'
Driver info: org.openqa.selenium.edge.EdgeDriver

Firefox:
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 400. Message: binary is not a Firefox executable 
Host info: host: 'k8s-alm-pod-large-mem-oci-142hh', ip: '192.168.211.176'
Build info: version: '4.11.0', revision: '040bc5406b'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.14.35-2047.502.4.el7uek.x86_64', java.version: '17.0.5-ea'
Driver info: org.openqa.selenium.firefox.FirefoxDriver

Selenium Manager Output:
+ src/test/resources/drivers/chromedriver/linux/selenium-manager --browser firefox --debug
DEBUG	Checking geckodriver in PATH
DEBUG	Running command: geckodriver --version
DEBUG	Output: ""
DEBUG	geckodriver not found in PATH
DEBUG	Checking firefox in PATH
DEBUG	Running command: which firefox
DEBUG	Output: "/usr/local/firefox/firefox"
DEBUG	Found firefox in PATH: /usr/local/firefox/firefox
DEBUG	Using shell command to find out firefox version
DEBUG	Running command: /usr/local/firefox/firefox -v
DEBUG	Output: "Mozilla Firefox 113.0.2"
DEBUG	Detected browser: firefox 113.0.2
DEBUG	Required driver: geckodriver 0.33.0
DEBUG	Driver URL: https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux64.tar.gz
INFO	Driver path: /home/jenkins/.cache/selenium/geckodriver/linux64/0.33.0/geckodriver
+ src/test/resources/drivers/chromedriver/linux/selenium-manager --browser edge --debug
DEBUG	Checking msedgedriver in PATH
DEBUG	Running command: msedgedriver --version
DEBUG	Output: ""
DEBUG	msedgedriver not found in PATH
DEBUG	Checking edge in PATH
DEBUG	Running command: which edge
DEBUG	Output: ""
DEBUG	edge not found in PATH
DEBUG	edge has not been discovered in the system
WARN	The version of edge cannot be detected. Trying with latest driver version
DEBUG	Reading msedgedriver latest version from https://msedgedriver.azureedge.net/LATEST_STABLE
DEBUG	Latest msedgedriver major version is 115
DEBUG	Reading msedgedriver version from https://msedgedriver.azureedge.net/LATEST_RELEASE_115_LINUX
DEBUG	Required driver: msedgedriver 115.0.1901.188
DEBUG	Driver URL: https://msedgedriver.azureedge.net/115.0.1901.188/edgedriver_linux64.zip
INFO	Driver path: /home/jenkins/.cache/selenium/msedgedriver/linux64/115.0.1901.188/msedgedriver

Operating System

Docker Linux

Selenium version

4.11.0

What are the browser(s) and version(s) where you see this issue?

Firefox 113.0.2, MS EDGE 115

What are the browser driver(s) and version(s) where you see this issue?

msedgedriver 115.0.1901.188, geckodriver 0.33.0

Are you using Selenium Grid?

no

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 44 (23 by maintainers)

Most upvoted comments

Maybe I need to stop replying to these by phone. Not sure why I thought this was JS (sorry @harsha509). Actually, yes I do, the location of Selenium Manager is wrong for Java.

I’m expecting to see a line in the logs with browser location. Since it isn’t there it makes me think you are somehow using an old version of the SM binary, except I don’t know how that’s possible, so I wanted to see the full logs thinking something in there might shed light on things. Are you doing something with the manager?