Repository navigation
Description
Description of the bug
The resourceTypes filter of list_network_requests accepts preflight and prefetch, but both return No requests found. on a page that made a CORS preflight and a <link rel=prefetch> request. Both requests are listed in the unfiltered output, but with type other, so they match only resourceTypes: ["other"]. Other types checked (fetch, xhr, ping) filter correctly. Both tested builds behave the same.
Actual behavior
Both builds:
list_network_requests (no filter):
reqid=1 GET http://127.0.0.1:8123/ [200]
reqid=2 GET http://127.0.0.1:8123/data?prefetch [200]
reqid=3 PUT http://localhost:8123/data?cors [200]
reqid=4 OPTIONS http://localhost:8123/data?cors [200]
reqid=5 GET http://127.0.0.1:8123/favicon.ico [200]
resourceTypes ["preflight"] -> No requests found.
resourceTypes ["prefetch"] -> No requests found.
resourceTypes ["other"] -> reqid=2 .../data?prefetch, reqid=4 OPTIONS .../data?cors, reqid=5 .../favicon.ico
resourceTypes ["fetch"] -> reqid=3 PUT .../data?cors
In the earlier fixture run, ping (sendBeacon) and xhr filtered correctly on both builds.
Reproduction
- Save this Node.js script as
types-server.mjsand runPORT=8123 node types-server.mjs. It serves a page that prefetches/dataand sends a cross-originPUTwith a custom header (127.0.0.1tolocalhost, which triggers a preflight); it also opens a WebSocket, which is not needed for this report:
import http from 'node:http';
import crypto from 'node:crypto';
const server = http.createServer((req, res) => {
const port = server.address().port;
if (req.url === '/') {
res.writeHead(200, {'content-type': 'text/html'});
return res.end(`<!doctype html><title>types</title>
<link rel=prefetch href="/data?prefetch">
<script>
fetch('http://localhost:${port}/data?cors', {method: 'PUT', headers: {'X-Custom': '1'}});
const ws = new WebSocket('ws://127.0.0.1:${port}/ws');
ws.onmessage = e => console.log('ws message', e.data);
</script>`);
}
res.writeHead(200, {'content-type': 'text/plain', 'access-control-allow-origin': '*', 'access-control-allow-methods': 'PUT', 'access-control-allow-headers': 'X-Custom'});
res.end('ok');
});
server.on('upgrade', (req, socket) => {
const accept = crypto.createHash('sha1').update(req.headers['sec-websocket-key'] + '258EAFA5-E914-47DA-95CA-C5AB0DC85B11').digest('base64');
socket.write(`HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: ${accept}\r\n\r\n`);
socket.write(Buffer.from([0x81, 2, 0x68, 0x69]));
socket.on('error', () => {});
});
server.listen(Number(process.env.PORT ?? 8123), '127.0.0.1', () => console.log('port', server.address().port));- Send these
tools/callrequests, waiting about one and a half seconds afternew_page:
{"name":"new_page","arguments":{"url":"http://127.0.0.1:8123/"}}
{"name":"list_network_requests","arguments":{"pageId":2}}
{"name":"list_network_requests","arguments":{"pageId":2,"resourceTypes":["preflight"]}}
{"name":"list_network_requests","arguments":{"pageId":2,"resourceTypes":["prefetch"]}}
{"name":"list_network_requests","arguments":{"pageId":2,"resourceTypes":["other"]}}
{"name":"list_network_requests","arguments":{"pageId":2,"resourceTypes":["fetch"]}}The sequence was run once per build with this server (on an ephemeral port), and once per build with an earlier fixture that also used sendBeacon and XMLHttpRequest and whose preflight was rejected (PUT not allowed); the preflight was typed other in both.
Expectation
The resourceTypes parameter is described as "Filter requests to only return requests of the specified resource types", and its schema enum lists prefetch and preflight among the accepted values (FILTERABLE_RESOURCE_TYPES in src/tools/network.ts). A filter value the schema offers should select the requests of that kind: the OPTIONS preflight for preflight and the <link rel=prefetch> request for prefetch. If a type can never be produced, it should not be offered.
MCP configuration
--headless --isolated --no-usage-statistics --no-performance-crux unless the reproduction states otherwise (update checks disabled with CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1).
Chrome DevTools MCP version
1.10.1 (npm) and main 5ddb0a3 (local build)
Chrome version
154.0.8037.98 (stable)
Node version
v22.23.2
Operating system
macOS 27.0
Environment details
- chrome-devtools-mcp 1.10.1 from npm (the release build).
- chrome-devtools-mcp built from
mainat commit 5ddb0a3 (themainbuild). - Google Chrome 154.0.8037.98 stable, headless; Node v22.23.2; macOS 27.
- Both builds were started with
--headless --isolated --no-usage-statistics --no-performance-cruxandCHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1, and driven by a scripted stdio MCP client. In a fresh isolated session the page opened bynew_pagehas page ID 2.
Evidence
- Expected source:
resourceTypesdescription andFILTERABLE_RESOURCE_TYPESenum (src/tools/network.ts:13-33and:59-64on themainbuild);docs/tool-reference.mdlist_network_requests. - Failure source: scripted MCP runs above on both builds (ports replaced by 8123 in the output above).
- Evidence provenance: observed
- Local verification: reproduced
- Reproduction completeness: complete
Which layer assigns other to these requests (Chrome's Network.requestWillBeSent type or Puppeteer's HTTPRequest.resourceType()) was not determined.
Fix check
With the server above, resourceTypes: ["preflight"] returns the OPTIONS .../data?cors request and ["prefetch"] returns .../data?prefetch; or, if either type cannot be detected, that value is no longer accepted by the schema and the docs. Control: ["fetch"] still returns only the PUT, ["other"] still returns favicon.ico, and an unfiltered call still lists every request.
Additional context
The full open and closed issue and PR corpus was screened as of 2026-10-06. Closed #397 concerned get_network_request returning the preflight instead of the real request and does not involve filtering. PR #162 introduced resource-type filtering. The same page's WebSocket connection is missing from every listing, which is reported separately because it fails differently (the request is absent, not mistyped) and has its own restoration signal.
Activity
fix: let resourceTypes match CORS preflights and prefetches (ChromeDe…