-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛 Bug]: Set DriverSession TimeOut - Script throws timeout if the node is not available with in 3 minute #13884
Comments
@gitissuepost, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Commenting
|
If you use a |
@diemol - I have removed that assignment and it started working (Updated a comment). But it didn't wait for the expected time before landing to exception. I will update the header to keep it aligned. |
@gitissuepost looks like there are network configuration errors?
Please double check your configuration and if you need help, please check our Slack channel https://www.selenium.dev/support/ |
@diemol - If it's network eror, should it not encounter immediately rather waiting for 3 minutes? My Ingress timeout has been set to 15 min though. |
You have a 3 minute sleep
|
@diemol |
You are right. My apologies. I misread the number. But yeah, it is strange that it waits 3 minutes instead of the 10 minutes you configured. It should not error immediately because that is the purpose of the connection timeout: wait until the initial connection is done. I am checking the code to understand why it times out after 3 minutes. |
We were not setting a connection timeout when the web socket was being opened. The linked commit should fix that. |
Thanks @diemol. I will wait for this to get published in next version. |
@diemol - I tried with the snapshot build and it is waiting over 3 minutes now. The Pod is taking around 4 minutes to get ready to be consumed. However, as soon as the node is up and the execution is being assigned, I get the same exception. I see the node is consumed as the grid shows 1/1 for session and I can vnc into that. Inside the node, I can see that the browser has launched, but it never redirected to google.com as I am expecting. Moreover, the fix (linked commit) is more similar to the previous code. Hence, I am expecting 4.20.0 version should wait for specified timeout. Can you help me with some pointers here based on your expertise? I see the traffic is not an issue as I can connect to google from the pod Also, I see the session had been created successfully in the chrome node. Thanks again for all your support so far.. Please let me know if you require any additional logs. Once it is sorted in the snapshot version, i will try the same solution in 4.20.0 to see if it was already there and it was my knowledge gap which led to this ticket. |
I do not know. I think the pod might have different network settings than the container. For example, our images do not have What is the exception you are getting? If it is |
@diemol - I debugged and see it's failing in builder itself. It never reached the step to navigate to URL. |
It is trying create a driver with below capability. Is it any capability, that is causing this issue?
|
What error stacktrace do you get? |
org.openqa.selenium.remote.http.ConnectionFailedException: JdkWebSocket initial request execution error |
Still getting this. How are you setting the |
I am configuring it using the attached config I get this exception even when I have a node available to consume. I see the request is being assigned to the node but the driver is not being initialized. |
The problem is that it needs to establish a WebSocket connection to the Grid URL. Can you check that WebSocket traffic is allowed? |
@diemol - I am exploring that option to see how to check that in GKE. However, I tried running the command using the public ip and got below error |
How can you fix that? |
Moreover, I will try setting up the same on GKE using helm and see if it resolves everything.. |
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. |
What happened?
I am using a grid on GKE where the node gets spinn up on-demand. Desired pod count for the deployment has been set as 0. As the script connects with teh grid, it spins up a POD to cater that request. However, the script fails as it doesn't get a node assgned with in 3 minutes.
I followed details mentioned in Issue-9314 to use WebDriverBuilder to set a higher timeout. However, the script leads to
IllegalArgumentException: Base URI has already been set. Cannot also set driver service.
How can we reproduce the issue?
Relevant log output
Mon Apr 29 13:52:22 BST 2024 java.lang.IllegalArgumentException: Base URI has already been set. Cannot also set driver service. at org.openqa.selenium.remote.RemoteWebDriverBuilder.withDriverService(RemoteWebDriverBuilder.java:276) at TestDriverBuilder.main(TestDriverBuilder.java:53) Mon Apr 29 13:52:23 BST 2024
Update added to Comment Below
Operating System
Windows10
Selenium version
Java 4.19.1
What are the browser(s) and version(s) where you see this issue?
Chrome - Latest Docker Image
What are the browser driver(s) and version(s) where you see this issue?
Grid - Docker - Chrome Node (GKE) - Latest
Are you using Selenium Grid?
4.20
The text was updated successfully, but these errors were encountered: