-
Notifications
You must be signed in to change notification settings - Fork 9k
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]: v19.8.0 introduced issue with ignored timeout setting in methods like waitForSelector & gotTo #9927
Comments
This issue was not reproducible. Please check that your example runs locally and the following:
Once the above checks are satisfied, please edit your issue with the changes and we will |
Unfortunately, it is not possible to consider these timeout settings on the protocol client level. I am gonna bump the default timeout in the next release and for now the workaround is to configure the P.S. I will check if we can plumb the timeouts from the page level to the protocol client. |
Thanks @OrKoN BTW waitForSelector throw timeout after 30 seconds even when the timeout option is set directly (through the method's options object) to a higher value. I downgraded puppeteer in my project to v19.7.5 for now, since I don't really need the 19.8.0 version specifically and everything seems to work well in v19.7.5. |
This PR increases the protocol timeout to be less likely triggered by normal operations but still indicate errors in case of backend issues instead of waiting forever. Unfortunately, the current script evaluation API does not allow configuring the timeouts per operations and it's not possible to change this due to variadic arguments accepted in evaluate and evaluateHandle. We could consider exposing new methods which also accept a timeout but for now let's see if increasing the connection timeout is good enough. Issue #9927
@dekelev you can configure the |
This PR increases the protocol timeout to be less likely triggered by normal operations but still indicate errors in case of backend issues instead of waiting forever. Unfortunately, the current script evaluation API does not allow configuring the timeouts per operations and it's not possible to change this due to variadic arguments accepted in evaluate and evaluateHandle. We could consider exposing new methods which also accept a timeout but for now let's see if increasing the connection timeout is good enough. Issue #9927
This PR increases the protocol timeout to be less likely triggered by normal operations but still indicate errors in case of backend issues instead of waiting forever. Unfortunately, the current script evaluation API does not allow configuring the timeouts per operations and it's not possible to change this due to variadic arguments accepted in evaluate and evaluateHandle. We could consider exposing new methods which also accept a timeout but for now let's see if increasing the connection timeout is good enough. Issue #9927
I can confirm that setting the v19.8.0 puppeteer launch option, |
This PR increases the protocol timeout to be less likely triggered by normal operations but still indicate errors in case of backend issues instead of waiting forever. Unfortunately, the current script evaluation API does not allow configuring the timeouts per operations and it's not possible to change this due to variadic arguments accepted in evaluate and evaluateHandle. We could consider exposing new methods which also accept a timeout but for now let's see if increasing the connection timeout is good enough. Issue #9927
I'm having related error: I don't believe it to be caused by I think it's second time puppeteer breaks my code with issues related to timeouts, it would be great to have some tests that would prevent this in the future. Reverting back from |
The new timeout setting applies to all CDP calls (see #9801 and there were similar feature requests) and |
@OrKoN Please update the corresponding doc page to reflect these changes. I spent close to half a day trying to figure out what was wrong with my code, after updating to v19.8.0. |
The doc you linked is not related to this change and it is not configurable on the waitForFunction methods, the timeout applies globally and it is documented in the changelog and here https://pptr.dev/api/puppeteer.browserconnectoptions/#properties |
@OrKoN Please help me understand what the issue is, as I thought I was facing the same issue as OP was. The code |
@nirinsanity please open a bug with a reproduction scripts and a test page specifying all details. |
Sorry, I would love to do all that procedure, but my company, which uses puppeteer, doesn't pay me nearly enough to do all that. I'll stick to v19.7.5 for now, thanks. |
) (#169013) This is a backport PR for the screenshotting protocolTimeout PR bug fix #167335 for the 7.17 branch The screenshotting plugin was not separate from the reporting plugin until after the 8.x release so this PR refactors the 7.17 version to avoid the puppeteer changes (see puppeteer/puppeteer#9927)
Bug expectation
Running the gotTo or waitForSelector methods with the timeout option or with a default page timeout that is set to a value higher than 30000 will timeout after 30 seconds regardless of the timeout setting.
Expected behavior is to consider the timeout option or the default page timeout value.
Minimal, reproducible example
Issue does not reproduced with the previous version 19.7.5 and with v19.8.0 it can be reproduce with the following example code:
package.json:
index.html
index.js
This example will get this navigation timeout error after 30 seconds:
When removing the sleep before responding with the HTML page, you can test for the waitForSelector issue that will timeout after 30 seconds:
Error string
Page.navigate timed out.
Puppeteer configuration
Puppeteer version
19.8.0
Node version
18.12.1
Package manager
npm
Package manager version
8.19.2
Operating system
macOS
The text was updated successfully, but these errors were encountered: