Skip to content

[🐛 Bug]: Handshake response Exception either incorrect or hiding the real issue. #11927

@titusfortner

Description

@titusfortner

What happened?

Now that Selenium does not support JWP, we can remove some of the Handshake code bits.

This error in particular is masking the reason why it is not seen as a valid w3c payload:
https://github.com/SeleniumHQ/selenium/blob/selenium-4.9.0/java/src/org/openqa/selenium/remote/ProtocolHandshake.java#L146

To hit that line, the response from the server had an HTTP code of 200, so the driver/grid thought it was valid. At the very least we need to include the capabilities that were returned, or what makes us think it isn't valid w3c.

How can we reproduce the issue?

Unknown, because the exception is hiding the problem.

Relevant log output

2023-04-22 19:53:02 FINE - Executing: newSession [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*], extensions: []}, platformName: ANY, sauce:options: {access_key: foo..., name: waitForNonExistant[ANY_Chro..., tunnelIdentifier: bar, username: baz}}]}] 
2023-04-22 19:53:02 FINE - Exception: newSession Could not start a new session. Handshake response does not match any supported protocol

Operating System

N/A

Selenium version

Java 4.9

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

Chrome

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

latest

Are you using Selenium Grid?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-javaJava BindingsI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions