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
feat: support timeout for page.pdf() call #7508
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
03a4ca1
to
d4b17bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move to timeout to createPDFStream
as it looks like the Page.printToPDF
call there is the original source of the timeout?
Do you know if there's a corresponding bug reported for Chromium already? And if not, file one on https://crbug.com/new? |
Sounds good ! Thanks for the review |
np, will check on that . |
☑️ Issue created for Chromium |
Awesome, thanks! |
Yep, the timeout values in tests are 1. Let me know if there are other things I could help with and thanks for taking time review my PR 😄 |
@nikli2009 Thanks for updating the pull request! I left two more comments to reduce the size of the pr a bit - could you address them too? |
Happy to :D |
@jschfflr Thanks for the review :D, got some quick updates :
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, right. Good catch!
… disable it This was mentioned in the PR that adding this feature puppeteer#7508 But it has lost at puppeteer#8593. I'm not sure why this was removed, but I think this info is useful for users.
This was mentioned in the PR that adding this feature puppeteer#7508 But it has lost at puppeteer#8593. I'm not sure why this was removed, but I think this info is useful for users.
This was mentioned in the PR that adding this feature puppeteer#7508 But it has lost at puppeteer#8593. I'm not sure why this was removed, but I think this info is useful for users.
This was mentioned in the PR that adding this feature puppeteer#7508 But it has lost at puppeteer#8593. I'm not sure why this was removed, but I think this info is useful for users.
This was mentioned in the PR that adding this feature puppeteer#7508 But it has lost at puppeteer#8593. I'm not sure why this was removed, but I think this info is useful for users.
**What kind of change does this PR introduce?** Add how to disable timeout for `page.pdf()`. **Summary** This was mentioned in the PR that adding this feature #7508 But it has lost at #8593. I'm not sure why this was removed, but I think this info is useful for users. **Does this PR introduce a breaking change?** no
Context
When use
page.pdf
API, there are some extreme scenarios that can cause the promise never get fulfilled or rejected. Hence this may cause potential problems. These kind of errors most likely happens in Chromium.Related Issues
Changes
timeout
parameter for PDFOption which will be used inpage.pdf
call