Skip to content
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]: The page load ime setting is not respected #13251

Closed
KarelHaruda opened this issue Dec 6, 2023 · 4 comments
Closed

[🐛 Bug]: The page load ime setting is not respected #13251

KarelHaruda opened this issue Dec 6, 2023 · 4 comments

Comments

@KarelHaruda
Copy link

KarelHaruda commented Dec 6, 2023

What happened?

I'm trying to set the Page Load timeout to 120 min, but I always get a Timeout Exception after about 3 minutes.
At the same time, all times are set to 120 min, as can be seen in the Relevant log output.
At first I tried only pageLoad timeout and finally all timeouts

timeouts: {implicit: 7200000, pageLoad: 7200000, script: 7200000}


ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--headless");
chromeOptions.addArguments("--no-sandbox");
chromeOptions.setPageLoadTimeout(Duration.ofMillis(ComponentRuntime.getMaxResolvetime()));
chromeOptions.setImplicitWaitTimeout(Duration.ofMillis(ComponentRuntime.getMaxResolvetime()));
chromeOptions.setScriptTimeout(Duration.ofMillis(ComponentRuntime.getMaxResolvetime()));
if (getWebDriverMajorVersion() > 110) {
chromeOptions.addArguments("--remote-allow-origins=*");
}
if (!StringUtils.isEmpty(chromeBinaryPath)) {
chromeOptions.setBinary(chromeBinaryPath);
}
result = new ChromeDriver(chromeOptions);

How can we reproduce the issue?

Start chromedriver as shown in code (ComponentRuntime.getMaxResolvetime() retrun 7 200 000  ms (120min))
And then open a web page that takes e.g. 10 min to load (I test it by pausing the thread that generates the page). after approx. 3 minutes it goes to timeout

Relevant log output

Build info: version: '4.15.0', revision: '1d14b5521b'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.21'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [2b4f2a14e3de99b18b4b3110fa94ede9, get {url=http://localhost:8081/dev/app/@Y23AT1ABM3QL3G3YNCXSZNW3SO/testpdf?synchronized=true&nocheckcookies=true&lang=cs_CZ&disable_animation=1&synchronized=1&username=admin&password=admins}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 117.0.5938.150, chrome: {chromedriverVersion: 117.0.5938.149 (e3344ddefa1..., userDataDir: C:\Users\KAREL~1.HAR\AppDat...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:52061}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: windows, proxy: Proxy(), se:cdp: ws://localhost:52061/devtoo..., se:cdpVersion: 117.0.5938.150, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 7200000, pageLoad: 7200000, script: 7200000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: 2b4f2a14e3de99b18b4b3110fa94ede9
	at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute0(JdkHttpClient.java:410)
	at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42)
	at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:55)
	at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute(JdkHttpClient.java:366)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:188)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:200)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:175)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:607)
	at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:309)
	at eu.abra.app.igate.utils.AbraWebDriver.printToPDF(AbraWebDriver.java:593)
	at eu.abra.app.igate.scheduler.EmailWithAttachmentsJob.doExecute(EmailWithAttachmentsJob.java:537)
	at eu.abra.app.igate.scheduler.AbraJob.execute(AbraJob.java:141)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: java.util.concurrent.TimeoutException
	at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1892)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2027)
	at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute0(JdkHttpClient.java:393)
	... 13 more

Operating System

Windows 11, Linux

Selenium version

4.15.0

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

117.0.5938.150

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

117.0.5938.149

Are you using Selenium Grid?

No response

Copy link

github-actions bot commented Dec 6, 2023

@KarelHaruda, 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!

@titusfortner
Copy link
Member

There are a number of different timeout values that can be set and it isn't obvious how they work together. In this case,
You have to set the http client read timeout to a higher value in order for the page load timeout to work. This is discussed in #12368

@KarelHaruda
Copy link
Author

ClientConfig.defaultConfig().readTimeout solved the problem.

Thank you very much

Copy link

github-actions bot commented Jan 7, 2024

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

@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants