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 desk5 min

How Puppeteer Manages Browser Processes

Puppeteer either owns a browser it launches or attaches to one managed elsewhere. Learn which shutdown method to use, how to inspect process ownership and how to avoid closing a shared browser.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Puppeteer either launches a browser process that your Node.js application owns, or connects to a browser that another process owns. The distinction determines cleanup: call await browser.close() to shut down a browser Puppeteer launched; call browser.disconnect() to end Puppeteer’s connection while leaving the external browser running. For a launched browser, browser.process() returns its Node.js child-process handle; for a connected browser, it returns null.

The two ways Puppeteer gets a browser

Launch a browser your application owns

Call puppeteer.launch(options) to start a browser and receive a Browser handle. Puppeteer then manages the process it created, and your application can close it when its work is finished. The launch options configure such details as browser selection, executable or release channel, command-line arguments, environment variables, user-data directory, headless behavior and transport.

Puppeteer says it works best with the Chrome for Testing build it downloads by default, and does not guarantee compatibility with arbitrary Chrome versions. With puppeteer-core, you must supply either options.executablePath or options.channel. See the PuppeteerNode.launch() documentation.

Connect to a browser managed elsewhere

Call puppeteer.connect() with the browser’s WebSocket endpoint to attach to an already-running browser. This is useful when a separate service, container supervisor or application owns startup and shutdown. Puppeteer controls its client session, but does not own the external browser process; disconnecting the client leaves the browser and its pages running. See Puppeteer’s browser management guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
AMD RYZEN 7 9800X3D 8-Core, 16-Thread Desktop Processor
  • The world’s fastest gaming processor, built on AMD ‘Zen5’ technology and Next Gen 3D V-Cache.
  • 8 cores and 16 threads, delivering +~16% IPC uplift and great power efficiency
  • 96MB L3 cache with better thermal performance vs. previous gen and allowing higher clock speeds, up to 5.2GHz
  • Drop-in ready for proven Socket AM5 infrastructure
  • Cooler not included

Choose who owns shutdown

Situation Use Effect
Your Node application starts and owns the browser puppeteer.launch(), then await browser.close() during cleanup Gracefully closes the browser process.
A service or another process owns the browser puppeteer.connect(), then browser.disconnect() when your client is done Detaches Puppeteer; the browser remains running.
You need the process handle for a launched browser browser.process() Returns a Node.js ChildProcess; returns null for a connected browser.

Make this decision by asking who should restart the browser, whether ending this Puppeteer client should terminate it, and how much control the deployment needs over the executable and version. Do not use browser.close() on a shared browser session when another client or service still depends on that browser.

Launch, connect, inspect and clean up

This Node.js example launches a browser, captures a page title and closes the browser even if page work fails. Install Puppeteer in the project first; the example uses its downloaded browser rather than a manually selected executable.

Rank #2
AMD Ryzen 9 9950X3D 16-Core Processor
  • AMD Ryzen 9 9950X3D Gaming and Content Creation Processor
  • Max. Boost Clock : Up to 5.7 GHz; Base Clock: 4.3 GHz
  • Form Factor: Desktops , Boxed Processor
  • Architecture: Zen 5; Former Codename: Granite Ridge AM5
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch();
  try {
    const page = await browser.newPage();
    await page.goto('https://example.com');
    console.log(await page.title());
  } finally {
    await browser.close();
  }
})();

If you are using puppeteer-core, provide a compatible executable or release channel in the launch options. If a separate service already runs Chrome, connect using the WebSocket endpoint provided by that service and disconnect after your work:

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.connect({
    browserWSEndpoint: process.env.BROWSER_WS_ENDPOINT,
  });
  try {
    const page = await browser.newPage();
    await page.goto('https://example.com');
    console.log(await page.title());
  } finally {
    browser.disconnect();
  }
})();

The endpoint must be supplied by the external browser owner; this example does not start that browser. To inspect ownership, call browser.process() on the handle: a launched instance has a child-process handle, while a connected instance returns null. That return value is an ownership clue, not a way to obtain the external process.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
AMD Ryzen 5 5500 6-Core, 12-Thread Unlocked Desktop Processor with Wraith Stealth Cooler
  • Can deliver fast 100 plus FPS performance in the world's most popular games, discrete graphics card required
  • 6 Cores and 12 processing threads, bundled with the AMD Wraith Stealth cooler
  • 4.2 GHz Max Boost, unlocked for overclocking, 19 MB cache, DDR4-3200 support
  • For the advanced Socket AM4 platform

Launch settings and signal handling

The LaunchOptions interface documents controls for executable selection, arguments, environment, user-data directory, headless mode, startup timeout and WebSocket or pipe transport. In the generic current documentation, Chrome is the default browser, headless mode is enabled by default, and startup timeout is 30 seconds. These defaults are version-sensitive; check the documentation for the installed Puppeteer version rather than assuming they apply unchanged to every release.

Launch options enable handling of SIGHUP, SIGINT and SIGTERM by default, with documented behavior that closes the browser process on those signals. An optional AbortSignal can also close the browser when aborted. If your application installs its own signal handlers or cancellation logic, make sure they do not conflict with or duplicate Puppeteer’s cleanup.

