Open farious2009 opened 3 months ago
@farious2009, thank you for creating this issue. We will troubleshoot it as soon as we can.
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!
In addition:
Using not Dynamic Grid does not work either with a current config:
I am failing to see how we can help. I do not see an apparent bug related to the Selenium Grid, but rather a combination of elements that could be the reason for your issues.
One crucial fact is that you are involving a 3rd party in your tests that you do not have control over. Facebook might be working well, and your tests work, but if, for some reason, a request does not work, you have zero control there.
Thank you for taking the time to explain your situation, but I am sorry, I do not know what should be done on our side.
2 things that make me worried about here:
This is local run (have just kicked off 2 runs to show):
vs
remote one:
Tests are the same, all the same, but behaving completely differently.
Thanks in advance!
You can track the issues for Chrome and ChromeDriver at https://bugs.chromium.org/p/chromedriver, and try to find something that explains your problem.
Regarding the second question, I would like to say again that I do not know. Please note that this is an issue tracker, and we can act on reported issues that can be reproduced, especially in some cases where the log is clear enough to demonstrate the bug.
I understand you are trying to figure out what is going on, but we cannot help you if we cannot easily reproduce the issue.
Will try to check/find anything related or similar. Thanks for swift responses.
This case could be closed up probably as you had said you would can do nothing here. But before that yet to happen may I ask you simple two questions (I hope so):
Thanks in advance!
What happened?
Hi Team,
We do run tests using Java 17 + TestNG (7.10.2)+ Selenium (4.21), Allure using Selenium Grid with Chrome nodes in dind.
The problem happens with tests related to 2 windows handling, e.g. Facebook registration or any other deed where new window pops up after a click and we need to handle 2 windows: e.g. when I click on register Facebook button on our standard registration page an additional window pops up asking for credentials:![facebook](https://github.com/SeleniumHQ/docker-selenium/assets/20893934/5653995a-fecf-4b15-99f4-9347746ff83b)
Then entering userâs data and upon clicking on log in I will be redirected back to the initial page of ours and after that test got stuck. It happens really randomly: sometimes after the first cycle of registration or log ins, sometime â after the second circle if testâs logic requires that. Recently playing around with Grids settings I was able to run upon testsâ timeouts already on our page (far away then usual), but the errors are always the same: Unable to execute request for an existing session: java.net.ConnectException
and does not matter whether it is Windows or Linux, single thread or multi: I tested against all. Always looks and behaves that browser/node become abandoned until the very end of the suite.
That happens completely random, and no one knows which test will become broken (among â2 windowsâ onesâ) and what is more important that the following tests from the same thread will be broken as domino after the very first one. Also, worth mentioning: the higher version of Chrome more unstable tests/threads are. Currently we do using Chrome node version 115 which is relatively stable, but 122, 124 and 125 are impossible to be used as the results are always unpredicted and we cannot rely on them (A situation is the same for Edge either, though I have not tested against not Chromium based browsers).
Below there is info alongside an example of a suite with 3 threads how I can reproduce an issue locally having Dynamic Grid via docker compose:
I tried different SE_ values: lower or higher, but all are the same:
Toml (it is used without changes: I commented video recording recently as know where tests are failing: also, to test what impact it would be having on results):
![toml](https://github.com/SeleniumHQ/docker-selenium/assets/20893934/0b7adf40-e38e-4aed-a2cb-c4ef9cafdac4)
Based on my volumes I am able to save 2 (in fact 3, but logs, for some reason, are empty: maybe I am mistaken with volumes somewhere, as permissions are as below):
![folder](https://github.com/SeleniumHQ/docker-selenium/assets/20893934/25224e21-57c5-4f38-998b-4dbb9e18a265)
Session capabilities:![session_cap](https://github.com/SeleniumHQ/docker-selenium/assets/20893934/67d73174-e267-48d1-b839-ceaebd06d213)
Allureâs small example:![allure](https://github.com/SeleniumHQ/docker-selenium/assets/20893934/cedd4d09-b93b-49bb-aae0-75286b11b604)
What is important the used session ID for such test are the same starting from the very first broken test (the one with mentioned broken connection):
You see: IDs are the same, and I have no idea where those 5s timeouts come from (maybe thatâs TestNG puts the session till next failing test if a connection suddenly lost with a current test/node and tries to apply to another test: though, it is just my own speculations).
Timeline are from above-mentioned run:
![allure_tests](https://github.com/SeleniumHQ/docker-selenium/assets/20893934/1c7265e2-9f3a-4fdf-a606-bb6e3caf681b)
A whole suite to show you how threads are âoccupiedâ by these exceptions and how all next tests fail apart being under the same thread:
Vs good run against Chrome 115 :
![allure_110](https://github.com/SeleniumHQ/docker-selenium/assets/20893934/be6b1296-e650-468a-b2b0-f0eb196913e9)
Here the test failed exactly prior to SwitchTo a parent window (this is a different run than above, so ID is a different), however tests are broken as the behavior as well as an error are the same, and those 5 sec..:![test_switch_to](https://github.com/SeleniumHQ/docker-selenium/assets/20893934/20bcb74d-2720-476f-9be0-1052cd88006d)
Regarding the code/steps themselves suing as an example Facebook (but there are others external systems which fall as well): tests are trivial ones:
Thatâs pretty much all. Sleeps, wait utils have not helped out at all. I tried to play with Grid settings, but it has not worked out either. We have 16 cores, but even 4 threads fail to be completed; even single thread is not stable; only lowering Node version affects the results.
Below I am attaching logs what I was managed to fetch considering my current settings. If you needed something more to be extracted, would be glad to do so, but I would need you to tell me how exactly to config my current stuff (though, there are no settings for Chrome 115 and it works fine only having SE_EVENT_BUS_HOST and ports being specified with shm_size: 512mb for 13 replicas). But the same does not work for Selenuim Grid nor Dynamic Grid (even with shm_size:2 gb).
What I am seeing in docker logs that those weird warnings with 404 errors requests (I am pretty sure they appear when I enter/click or doing something else on a child window). And if test fails prior or after (I am not sure here) there are also 500s errors (but maybe thatâs expected if you check after the container and session have been removed, I dunno, just speculation as we've run out of options).
The expected behavior
We want to run 1 test against one Chrome node (presumably the latest one: either 124 or 125) and close it once test either completed or failed. And this node should have been our Las Vegas: what happens inside remains there and wonât be affecting another tests nor thread at all even it got stuck: independent multithreading is needed here either.
Best Regards
Command used to start Selenium Grid with Docker (or Kubernetes)
Relevant log output
Operating System
Windows 10 (local run), Linux (job's run)
Docker Selenium version (image tag)
selenium/node-docker 4.21.0-20240517
Selenium Grid chart version (chart version)
No response