The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Call browser.wsEndpoint() on the Puppeteer Browser object to get its WebSocket endpoint. Save the returned string if you need to reconnect, then pass it to puppeteer.connect({ browserWSEndpoint }). It is a browser automation endpoint—not the URL of a page.
Get the endpoint from a browser Puppeteer launched
Once puppeteer.launch() has returned a browser, call its wsEndpoint() method:
As an Amazon Associate I earn from qualifying purchases.
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
const browserWSEndpoint = browser.wsEndpoint();
console.log(browserWSEndpoint);
// Keep the browser process running, then reconnect with the saved endpoint.
await browser.disconnect();
const browser2 = await puppeteer.connect({ browserWSEndpoint });
// Close the browser when you are finished with it.
await browser2.close();
The documented format is ws://HOST:PORT/devtools/browser/<id>. The host, port, and ID depend on the browser instance; obtain the actual value from wsEndpoint() rather than constructing one yourself. See Puppeteer’s Browser.wsEndpoint() API and Browser API.
Free tools Windows power users keep installed
One-click scans. No signup required.
Disconnecting is not the same as closing
browser.disconnect() detaches the Puppeteer client and leaves the browser running, so it can be connected to again. browser.close() closes the browser. Keep the endpoint available to the process that will reconnect; calling wsEndpoint() on a browser object that is no longer available is not a substitute for saving it before disconnecting.
#1 Best Overall
Get the endpoint from a browser started outside Puppeteer
If Chrome was launched independently, use the debugging endpoint printed by its startup output when available, or request http://HOST:PORT/json/version from the host and debugging port configured for that browser. Read the webSocketDebuggerUrl value from the JSON response, then connect with it:
const browserWSEndpoint = 'ws://HOST:PORT/devtools/browser/<id>';
const browser = await puppeteer.connect({ browserWSEndpoint });
Use the exact endpoint reported by the running browser. The Puppeteer browser management guide describes connecting to an existing browser; the ConnectOptions API documents the connection options.
Rank #2
Know which URL you need
A Puppeteer browser endpoint is a WebSocket address for attaching automation to a browser. It is different from a page URL such as https://example.com, which identifies content to navigate to after connecting. For the browser-level endpoint, use Browser.wsEndpoint(); Puppeteer’s Connection.url() is a differently scoped API and its documentation does not give the same browser-level explanation and format. See the Connection.url() API.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsTransport caveat: not every connection has a WebSocket URL
Puppeteer launch options support pipe: true, which connects through a pipe instead of a WebSocket. In that case, do not expect a WebSocket endpoint as the way to attach to that connection; the cited launch documentation does not identify a URL equivalent for the pipe transport. See LaunchOptions.
Troubleshooting
wsEndpoint is not a function: Check that you are calling it on the browser object returned bypuppeteer.launch(), not on a page, a connection, or the Puppeteer module.- Connection fails after disconnect: Confirm the browser process is still running and that you saved the endpoint before disconnecting. Use
disconnect()when you intend to leave the browser available;close()shuts it down. /json/versiondoes not respond: Verify the host and debugging port for the independently launched Chrome instance, and that its remote debugging endpoint is enabled and reachable from your client. Do not assume a default port if the process was configured differently.- No endpoint is available: Check whether the browser was launched with pipe transport. A pipe is not a WebSocket endpoint.
- Wrong browser or page opens: Ensure you are using the browser-level value from
wsEndpoint()orwebSocketDebuggerUrl, not a page’s ordinary HTTP URL.
Or skip the browser setup
If your goal is simply to capture a website, ScreenshotNeo can return a screenshot or PDF through one GET request, without managing a Puppeteer browser connection. Its cleanup steps can accept cookie or consent banners and remove more than 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 response headers indicate the page verdict and billing status. ScreenshotNeo also provides an MCP server with screenshot, page-info, and PDF tools for AI agents.
For example, use cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Replace YOUR_API_KEY with your key and change the target URL as needed. See the ScreenshotNeo API documentation for request options and other languages. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Learn more at ScreenshotNeo or sign up free for 1,000 screenshots a month with no card.
Quick Recap
Best Value
- Used Book in Good Condition
Rank #4
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.

