Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
browser automation

Why Pyppeteer Freezes After Launching Chrome and How to Fix It

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.

If Pyppeteer appears to launch Chrome and then stops, the browser process alone does not tell you where it failed. Add markers around each awaited call to find whether the stall is in launch(), browser.newPage(), page.goto(), or a later wait. Then enable debug logging, record the browser and Python versions, and compare the selected Chrome binary with Pyppeteer’s bundled Chromium before changing security settings.

First find the exact operation that stops

“Chrome launched” can mean only that a process appeared. Pyppeteer may still be connecting to the browser or creating a DevTools page target. A report titled around a Page enable failure, for example, described a hang at await browser.newPage() after await launch() appeared to finish. So do not diagnose from the visible window or process list alone.

Put a flushed message immediately before and after each awaited operation. This small diagnostic script shows the pattern; replace the URL and preserve your actual launch settings when adapting it:

import asyncio
from pyppeteer import launch

async def main():
    print("before launch", flush=True)
    browser = await launch()
    print("after launch", flush=True)

    page = await browser.newPage()
    print("after newPage", flush=True)

    response = await page.goto("https://example.com")
    print("after goto", flush=True)

    await browser.close()

asyncio.run(main())

The final printed marker narrows the problem:

  • If after launch never appears, investigate launch, executable availability, arguments, and the environment.
  • If after launch appears but after newPage does not, focus on browser connection and page/target initialization.
  • If after newPage appears but after goto does not, investigate navigation, network access, and the navigation wait condition.
  • If after goto appears and the script later stops, add markers around the remaining selectors, waits, and cleanup calls.

Record the last successful marker and the first relevant warning or error. This is more useful than treating every pause after a Chrome process starts as the same failure.

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

Enable Pyppeteer debug output

The Pyppeteer API reference documents logLevel=logging.DEBUG for launch() and connect(), and pyppeteer.DEBUG = True to print errors that would otherwise be suppressed. Use the logging option while reproducing the specific stall, then inspect the lines around the last successful operation.

import asyncio
import logging
import pyppeteer
from pyppeteer import launch

async def main():
    browser = await launch(logLevel=logging.DEBUG)
    page = await browser.newPage()
    await page.goto("https://example.com")
    await browser.close()

pyppeteer.DEBUG = True
asyncio.run(main())

Debug output can be verbose. Save the relevant segment along with your environment details rather than relying on a single generic “freeze” description. The API reference is for version 0.0.25, so check the documentation corresponding to the Pyppeteer version installed in your environment: Pyppeteer API reference.

Record versions and execution environment

Before changing several settings at once, write down the operating system and release, Python version, Pyppeteer version, Chrome/Chromium version and full executable path, whether the run is in a container, CI job, or service, and whether Chrome is headless. Change one variable per reproduction so you can identify what actually changes the result.

One symptom-specific report involved Python 3.11, Fedora 37, and Chrome 115.0.5790.3, with the stall at browser.newPage(). Those particulars help distinguish that report from other failures; they do not establish a universal cause or a generally compatible version combination.

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

Compare the selected Chrome binary

Pyppeteer supports an executablePath launch option for choosing an installed Chrome or Chromium binary. However, the project says Pyppeteer works best with its bundled Chromium. Compare both choices in the affected environment, recording the exact executable path and version each time. Do not assume that the system browser is always better, or that changing binaries will solve every hang.

browser = await launch(executablePath="/path/to/chrome-or-chromium")

Replace the example path with a binary that exists on the target system. In issue #441, a commenter reported getting past the problem on Fedora 38 with Python 3.11 by selecting /usr/bin/google-chrome. That is an anecdotal result in one setup, not a general recommendation. The original reporter later said they had not resolved their own case at that point.

Pyppeteer’s repository describes the project as an unofficial Puppeteer port and says the bundled Chromium is the version with which it works best. Its installation behavior and maintenance note are documented in the Pyppeteer repository.

Do not use --no-sandbox as a routine fix

A commenter on issue #441 also reported success after disabling the Linux sandbox, but explicitly warned that this is less safe. It is not a default fix for a page-creation hang. First determine how the browser is deployed and whether its sandbox can be configured appropriately. If you test sandbox-disabling arguments as a temporary diagnostic, assess what pages the browser may process and keep the security implications in view, especially in multi-tenant environments.

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

