October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk9 min

How to Fix White or Gray Screenshots in Puppeteer

A white or gray Puppeteer screenshot is usually a timing, rendering, or capture-scope problem. Follow a deterministic sequence to find the failing layer.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A white or gray Puppeteer screenshot usually means the page was captured before its application rendered, the capture targeted the wrong area, or the output’s background is being misunderstood. Start with a simple PNG, an explicit viewport, and a wait for a real content element; then inspect navigation, browser errors, failed requests, clipping, and device scale.

Start with a simple, reproducible capture

Puppeteer’s screenshots guide says, “For capturing screenshots use Page.screenshot().” Its basic pattern is to create a page, navigate, capture with page.screenshot(), and close the browser. Use that as a baseline, but add an explicit viewport and an application-specific readiness check. A completed navigation does not necessarily mean a client-rendered application has finished drawing.

The example below uses Puppeteer’s JavaScript API. Install Puppeteer in your project using its documented setup, then save this as an ES module such as debug-shot.mjs and run it with Node.js. Replace the URL and selector with the page and a visible element that appears only when the content you need is ready.

import puppeteer from 'puppeteer';

const url = 'https://example.com';
const readySelector = 'main';

const browser = await puppeteer.launch({ headless: true });
try {
  const page = await browser.newPage();
  await page.setViewport({
    width: 1280,
    height: 800,
    deviceScaleFactor: 1,
  });

  page.on('console', message => {
    console.log(`[console:${message.type()}]`, message.text());
  });
  page.on('pageerror', error => console.error('[pageerror]', error));
  page.on('requestfailed', request => {
    console.error('[requestfailed]', request.url(), request.failure()?.errorText);
  });
  page.on('response', response => {
    if (response.status() >= 400) {
      console.error('[response]', response.status(), response.url());
    }
  });

  const response = await page.goto(url, {
    waitUntil: 'networkidle2',
    timeout: 60000,
  });
  console.log('Final URL:', page.url());
  console.log('HTTP status:', response?.status() ?? 'no response');
  console.log('Title:', await page.title());
  console.log('Body sample:', (await page.locator('body').innerText()).slice(0, 500));

  await page.waitForSelector(readySelector, { visible: true, timeout: 30000 });
  await page.screenshot({ path: 'debug.png', type: 'png' });
} finally {
  await browser.close();
}

Use a selector that proves the part of the page you care about is present, not merely a generic container that appears immediately. If the application exposes a reliable ready flag, wait for it with page.waitForFunction() instead. A selector or state-based wait is generally more informative than adding an arbitrary pause.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Wait for the application, not just navigation

page.goto() waits according to its waitUntil option. The example uses networkidle2 as a starting point: this is useful when page requests settle, but it is not proof that a single-page application has finished rendering. Some applications fetch data after navigation or keep requests open continuously.

Wait for meaningful content

Prefer page.waitForSelector() for a real element that signals the target content has appeared. Use the visible: true option when the element must be displayed, and set a timeout appropriate to the application. If readiness is represented by application state rather than a unique element, use page.waitForFunction() to test that state. For example, wait for a known global readiness flag only if the site actually defines one.

Use network-idle waiting deliberately

Puppeteer also provides page.waitForNetworkIdle() for pages that need a quiet network interval after navigation. This can help when the relevant data loads in a second phase. It can also wait longer than expected on pages with polling or persistent connections. Pair network-idle waiting with a meaningful readiness condition rather than assuming one universal wait strategy works for every site.

Why a fixed delay often disappoints

A delay can be useful as a temporary diagnostic—for example, to see whether a late animation or request is involved—but it does not prove the page is ready. A short delay can still capture too early; a long delay wastes time and may mask a race. Prefer a selector, application-ready condition, or a bounded network-idle wait, and keep the timeout explicit so a stalled page fails visibly instead of silently producing an empty image.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check navigation and browser diagnostics

Before changing screenshot settings, determine whether Chromium reached the intended page and whether that page rendered anything useful. Log the final URL, the response status returned by page.goto(), the document title, and a short body-text sample. A redirect to a sign-in page, an error page, or an unexpected route can otherwise look like a screenshot problem.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • page.on('console'): surfaces browser console messages, including client-side errors reported there.
  • page.on('pageerror'): reports uncaught page JavaScript errors.
  • page.on('requestfailed'): identifies requests that failed at the network layer.
  • Response logging: note error HTTP status codes for scripts, stylesheets, API calls, and other resources.

These listeners are practical debugging instrumentation, not a guarantee that every failure will appear in one event. Use the output to identify the failing layer, then inspect the particular request or application state. For example, a document can return successfully while a JavaScript bundle or data API request fails, leaving only an empty app shell.

Set viewport and device scale before navigating

Set a known viewport before page.goto(). Puppeteer defines viewport width and height in CSS pixels, and deviceScaleFactor defaults to 1. An explicit baseline removes uncertainty about the page dimensions and output scale. Setting the viewport first also avoids an unnecessary reload in cases where mobile or touch emulation changes when the viewport is configured.

Begin with a desktop viewport and deviceScaleFactor: 1. If that produces the expected screenshot, change only the scale factor and capture again. Puppeteer issue #3169 documents a report titled “White screenshots with deviceScaleFactor 2.” That makes device scale a reasonable troubleshooting axis, not a universal explanation for white images. If the failure occurs only at a higher scale, preserve the smallest reproducible case and note the Puppeteer and Chromium versions and execution environment when investigating further.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Remove capture options that can hide the page

