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

If Pyppeteer’s Chromium stops completing page loads after a while, the delay alone does not identify the cause. A navigation timeout, a page that keeps making network requests, a closed DevTools session, an incompatible Chromium executable, and a host or network problem can look similar from the outside. Capture the exact error and determine which stage is failing before changing timeouts or applying an old workaround.

First identify what “stops loading” means

Record the failing URL, elapsed time, selected waitUntil condition, exception text, and response status if one was returned. Also check whether Chromium is still running and whether Pyppeteer can still communicate with its page. These observations distinguish several failures that should not be treated as one problem.

  • Navigation timeout: page.goto() did not meet its configured completion condition before the deadline.
  • Session or target closure: the browser process, page target, or DevTools/WebSocket connection may have closed. This is not the same as a slow page.
  • Navigation or main-resource failure: the URL, TLS connection, or request for the main document failed.
  • Committed page with incomplete loading: Chromium may have received and committed the document while scripts, images, frames, or other resources continue loading.
  • Call never returns: capture the whole exception and process state; do not assume a timeout setting is the cause just because the call appears stuck.

Pyppeteer’s API documentation notes that Page.goto() can raise for a timeout, SSL error, invalid URL, or main-resource failure. A returned response, an exception, and a call still waiting are useful but different signals. Pyppeteer 0.0.25 API reference

Understand which loading milestone your script is waiting for

A browser navigation is not a single event. Chromium describes a request and any redirects, response handling, renderer commit, and then a separate loading phase. A document can be committed before its subresources have all finished. DOMContentLoaded occurs before completion of subresources; the top-level document, subresources, frames, and their subresources may continue loading afterward. Chromium: Life of a Navigation

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Pyppeteer’s waitUntil option determines which milestone allows navigation to count as complete:

Condition What it waits for Use it when
load The page’s load event. Your task needs the normal page-load event and its associated resources.
domcontentloaded The DOMContentLoaded event. You need the parsed document and do not need to wait for every resource to finish.
networkidle0 No more than zero active network connections for at least 500 ms. The page is expected to become fully quiet and does not keep persistent requests open.
networkidle2 No more than two active network connections for at least 500 ms. A small amount of continuing network activity is acceptable.

A page with polling, analytics, streaming, or other long-lived requests can behave differently under network-idle conditions than under a DOM milestone. For example, if the job only needs the document’s markup, waiting for every request to settle can be an unnecessarily strict success condition. Conversely, selecting domcontentloaded does not mean images or other subresources have finished. Choose the condition that matches what the next step in your automation actually requires. The available conditions and thresholds are documented in the Pyppeteer API reference.

Use a bounded navigation and capture the failure

Pyppeteer documents a 30,000-millisecond default navigation timeout. You can choose a per-call timeout, change the default navigation timeout, or set timeout: 0 to disable the navigation timeout. Disabling it does not repair a connection or make a page finish loading, so keep an application-level deadline and a recovery path for jobs that hang.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
import asyncio
from pyppeteer import launch

async def main():
    browser = await launch()
    page = await browser.newPage()
    url = "https://example.com"

    try:
        response = await page.goto(
            url,
            {"waitUntil": "domcontentloaded", "timeout": 30000},
        )
        print({
            "url": page.url,
            "status": response.status if response else None,
            "elapsed_note": "navigation returned",
        })
    except Exception as exc:
        print({"url": url, "error_type": type(exc).__name__, "error": str(exc)})
        print("browser_connected:", browser.isConnected())
        raise
    finally:
        await browser.close()

asyncio.run(main())

This example uses domcontentloaded to illustrate a less demanding milestone; use another documented condition if the task requires it. The shown exception reporting is intentionally simple: in a production worker, log elapsed time, the URL, the chosen condition, and whether the browser and page remain usable. Do not log secrets embedded in URLs or request headers.

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

Pyppeteer’s timeout can be changed for later navigations with await page.setDefaultNavigationTimeout(45000). Increasing that value can accommodate a legitimately slower page, but it can also make a stuck job occupy a worker longer. Setting timeout: 0 disables this particular timeout; it is not a connectivity fix. Pyppeteer API reference

Check the Chromium executable and runtime

Start with the browser version