Rank #4
Sale
AMD Ryzen™ 5 9600X 6-Core, 12-Thread Unlocked Desktop Processor
  • Pure gaming performance with smooth 100+ FPS in the world's most popular games
  • 6 Cores and 12 processing threads, based on AMD "Zen 5" architecture
  • 5.4 GHz Max Boost, unlocked for overclocking, 38 MB cache, DDR5-5600 support
  • For the state-of-the-art Socket AM5 platform, can support PCIe 5.0 on select motherboards
  • Cooler not included

Browser binaries and process handles

browser.process() is available for a Puppeteer-launched browser and returns the associated Node.js ChildProcess; a browser reached through puppeteer.connect() has no process owned by that Puppeteer client, so the method returns null. See the Browser.process() API reference.

The separate @puppeteer/browsers package documents browser installation, listing, executable-path computation, launching and uninstalling. Its Process wrapper exposes the underlying Node child process, close and kill operations, closed-state inspection and recent browser logs. Configuration and package details are in the Configuration interface and @puppeteer/browsers API.

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.
Best Value
Sale
AMD Ryzen 7 7800X3D 8-Core, 16-Thread Desktop Processor
  • Processor provides dependable and fast execution of tasks with maximum efficiency.Graphics Frequency : 2200 MHZ.Number of CPU Cores : 8. Maximum Operating Temperature (Tjmax) : 89°C.
  • Ryzen 7 product line processor for better usability and increased efficiency
  • 5 nm process technology for reliable performance with maximum productivity
  • Octa-core (8 Core) processor core allows multitasking with great reliability and fast processing speed
  • 8 MB L2 plus 96 MB L3 cache memory provides excellent hit rate in short access time enabling improved system performance
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common process-management problems

  • The browser keeps running after your code finishes. If you launched it, ensure the code reaches and awaits browser.close(). If you connected to it, this is expected: browser.disconnect() detaches the client and leaves the externally managed browser alive.
  • A shared browser disappears unexpectedly. Check whether code calls browser.close() on a connected session. Use browser.disconnect() when only the client should end.
  • browser.process() returns null. This is expected for a browser attached through puppeteer.connect(); the launcher outside Puppeteer owns its process.
  • puppeteer-core cannot find a browser executable. Set executablePath or channel in launch options, and use a browser version compatible with the installed Puppeteer release.
  • A browser closes when the Node process receives a signal. Puppeteer’s documented launch defaults handle SIGHUP, SIGINT and SIGTERM by closing the browser. Review your application’s own signal handlers and the launch options if that is not the intended lifecycle.
  • Startup fails or times out. Verify the executable or channel, browser installation and launch configuration. The generic documented startup timeout is 30 seconds, but confirm the setting for your installed version and adjust the launch option if the environment needs longer.

Or skip the browser setup

If your task is simply to capture a webpage rather than manage a browser process, ScreenshotNeo is a screenshot API and MCP server for developers. One GET request returns a PNG, JPEG, WebP or PDF. See the ScreenshotNeo documentation.

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

ScreenshotNeo accepts cookie and consent banners and removes 60+ known consent platforms, newsletter popups and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads and cache hits are not billed, and responses report page verdict and billing headers. Its MCP server provides take_screenshot, get_page_info and capture_pdf for AI agents and 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 ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.

FAQ

Does browser.disconnect() close pages?

It ends Puppeteer’s connection; the browser and its pages remain running.

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

Can I get a process handle for a browser launched by another service?

Not through browser.process() on a connected Puppeteer handle; it returns null because Puppeteer did not launch that process.

Quick Recap

SaleBestseller No. 1
AMD RYZEN 7 9800X3D 8-Core, 16-Thread Desktop Processor
AMD RYZEN 7 9800X3D 8-Core, 16-Thread Desktop Processor
8 cores and 16 threads, delivering +~16% IPC uplift and great power efficiency; Drop-in ready for proven Socket AM5 infrastructure
$443.00
Bestseller No. 2
AMD Ryzen 9 9950X3D 16-Core Processor
AMD Ryzen 9 9950X3D 16-Core Processor
AMD Ryzen 9 9950X3D Gaming and Content Creation Processor; Max. Boost Clock : Up to 5.7 GHz; Base Clock: 4.3 GHz
$669.99
SaleBestseller No. 3
AMD Ryzen 5 5500 6-Core, 12-Thread Unlocked Desktop Processor with Wraith Stealth Cooler
AMD Ryzen 5 5500 6-Core, 12-Thread Unlocked Desktop Processor with Wraith Stealth Cooler
6 Cores and 12 processing threads, bundled with the AMD Wraith Stealth cooler; 4.2 GHz Max Boost, unlocked for overclocking, 19 MB cache, DDR4-3200 support
$87.95
SaleBestseller No. 4
AMD Ryzen™ 5 9600X 6-Core, 12-Thread Unlocked Desktop Processor
AMD Ryzen™ 5 9600X 6-Core, 12-Thread Unlocked Desktop Processor
Pure gaming performance with smooth 100+ FPS in the world's most popular games; 6 Cores and 12 processing threads, based on AMD "Zen 5" architecture
$174.95
SaleBestseller No. 5
AMD Ryzen 7 7800X3D 8-Core, 16-Thread Desktop Processor
AMD Ryzen 7 7800X3D 8-Core, 16-Thread Desktop Processor
Ryzen 7 product line processor for better usability and increased efficiency; 5 nm process technology for reliable performance with maximum productivity
$348.00

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. 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…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver 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.