[ Bug]: Firefox driver fails when used in Selenium Grid

Author: ablokCreated Apr 29, 2024Updated Jul 3, 2026
LabelsR-awaiting-answer

What happened?

When I run a very simple test locally against Chrome, Edge and Firefox, the test passes without any issue. However, if I run the same test against a Selenium Docker grid, the Firefox test seems to fail. I created a sample project here: https://github.com/ablok/selenium-firefox-issue

Command used to start Selenium Grid with Docker (or Kubernetes)

bash
See sample project: https://github.com/ablok/selenium-firefox-issue

Relevant log output

bash
This is the stacktrace I see:

WebDriverError: Failed to decode response from marionette
      at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:521:15)
      at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:514:13)
      at Executor.execute (node_modules/selenium-webdriver/lib/http.js:446:28)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Driver.execute (node_modules/selenium-webdriver/lib/webdriver.js:740:17)
      at async Object.thenFinally [as finally] (node_modules/selenium-webdriver/lib/promise.js:100:5)
      at async Context.<anonymous> (test.js:26:13)

Operating System

Mac M3

Docker Selenium version (image tag)

4.20.0-20240425

Selenium Grid chart version (chart version)

No response

Source: SeleniumHQ/docker-selenium