SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
29.78k stars 8.02k forks source link

[🐛 Bug]: Selenium grid 4.21.0 is not backward compatible with any previous versions #14027

Closed Jiurong-Yang closed 1 month ago

Jiurong-Yang commented 1 month ago

What happened?

If you run your grid as version 4.21.0 then you have to make sure all of your nodes (relay for appium or selenium) are using 4.21.0. I Don't think this is intentional. Especially I found another defect with 4.21.0 as a web node the edge browser is not functioning on linux.

How can we reproduce the issue?

1). Setup a grid with selenium 4.21.0
2). Try to connect to the grid with a node running any other selenium version

Relevant log output

15:49:54.743 INFO [NodeServer$1.start] - Starting registration process for Node http://redacted:11001
15:49:54.745 INFO [NodeServer.execute] - Started Selenium node 4.20.0 (revision 866c76ca80): http://redacted:11001
15:49:54.780 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
15:50:04.795 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
15:50:14.807 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
15:50:24.819 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
15:50:34.829 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
15:50:44.837 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
15:50:54.845 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
15:51:04.853 INFO [NodeServer$1.lambda$start$1] - Sending registration event...

Please refer to this issue on why I would want to connect a node that is using an older version of selenium to the 4.21.0 grid.

https://github.com/SeleniumHQ/selenium/issues/14028

Operating System

Ubuntu

Selenium version

4.21.0

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

N/A

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

N/A

Are you using Selenium Grid?

4.21.0

github-actions[bot] commented 1 month ago

@Jiurong-Yang, 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!

diemol commented 1 month ago

You see Sending registration event... because you must open ports 4442 and 4443 for TCP traffic. This has worked like that since the first 4.x release.

We gave you hints on how to work with the issue on the other link.

On the other hand, it is expected to have all Grid components using the same version.

Jiurong-Yang commented 1 month ago

You see Sending registration event... because you must open ports 4442 and 4443 for TCP traffic. This has worked like that since the first 4.x release.

We gave you hints on how to work with the issue on the other link.

On the other hand, it is expected to have all Grid components using the same version.

I'm pretty sure port 4442, and 4443 are open. As machines using 4.21.0 can connect to the grid.

titusfortner commented 1 month ago

Your logs show your node version is 4.20, you need your hub and your node versions to match for 4.21

Jiurong-Yang commented 1 month ago

I'm telling you that was not a requirement before 4.21. Also with the enormous amount of bugs in selenium 4, I am forced to frankenstein my grid, I am not doing this because I want to.

The current grid that I have that's "stable" is composed of 4.11 and 4.5.3 nodes with 4.11 as the grid server

Now you say well just stick with what you have that's working why upgrade. Because there's a bug in 4.11 about the json depth issue when trying to query the grid API and I need that to implement some health checking. And also it seems the older version have huge memory problems.

Screenshot from 2024-05-28 13-48-47

I mean ~1.2 gb per relay server? How is anyone suppose to scale that

titusfortner commented 1 month ago

Right, it isn't always necessary, but a change was made in 4.21 that requires both node and hub to be upgraded.

The big change from 4.5 is Selenium Manager, at the very least that should have a better error message, but we'll have to see why it is giving you an error when it hasn't been reported by others.

github-actions[bot] commented 1 week ago

This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.