docker-selenium icon indicating copy to clipboard operation
docker-selenium copied to clipboard

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

Open ablok opened this issue 9 months ago • 7 comments

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)

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

Relevant log output

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

ablok avatar Apr 29 '24 10:04 ablok

@ablok, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

github-actions[bot] avatar Apr 29 '24 10:04 github-actions[bot]

Can you share the Grid logs, please?

diemol avatar Apr 29 '24 13:04 diemol

docker-compose.log

ablok avatar Apr 29 '24 13:04 ablok

@diemol I did add the docker logs yesterday. Is this what you are looking for? Or do you need more?

ablok avatar Apr 30 '24 19:04 ablok

Via logs, I saw a few messages that looks confused

firefox-1     | 2024-04-29T13:36:39.008880005Z 2024-04-29 13:36:39,008 INFO exited: browserleftoverscleanup (exit status 0; not expected)
firefox-1     | 2024-04-29T13:36:40.233644881Z 2024-04-29 13:36:40,233 INFO spawned: 'browserleftoverscleanup' with pid 104
firefox-1     | 2024-04-29T13:36:40.262890714Z 2024-04-29 13:36:40,262 INFO exited: browserleftoverscleanup (exit status 0; not expected)
firefox-1     | 2024-04-29T13:36:43.036568882Z 2024-04-29 13:36:43,036 INFO exited: browserleftoverscleanup (exit status 0; not expected)
firefox-1     | 2024-04-29T13:36:46.051412883Z 2024-04-29 13:36:46,051 INFO spawned: 'browserleftoverscleanup' with pid 196
firefox-1     | 2024-04-29T13:36:46.082746592Z 2024-04-29 13:36:46,082 INFO exited: browserleftoverscleanup (exit status 0; not expected)
firefox-1     | 2024-04-29T13:36:47.087824384Z 2024-04-29 13:36:47,087 INFO gave up: browserleftoverscleanup entered FATAL state, too many start retries too quickly
...

VietND96 avatar May 03 '24 04:05 VietND96

I haven't had time to check this, @ablok

browserleftoverscleanup

I think we need to change the configuration so it does not restart unless it is enabled.

diemol avatar May 03 '24 08:05 diemol

@ablok try adjusting config on yaml for CPU and memory.. something like this...

containers:

resources:

limits:

cpu: 2300m

memory: 2600Mi

requests:

cpu: 1410m

memory: 1300Mi

e-dsouza avatar Jul 10 '24 18:07 e-dsouza