Pyppeteer says it works best with its bundled Chromium and does not guarantee compatibility with another version. If your launch configuration sets executablePath, compare that executable with the Chromium bundled for the installed Pyppeteer version. Treat custom browser paths cautiously rather than assuming that any installed Chromium will work with the package. Pyppeteer API reference

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Include the operating system and deployment environment

Record the operating system or container image, Chromium version, Pyppeteer version, launch arguments, and whether the issue happens locally or only in deployment. Upstream Puppeteer’s troubleshooting documentation describes Chromium/package combinations producing timeout problems on Alpine 3.20 and advises matching the Chromium package to the supported browser version. That is an example for Puppeteer in a particular environment, not proof of a Pyppeteer-specific Alpine defect. Puppeteer troubleshooting

Check the host for DNS resolution, proxy or TLS behavior, outbound connectivity, and process or resource limits. Chromium documents network failures such as DNS and socket failures, and explains that a network error can occur after a document has committed. If the workload actually runs on Cloud Run, Puppeteer’s guidance also describes CPU allocation after an HTTP response as one possible source of apparent browser slowness there; it does not establish that explanation for other hosting environments. Chromium navigation lifecycle · Puppeteer troubleshooting

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.

Treat “Session closed” as a separate diagnosis

A Stack Overflow report posted on March 31, 2020 describes a screenshot loop that produced “Session closed. Most likely the page has been closed” after about 20 seconds. The author tried a monkey patch that disabled WebSocket ping settings; they then reported that the session error stopped, but Chromium lost internet connectivity and page.goto(url) never returned control. An answer suggested the pyppeteer2 fork, with the answerer disclosing involvement in its development. This is one historical report, not evidence that disabling pings or installing that fork is a current or universal fix. Stack Overflow question and answers

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

If the session closes, investigate browser-process exit, page or target closure, and whether the DevTools connection remains usable. Do not apply the old ping patch merely because a navigation is slow: a session failure and a navigation that has not met its loading condition are different symptoms.

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

Use a practical troubleshooting sequence

  1. Reproduce with one URL. Save the complete exception and measure how long the call waits. Note whether it returns a response, raises, or remains pending.
  2. Compare a simple page with the failing page. If only one site fails, inspect that site’s redirects, TLS/network behavior, and ongoing requests. If both fail, examine the browser process, runtime, and host connectivity.
  3. Match the milestone to the task. Try domcontentloaded only when the document is enough; do not interpret that result as proof all resources loaded. Use a network-idle condition only when the page can actually become quiet.
  4. Verify the browser build. Test with Pyppeteer’s bundled Chromium before diagnosing a custom executablePath as supported.
  5. Inspect network and host conditions. Check DNS, outbound access, proxy/TLS behavior, CPU and process limits, and any platform-specific runtime behavior relevant to your deployment.
  6. Keep a deadline and recovery path. A timeout can bound a navigation wait, while your worker should also decide what to do with a failed job: record the failure, close or replace an unusable browser, and retry only when retrying is appropriate.

Plan for Pyppeteer maintenance status

The current Pyppeteer repository describes the project as unmaintained and recommends Playwright for Python. If your application depends on browser automation, evaluate migration against the browser versions you need, the API and workflow changes involved, and support for your deployment environment. The repository recommendation is a maintenance consideration; it does not show that migration will fix a particular DNS, network, or runtime problem. Pyppeteer GitHub repository

Or skip the browser setup

If the job is to produce a website screenshot rather than operate Chromium yourself, ScreenshotNeo offers a one-request screenshot API. It accepts a URL and returns an image or PDF. For example, this cURL request captures the Stripe home page; replace the URL and add your API key:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
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. ScreenshotNeo removes supported cookie and consent banners, newsletter popups, and chat widgets before the shot; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response reports the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.

Learn about ScreenshotNeo or sign up for 1,000 free screenshots a month, no card required.

Frequently Asked Questions

Does a 30-second wait mean Chromium crashed?

No. Pyppeteer’s documented default navigation timeout is 30,000 milliseconds; a navigation timeout by itself does not show that the browser process exited.

Will setting the navigation timeout to zero fix a page that hangs?

No. It disables Pyppeteer’s navigation timeout but does not restore connectivity or ensure that the page finishes loading.

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

Is the 2020 WebSocket ping workaround a general fix?

No. The report is anecdotal, and its author said the navigation still hung after the session error stopped.

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.