The report links to upstream guidance on Linux sandbox configuration, but that Puppeteer guidance may not map exactly to every Pyppeteer and bundled-browser pairing. It does not provide a universal deployment recipe: Puppeteer troubleshooting: setting up the Chrome Linux sandbox.

Separate page creation from navigation waits

If your markers show that newPage() completed, the problem is later than page creation. Pyppeteer’s Page.goto() has navigation timeout behavior and supports different waitUntil conditions, including load, domcontentloaded, and network-idle events. A navigation timeout is different from a failure to create a page.

response = await page.goto(
    "https://example.com",
    {"waitUntil": "domcontentloaded", "timeout": 30000},
)

Choose the event that matches the task. A page that keeps making network requests may not reach a network-idle condition when you expect it to; waiting for DOM content or load can be more appropriate for some workflows. Conversely, a task that depends on later network activity may need a different wait. Use the API reference for the installed version to confirm supported options.

Handle similar-looking failures separately

A different GitHub report describes a Target closed protocol error while using headless=False with Pyppeteer 1.0.2. It demonstrates that headful operation can fail in a particular configuration; it does not prove that switching to headless or headful mode fixes freezes generally. Treat the actual exception and last completed operation as evidence, not a reason to toggle display mode at random: Pyppeteer issue #435.

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

Decide whether to keep Pyppeteer or migrate

The Pyppeteer repository calls the project unmaintained and says, “Please consider playwright-python as an alternative.” If your failure depends on a browser pairing or behavior that is difficult to maintain, migration may be worth evaluating. It is a maintenance decision, not proof that Playwright Python will fix every environment-specific stall. Validate the pages, waits, browser settings, and deployment requirements your application actually uses.

For issue-specific context, Pyppeteer issue #441 contains the Fedora/Python/Chrome report and the later commenter’s two reported workarounds. The reports are user experiences, not maintainer-confirmed root-cause analysis.

Troubleshooting checklist

  1. Mark each await. Identify the last completed call: launch(), newPage(), goto(), or a later wait.
  2. Turn on logging. Run with logLevel=logging.DEBUG; enable pyppeteer.DEBUG = True if errors are being suppressed.
  3. Capture the environment. Record OS, Python and Pyppeteer versions, browser version and path, headless/headful mode, and whether the run is in CI, a container, or a service.
  4. Compare one browser variable at a time. Test the bundled Chromium and, if appropriate, a known installed binary through executablePath.
  5. Inspect waits only after locating navigation. If the script reached goto(), check timeout and waitUntil behavior rather than treating it as a launch stall.
  6. Assess security before sandbox changes. Do not adopt a sandbox-disabling argument without understanding its risk and deployment context.
  7. Reassess maintenance cost. If keeping the browser pairing stable is becoming costly, evaluate the repository’s suggested Playwright Python alternative against your workflow.
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 your goal is simply a screenshot or PDF rather than controlling a browser session, ScreenshotNeo offers a one-request capture API. It accepts consent banners as a visitor and removes known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents.

For a screenshot, the cURL request below saves a WebP file. Replace YOUR_API_KEY with your key; the options and response details are in the ScreenshotNeo API documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python equivalent:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js equivalent:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo includes 1,000 screenshots a month on its free plan with no card required; paid plans start at $5 for 3,000. Every feature is available on every plan. See ScreenshotNeo or sign up free for 1,000 screenshots a month, with no card.

Frequently Asked Questions

Does a visible Chrome window prove Pyppeteer finished launching?

No. A process or window can exist while connection or page-target initialization is still pending. Use markers around awaited calls to identify the actual stopping point.

Should I always add --no-sandbox on Linux?

No. A user reported it as a workaround and warned that it is less safe; do not treat it as a routine fix.

Will changing to Playwright Python definitely fix the freeze?

No. The Pyppeteer repository suggests it as an alternative because Pyppeteer is unmaintained, but migration is not a guaranteed fix for every environment-specific problem.

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

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.

Read next

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.