question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Full page screenshot issue in headful mode

See original GitHub issue

Steps to reproduce

Tell us about your environment:

What steps will reproduce the problem?

Run this code

const puppeteer = require("puppeteer");

(async () => {
  const browser = await puppeteer.launch({ headless: false });
  const page = await browser.newPage();
  await page.setViewport({
    width: 1920,
    height: 1080
  });

  await page.goto(
    "https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md",
    {
      waitUntil: "networkidle0",
      timeout: 0
    }
  );

  await page.screenshot({
    path: "check-this-screenshot.png",
    fullPage: true
  });

  await browser.close();
})();

What is the expected result? One should get a full page screenshot in both the scenario:

  1. headless: true
  2. headless: false

What happens instead?

  1. headless: true: getting the correct full page screenshot
  2. headless: false: getting the blank screenshot/No screenshot

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
aslushnikovcommented, Jun 1, 2019

Looks like we’re hitting GPU limit on headful easily. Chrome DevTools limit max content height to 2^14 - we should probably do this as well.

1reaction
h2grovercommented, Jul 25, 2019

@aslushnikov any update on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Puppeteer: Not able to take full page screenshot in headful ...
Not able to see the correct screenshot in headless: false mode but getting the correct screenshot with headless: true configuration.
Read more >
[BUG]Full-page screenshot in headful mode is cropped in ...
Context: Playwright Version: 1.12.3 Operating System: Windows Node.js version: 14.17 Browser: Chromium, Firefox Extra: Code Snippet The code ...
Read more >
Full-Page Screenshots on Safari Not Working? Here's How to ...
Follow these three simple tips to fix full-page screenshots if they stopped working in Safari on your iPhone or iPad.
Read more >
Page.screenshot() method - Puppeteer
fullPage : When true, takes a screenshot of the full scrollable page. ... When false, works only in headful mode and ignores page...
Read more >
Using a headless browser to capture page screenshots
A headless browser is a browser without the graphical user interface. It is a way to navigate the web via the command line....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found