-
Notifications
You must be signed in to change notification settings - Fork 2k
feat: expose protocolTimeout as a configurable option #1248
Copy link
Copy link
Closed as not planned
Labels
Description
Problem
When running lighthouse_audit on heavy pages (e.g. pages with ~5.7MB of third-party scripts), the CDP command Network.emulateNetworkConditions times out with:
Network.emulateNetworkConditions timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.
The current connectOptions in browser.ts don't set protocolTimeout, so Puppeteer's default (180s) is inherited. There's no way for users to increase this.
Proposed Solution
Add --protocolTimeout as a CLI argument / server option, and pass it through to the Puppeteer connect() options:
const connectOptions: Parameters<typeof puppeteer.connect>[0] = {
targetFilter: makeTargetFilter(enableExtensions),
defaultViewport: null,
handleDevToolsAsPage: true,
protocolTimeout: options.protocolTimeout ?? 180_000,
};This would allow users to configure it in their MCP server setup:
{
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest", "--protocolTimeout", "300000"]
}Context
- Reproduced on a Magento ecommerce site with 17 third-party vendors (~5.7MB JS)
performance_start_traceworks fine (no network emulation)lighthouse_auditfails in bothnavigationandsnapshotmodes- The timeout is on the CDP protocol command itself, not the page load
Reactions are currently unavailable