Start with the least complicated screenshot call:

await page.screenshot({ path: 'debug.png', type: 'png' });

Do not initially combine full-page capture, a clip rectangle, transparency, or other options. Reintroduce only the option needed for the real capture after the baseline works.

Check clipping and capture scope

A clip rectangle can target an area outside the visible content, yielding an apparently empty image. Remove clip while diagnosing; confirm the rectangle’s coordinates and dimensions are in the expected CSS-pixel space before adding it back. If you need the whole document, test fullPage: true separately. captureBeyondViewport affects capture beyond the viewport; it does not make missing application content render.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Use element screenshots to isolate the problem

If a known component is present, capture it with its element handle’s screenshot() method. A correct element image alongside a blank page image points toward page-level scope, clipping, overlays, or page-size calculations. If the element capture is blank too, return to navigation, rendering, failed requests, and readiness rather than tuning full-page options.

Understand white versus transparent backgrounds

omitBackground: true omits the default white background so the output can be transparent. It does not restore content that never rendered. A viewer that displays transparency against white may make a transparent image appear white; inspect the file in a viewer that shows transparency or test with the default background to distinguish that case from a genuinely empty page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Inspect application state and page assets

When the body exists but the app shell is empty or incomplete, treat the page itself as the next suspect. Review JavaScript exceptions and failed requests, especially for scripts, stylesheets, fonts, images, and data APIs. Confirm the capture environment has the authentication, cookies, headers, and environment variables the application needs. A browser can load the document correctly while the application lacks permission or configuration to fetch its actual content.

Lazy-loaded content may not exist until it enters the viewport or the application’s own loading condition is triggered. Scroll or otherwise trigger that condition, then wait for the target element or state before capturing. Do not assume that a successful top-of-page navigation eagerly loads every image or section farther down the document.

Use a failure-layer decision path

What you observe Likely layer to investigate Next check
Unexpected URL, no document response, or navigation timeout Navigation or access Log page.url() and the goto() response; verify the URL, redirects, authentication, and reachability from the capture environment.
Document and body exist, but app content is missing JavaScript, application state, or API Read console and page errors, inspect failed API/script requests, and wait for the application’s real ready element or flag.
Some content appears, but styles or media are absent Assets or network Check failed resource requests and error responses for CSS, fonts, images, and scripts.
Element capture works, page or full-page capture does not Capture scope or geometry Remove clip, test viewport capture, and add full-page behavior only after the baseline succeeds.
Scale 1 works, higher device scale fails Device scale or browser environment Reduce to the same page and viewport with only scale changed; record Puppeteer and Chromium versions.
Image seems blank only in a particular viewer Background or transparency display Compare default background handling with omitBackground and inspect transparency in a suitable viewer.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common Puppeteer white-screenshot failures and fixes

The screenshot is solid white, but navigation succeeded

Navigation success establishes that the document load progressed; it does not prove that the application rendered its content. Inspect the body text, console, page errors, and failed API or script requests. Wait for the application’s content selector, then capture again.

Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

The screenshot is gray or has a blank app panel

Check whether the shell rendered while its data or assets failed. A missing API response can leave a placeholder; a failed stylesheet can make content appear absent or misplaced. Inspect response and request-failure logs, then verify access credentials and the application’s expected state.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The image is empty after adding a clip

Remove clip and capture the viewport. If that works, verify the clip’s position and size against the actual rendered content. Add it back only after confirming the element’s location.

Only full-page capture fails

Compare an ordinary viewport capture and an element screenshot. If either is correct, investigate full-page dimensions, page-size calculations, and content that loads only after scrolling. Ensure the application has reached the desired state before asking for a full-page image.

Changing the background did not fix it

Background handling changes the output’s background, not the page’s rendering. Remove omitBackground to test the default white background, but if content is still absent, return to readiness, JavaScript, and network diagnostics.

A higher device scale produces a white image

Re-run with identical URL, viewport, timing, and screenshot options at scale 1, then change only deviceScaleFactor. If the minimal case isolates the issue to the higher scale, record versions and environment details for a reproducible bug report rather than assuming scale is the cause of unrelated failures.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Performance, reliability, and repeatability

Reliable capture is primarily about making the readiness condition and output geometry deterministic. Keep viewport dimensions, device scale, capture options, and relevant browser settings explicit. Wait for the actual content you need instead of relying on a guessed delay. This makes failures easier to classify and avoids unnecessarily waiting for unrelated background activity.

For diagnosis, save PNG output and keep browser logs with the artifact. PNG avoids introducing lossy image compression as an extra variable while inspecting blank areas or rendering differences. Close the browser in a finally block, as in the example, so a timeout or page error does not leave the process running. If a capture fails, treat the timeout, response, and event logs as diagnostic evidence rather than accepting a blank file as a successful result.

Or skip the browser setup

If you need screenshots in an application or workflow rather than a local Puppeteer debugging session, ScreenshotNeo provides a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF. Its clean-shot steps accept cookie and consent banners like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo API documentation for parameters and setup. ScreenshotNeo also has an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month with no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Does a successful `page.goto()` mean Puppeteer is ready to take a screenshot?

No. Navigation can finish before a client-rendered application has displayed its content; wait for a meaningful element or application-ready condition.

Can `omitBackground` fix a blank screenshot?

No. It changes background handling and allows transparency; it cannot make unrendered page content appear.

Should I use a delay or `networkidle2` for every page?

Neither is universal. Choose a wait condition that represents the content you need, and use network-idle waiting only when it suits that page’s request behavior.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.