(Created on )

Puppeteer: Invalid DevToolsActivePort '{value}' found

DevToolsActivePort lacks the expected port or browser-path lines.


DevToolsActivePort lacks the expected port or browser-path lines.

Error message

Invalid DevToolsActivePort '{value}' found

{value} is replaced by the value shown in your error message.

How this error happens

The DevToolsActivePort file must contain a port and a browser WebSocket path. A truncated or stale file is not a complete endpoint.

The snippets use the imported puppeteer instance. The failing case assumes the profile file has the problem described above.

const browser = await puppeteer.connect({
    channel: "chrome",
});

For example, a file containing only 9222 is missing its browser path. This error can be nested inside “Could not find DevToolsActivePort.”

How to fix

Let Puppeteer launch a dedicated automation browser instead of discovering an unavailable or corrupt endpoint in a system profile.

const browser = await puppeteer.launch({
    browser: "chrome",
});

Things to keep in mind

If you must attach to an existing managed browser, use its actual browserWSEndpoint or browserURL. Do not write guessed ports or browser IDs into DevToolsActivePort, and do not reuse your personal profile for automation.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →