-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Timeout set to 10 minutes, but timing out after 3 minutes #9314
Comments
Updated to reflect OS was Windows. |
This is what is being printed from Selenium Beta-2 (note the pageLoad and script timouts disregard my setting, and what is weird is that the outcome is timing out at 180000 ms, not the 600000 that was set, or the 300000 that is shown in these logs)
|
Here is more stack dump, again happens at 3 minutes instead of the 10 minute timeout I set:
|
Could you please provide a complete code example to understand better what is happening? Code snippets are not enough in this case. Would be great to see how the driver is created and the url being loaded. |
Note that I use the webVitalsSnippet script injection on a driver without proxy and it works fine. So I don't think that has anything to do with it, but I included it here anyways, since that is what is happening.
webVitalsSnippet:
|
Thank you for sharing the script and the stack trace. In my attempt to recreate the issue, I have been running the same example that is shared with a few tweaks (commenting out the proxy bit since it was mentioned in the follow-up comment that it is not a concern here).
Logs:
When the page load timeout is set to 2 milliseconds as shown below :
Logs:
I have run the same two code samples and checked the debug logs and the timeout values are set as expected with the Chrome driver. |
An early timeout is not the problem. It's when you set it to 10 minutes that is the problem. I'm wondering if the chromedriver doesn't support changing its timeouts, so anything earlier than it's default of 3 minutes is okay but anything after 3 minutes the chrome driver times out no matter what at 3 minutes. |
As Diego rightly pointed out, the issue seems to be due to the default values of HTTP client config. The read timeout defaults to 3 mins. Hence as you mentioned, the issue springs up when the timeout is set higher than 3 mins.
Can you please try as shown above and see if changing the client config values helps solve the issue you are facing? Thank you! Please provide feedback on the same. |
I'm getting the following error when building the driver the new way: java.lang.IllegalArgumentException: Illegal key values seen in w3c capabilities: [loggingPrefs, unexpectedAlertBehaviour] |
The W3C valid capabilities are shown here https://www.w3.org/TR/webdriver1/#capabilities
|
Removed those capabilities and now getting an error trying to execute two of the critical settings on the driver for us:
Error:
|
Please use as a base the example provided above by @pujagani, which works. Otherwise this issue will become a debugging session and for that it would be preferrable for you to join our Slack/IRC channel https://www.selenium.dev/support/ |
Is there no other way to issue CDP requests? This is a prerequisite for us. |
I understand the issue is about the 3 minutes timeout, which is triggered since it is the default one. We provided an example above that shows how to increase the timeout. Am I missing something? |
Removing functionality to increase the timeout does not equal a workaround. Is this related to: #7914 |
Thank you for providing the feedback. I received the same error while working with it, but to ensure the options are set as desired, Now the next concern is valid regarding the CDP commands. I am sharing an example below which a workaround to set a client config as well as run the CDP commands. Since currently, I was not able to figure a direct way to do both in a simpler manner. (Will discuss this with the Selenium contributors for future implementations)
I hope this helps fix the issue. |
I get an error running this code. See below for logs.
|
Thank you for providing an update. However, with the same example after multiple runs, I am not able to reproduce this error. |
Here is the code that I am running. Please let me know if I've somehow missed something.
The error occurs here:
|
Thank you for sharing the code snippet. |
That works! Thanks for the workaround. |
Reopening in case you want to fix the original issue. |
Got a bunch of Too many open files errors, do I have to close the service separately from the driver? |
Please make sure to be using the most recent releases ( I believe you have been able to move forward and I'd like to avoid having this issue turned into a debugging session. If there is a concrete issue with code showing how to reproduce it, please open a new issue. Please join our Slack/IRC channel for more questions, we'd be happy to reply there. https://www.selenium.dev/support/ |
I understand. However, after running several large scale tests after the initial unit test, it appears that the linux machine runs out of sockets. So I am trying to confirm that the chromedriverservice.start() call doesn't need to be closed when the driver is closed (this is used in the context of a connection pool), which was not a requirement before in our original code. Does driver.close handle the chromedriverservice.close() call? |
Thank you for the feedback and the details. Probably this will help, quit the RemoteWebDriver then close the ChromeDriver service. I stepped through the code to confirm that RemoteWebDriver quit will not close the ChromeDriver service. Thanks for bringing this to our notice.
|
🐛 Bug Report
I am setting the timeout to 10 minutes because I am using https://github.com/scrapinghub/crawlera-headless-proxy
I am seeing it timeout after 3 minutes (still downloading all of the JS/CSS files)
To Reproduce
Set page load timeout to 10 minutes
Expected behavior
Expecting it to timeout after 10 minutes, not 3.
Test script or set of commands reproducing this issue
Environment
OS: Windows
Browser: Chrome
Browser version: Version 89.0.4389.90 (Official Build) (64-bit)
Browser Driver version: ChromeDriver 89.0.4389.23
Language Bindings version: Java 8
Selenium Grid version (if applicable): Beta 2
The text was updated successfully, but these errors were encountered: