Open codex70 opened 2 months ago
@codex70, 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!
Here you can clearly see the test failing after exactly 9 minutes, followed by a further 9 minutes to quit and stop the driver in the tear down procedure.
Why are you not setting any timeout on the Grid?
Why are you not setting any timeout on the Grid?
Because I wasn't aware that was an option, I must have missed that. Will try that now
OK, I've tried with the following options in the docker compose file, but it hasn't made any difference:
selenium-hub:
image: selenium/hub:latest
container_name: selenium-hub
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"
environment:
- GRID_TIMEOUT=960000
- GRID_BROWSER_TIMEOUT=960000
- SE_NODE_SESSION_TIMEOUT=960000
Are there any other settings for the chrome node container, or anything else that I might be missing?
GRID_TIMEOUT
and GRID_BROWSER_TIMEOUT
don't exist. Have you checked the docs at https://github.com/SeleniumHQ/docker-selenium?
Thank you, the example I found must have been out of date.
I have now put:
environment:
- SE_NODE_SESSION_TIMEOUT=960000
- SE_SESSION_REQUEST_TIMEOUT=960000
However this still makes no difference. One thing I did notice was that in the error message I get the following details from the driver, which do not appear to relate to any of the timeouts I have set:
timeouts: {implicit: 0, pageLoad: 300000, script: 30000}
Are there any other settings that I'm missing or have misunderstood?
If I set the following options, they get passed through to selenium, but it still makes no difference:
options.setImplicitWaitTimeout(clientTimeout);
options.setPageLoadTimeout(defaultTimeout);
options.setScriptTimeout(defaultTimeout);
Whatever settings I change, I still end up with the following errors in the selenium hub docker container:
15:57:10.157 WARN [SeleniumSpanExporter$1.lambda$export$1] - org.openqa.selenium.TimeoutException: java.net.http.HttpTimeoutException: request timed out
2024-08-28T15:57:10.158592962Z Build info: version: '4.23.1', revision: '656257d8e9'
2024-08-28T15:57:10.158596225Z System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.153.1-microsoft-standard-WSL2', java.version: '17.0.12'
2024-08-28T15:57:10.158598760Z Driver info: driver.version: unknown
2024-08-28T15:57:10.158601055Z at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute0(JdkHttpClient.java:408)
2024-08-28T15:57:10.158604184Z at org.openqa.selenium.remote.http.RetryRequest.lambda$apply$5(RetryRequest.java:81)
2024-08-28T15:57:10.158606401Z at dev.failsafe.Functions.lambda$toCtxSupplier$11(Functions.java:243)
2024-08-28T15:57:10.158608620Z at dev.failsafe.Functions.lambda$get$0(Functions.java:46)
2024-08-28T15:57:10.158610964Z at dev.failsafe.internal.RetryPolicyExecutor.lambda$apply$0(RetryPolicyExecutor.java:74)
2024-08-28T15:57:10.158613151Z at dev.failsafe.internal.RetryPolicyExecutor.lambda$apply$0(RetryPolicyExecutor.java:74)
2024-08-28T15:57:10.158626748Z at dev.failsafe.internal.FallbackExecutor.lambda$apply$0(FallbackExecutor.java:51)
2024-08-28T15:57:10.158629231Z at dev.failsafe.SyncExecutionImpl.executeSync(SyncExecutionImpl.java:187)
2024-08-28T15:57:10.158631440Z at dev.failsafe.FailsafeExecutor.call(FailsafeExecutor.java:376)
2024-08-28T15:57:10.158633684Z at dev.failsafe.FailsafeExecutor.get(FailsafeExecutor.java:112)
2024-08-28T15:57:10.158635936Z at org.openqa.selenium.remote.http.RetryRequest.lambda$apply$6(RetryRequest.java:81)
2024-08-28T15:57:10.158638225Z at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42)
2024-08-28T15:57:10.158640589Z at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:55)
2024-08-28T15:57:10.158642755Z at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute(JdkHttpClient.java:374)
2024-08-28T15:57:10.158644917Z at org.openqa.selenium.remote.tracing.TracedHttpClient.execute(TracedHttpClient.java:54)
2024-08-28T15:57:10.158647114Z at org.openqa.selenium.grid.web.ReverseProxyHandler.execute(ReverseProxyHandler.java:90)
2024-08-28T15:57:10.158649283Z at org.openqa.selenium.grid.router.HandleSession.execute(HandleSession.java:181)
2024-08-28T15:57:10.158651434Z at org.openqa.selenium.remote.http.Route$PredicatedRoute.handle(Route.java:397)
2024-08-28T15:57:10.158653615Z at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
2024-08-28T15:57:10.158655807Z at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:360)
2024-08-28T15:57:10.158658082Z at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
2024-08-28T15:57:10.158661594Z at org.openqa.selenium.grid.router.Router.execute(Router.java:87)
2024-08-28T15:57:10.158663839Z at org.openqa.selenium.grid.web.EnsureSpecCompliantResponseHeaders.lambda$apply$0(EnsureSpecCompliantResponseHeaders.java:34)
2024-08-28T15:57:10.158666106Z at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63)
2024-08-28T15:57:10.158668245Z at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:360)
2024-08-28T15:57:10.158670517Z at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
2024-08-28T15:57:10.158672718Z at org.openqa.selenium.remote.http.Route$NestedRoute.handle(Route.java:270)
2024-08-28T15:57:10.158674909Z at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
2024-08-28T15:57:10.158677168Z at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:360)
2024-08-28T15:57:10.158679502Z at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
2024-08-28T15:57:10.158681929Z at org.openqa.selenium.remote.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:35)
2024-08-28T15:57:10.158684357Z at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)
2024-08-28T15:57:10.158686538Z at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63)
2024-08-28T15:57:10.158691631Z at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)
2024-08-28T15:57:10.158693866Z at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63)
2024-08-28T15:57:10.158695974Z at org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:44)
2024-08-28T15:57:10.158700042Z at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
2024-08-28T15:57:10.158702628Z at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2024-08-28T15:57:10.158704794Z at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
2024-08-28T15:57:10.158706967Z at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
2024-08-28T15:57:10.158709164Z at java.base/java.lang.Thread.run(Thread.java:840)
2024-08-28T15:57:10.158711293Z Caused by: java.net.http.HttpTimeoutException: request timed out
2024-08-28T15:57:10.158713455Z at java.net.http/jdk.internal.net.http.ResponseTimerEvent.handle(ResponseTimerEvent.java:63)
2024-08-28T15:57:10.158715696Z at java.net.http/jdk.internal.net.http.HttpClientImpl.purgeTimeoutsAndReturnNextDeadline(HttpClientImpl.java:1270)
2024-08-28T15:57:10.158717958Z at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.run(HttpClientImpl.java:899)
It still consistently fails at 9 minutes, then takes a further 9 minutes to close and stop the driver.
As a follow up, if I run with standalone chrome instead of going through selenium hub, the above code works as expected and there are no timeouts. It doesn't really solve the problem, but for me, for the time being, this is a work around I can live with.
@diemol, thank you for all your help, I'm not sure if you want me to close this issue, or leave it open?
What happened?
This is similar to the problem at https://github.com/SeleniumHQ/selenium/issues/9314. I am trying to test a report which takes around 12 minutes to run. I am using selenium hub in docker with google browser. The tests are run using TestNG and Cucumber.
Originally I was seeing the same 3 minute timeout as described in the other issue, but I've implemented the code shown in the page, and now see a different timeout issue after 9 minutes (it is always exactly 9 minutes). The timeout also seems to block the driver from quitting and stopping for a significant amount of time (around a further 13 minutes). After this, I need to restart the docker container in order to connect again to the remote web driver.
How can we reproduce the issue?
Relevant log output
Operating System
Windows 11 and Docker
Selenium version
Java 4.23.1
What are the browser(s) and version(s) where you see this issue?
Chrome Remote
What are the browser driver(s) and version(s) where you see this issue?
Chrome Browser version 127.0.6533.99
Are you using Selenium Grid?
Grid version: 4.23.1