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
When the target element width is zero, elementHandle.screenshot does not work. #2672
Comments
@boiawang I can't repro this with pptr v1.5.0 and with the following script: const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setContent('<div style="width: 0; height: 0"></div>');
const div = await page.$('div');
await div.screenshot({
path: 'screenshot.png'
});
console.log('screenshot end'); // cannot execute to this line
await browser.close();
})(); We might've fixed this in puppeteer v1.5.0; speculatively closing this. |
@aslushnikov The minimal example you had posted hangs for me using v1.7.0. Does it (still) work for you? |
@aslushnikov for more background, I see this on Linux (Ubuntu 18.04), node v10.9.0, puppeteer v1.7.0, chromium r579032. |
@pkra: works nicely for me. I think we even have a test that makes sure this scenario is functioning. |
@aslushnikov thanks for the response. This still consistently hangs for me on Linux (Ubuntu 18.04), node v10.9.0, chromium r588429. Would you have ay advice on how to dig deeper into this? |
@pkra hmm I didn't find a test for this; I've added one - let's see how it performs on our trybots. |
Ah, linux is busted indeed. |
Thanks so much for looking into it, @aslushnikov! |
Tell us about your environment:
What steps will reproduce the problem?
Please include code that reproduces the issue.
What is the expected result?
console.log('screenshot end')
cannot execute when div has no width and height.What happens instead?
I hope it shouldn't be blocked, Or throw a error?
The text was updated successfully, but these errors were encountered: