Skip to content

[🐛 Bug]: Timeout when running Saucelabs tests on Selenium 4.9.0+ using JdkHttpClient #12069

@Artur-

Description

@Artur-

What happened?

When running multiple Saucelabs tests in parallel we see a lot of timeouts when trying to upgrade from Selenium 4.8.3 to 4.9.0.

The errors are timeouts creating drivers or org.openqa.selenium.WebDriverException: Invalid message: ERROR Internal Server Error or Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Handshake response does not match any supported protocol (which might be that same but obfuscated because of #11927)

After bisecting the issue, we see that this is caused by #11816. It seems a bit like Saucelabs uses redirects when waiting for a session to be available and Selenium no longer correctly follows those

How can we reproduce the issue?

https://github.com/vaadin/testbench/pull/1645 is our test PR which shows the problem when run in our CI. Not sure how to reproduce it elsewhere as it does not reproduce locally. Potentially by running more tests in parallel than available Saucelabs slots, so the tests have to wait for a driver for more than 30-60s.

Relevant log output

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Handshake response does not match any supported protocol 

or

org.openqa.selenium.WebDriverException: Invalid message: ERROR Internal Server Error

Operating System

Linux, version 4.14.231-173.361.amzn2.x86_64

Selenium version

4.9.1

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

Unrelated

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

Unrelated

Are you using Selenium Grid?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-javaJava BindingsI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions