October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

Puppeteer Screenshot Hangs on networkidle: Causes and Fixes

Puppeteer’s networkidle conditions can time out when background traffic persists. Diagnose the pending wait, choose a visual readiness signal, and capture reliably.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If a Puppeteer screenshot appears to hang on networkidle, the wait is usually for navigation or network activity—not for screenshot encoding. Network-idle conditions require a quiet interval and may never occur on pages that keep requests active. Use the least strict wait that fits the page, then wait for the content you actually need in the image before calling page.screenshot().

What networkidle waits for—and why it can hang

In the current Puppeteer API documentation, version 25.12.0, networkidle0 means there are no more than zero active network connections for at least 500 ms. networkidle2 permits up to two active connections for at least 500 ms. The first is stricter; neither means that a page is visually complete.

As an Amazon Associate I earn from qualifying purchases.

Polling, streaming, long-lived requests, or repeated background fetches can prevent the chosen threshold from being met. In that case, a navigation or idle wait can remain pending until its timeout rejects. These are possible causes based on the documented thresholds and request lifecycle, not a diagnosis of any particular site.

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.

page.goto() accepts navigation wait options, while page.waitForNetworkIdle() is a separate API. The latter has configurable concurrency and idleTime; documented defaults are 0 and 500 ms, and it waits at least for the idle period. A screenshot is a separate operation: page.screenshot() captures the page once your code reaches it. Puppeteer’s screenshot guide demonstrates navigation with networkidle2, but network idleness is not a prerequisite built into the screenshot method. See the lifecycle event reference, waitForNetworkIdle API, and screenshot API.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • 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

Find which wait is actually pending

Log before and after each awaited operation. This distinguishes a stalled navigation from a separate idle wait, a selector wait, or screenshot capture. The symptom alone does not identify which promise is pending.

console.log('starting navigation');
const response = await page.goto(url, { waitUntil: 'networkidle0', timeout: 30_000 });
console.log('navigation finished', response?.status());

console.log('starting screenshot');
await page.screenshot({ path: 'page.png' });
console.log('screenshot finished');

If the first completion message never appears, inspect navigation’s readiness condition and timeout. If it appears but the second does not, investigate screenshot capture and page state separately. For an explicit page.waitForNetworkIdle(), add its own before/after log as well.

Choose a readiness condition that matches the image

Wait condition What it establishes Typical trade-off
domcontentloaded The document has been parsed. Can proceed before all resources or application content are ready.
load The page’s load event has fired after its load-dependent resources. Does not prove that later application updates or background work have finished.
networkidle2 No more than two active connections for at least 500 ms. More tolerant of background activity than networkidle0, but can still time out.
networkidle0 No active connections for at least 500 ms. Strict; persistent background traffic can prevent the condition.
Selector or application-ready condition The chosen element or state is present. Targets visible content, but a wrong or late selector can time out.

When the document is usable before background work settles, use domcontentloaded or load, then wait for a meaningful selector or application-specific ready state. If network quiet matters, try networkidle2 before networkidle0. Lifecycle behavior is documented in Puppeteer’s PuppeteerLifeCycleEvent reference; selectors are site-specific, not universal Puppeteer guarantees.

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.
Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • 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

Example: wait for the content, not every request

const response = await page.goto(url, {
  waitUntil: 'domcontentloaded',
  timeout: 30_000,
});

await page.waitForSelector('[data-page-ready]', { timeout: 10_000 });
await page.screenshot({ path: 'page.png', fullPage: true });

Replace [data-page-ready] with a selector that exists on the target page and represents content that should appear in the shot. The selector and timeout above are examples. If the application exposes a reliable ready flag, wait for that instead. For lazy-loaded images or animations, explicitly trigger or wait for the visual elements needed; the right approach depends on the page.

Inspect active requests

Attach listeners before navigation so early requests are included. Repeated URLs, requests that remain open, and recurring application refreshes can explain why an idle threshold is not reached.

page.on('request', request => {
  console.log('request', request.method(), request.resourceType(), request.url());
});
page.on('requestfinished', request => {
  console.log('finished', request.url());
});
page.on('requestfailed', request => {
  console.log('failed', request.url(), request.failure());
});

await page.goto(url, { waitUntil: 'networkidle2', timeout: 30_000 });

Puppeteer’s request lifecycle documentation notes an important distinction: an HTTP error response such as 404 or 503 still completes as requestfinished. requestfailed indicates a request failure at the transport/request level, so it is not a full list of unsuccessful HTTP statuses. Inspect response status separately if HTTP errors matter. See the Page event reference.

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.

Check request interception and filtering

Interception can create the hang yourself. After page.setRequestInterception(true), each intercepted request must be resolved exactly once: continued, answered, aborted, or completed from cache. Audit every branch of every handler for a path that forgets to resolve the request.

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

Do not enable interception merely to make a network-idle condition pass. Blocking requests changes page behavior and may remove images, scripts, fonts, or other assets needed for the screenshot. Puppeteer documents this requirement in its setRequestInterception API.

Set finite timeouts and diagnose the failure

The current Puppeteer WaitForOptions reference documents a 30,000 ms default timeout; 0 disables it. Page timeout methods can change defaults. Use a finite, explicit timeout while diagnosing and identify the specific wait that timed out. Increasing the limit may help a genuinely slow page, but it cannot make persistent activity become idle. Setting timeout to zero can turn a useful error into an indefinite wait.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • 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
Symptom Likely area to check Practical fix
Navigation times out on networkidle0 Persistent background requests or a threshold that is too strict Try networkidle2, or use document readiness plus an application-specific selector.
Separate idle wait never completes page.waitForNetworkIdle() threshold and ongoing activity Set an appropriate finite timeout; reconsider concurrency/idle period or wait for visible readiness instead.
Requests remain pending after interception is enabled A handler branch does not resolve every request Ensure every path continues, responds, aborts, or otherwise resolves each request exactly once.
Selector wait times out Selector is absent, incorrect, or appears later than expected Verify the selector on the target page and wait on a reliable state.
Screenshot is captured but looks incomplete Readiness condition does not cover required content Wait for the relevant element, image, or application state before capture.

The timeout figures above describe Puppeteer’s current API reference, version 25.12.0 as accessed October 3, 2026. Check the installed Puppeteer package and its compatible browser before relying on version-specific behavior; no Chromium version is established here. References: WaitForOptions and default navigation timeout API.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you need an image from a URL without managing Puppeteer navigation waits, ScreenshotNeo is a website screenshot API and MCP server. One GET request returns an image or PDF; cookie/consent banners, newsletter popups, and chat widgets are removed before capture, with each step configurable. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients.

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

Example cURL request (replace the target URL and provide your API key):

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

See the ScreenshotNeo API documentation for request options and response details. Free includes 1,000 shots per month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.

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.

Frequently Asked Questions

Does page.screenshot() wait for networkidle automatically?

No. Network-idle waiting is a navigation option or a separate wait API; screenshot capture is a separate call.

Should I use networkidle0 or networkidle2?

Use the least strict condition that suits the page. networkidle2 permits two active connections; networkidle0 permits none, each for at least 500 ms.

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

Can I fix the hang by setting the timeout to zero?

No. Zero disables the timeout and can leave a wait pending indefinitely if its condition never becomes true.

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.

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. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

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.