Repository navigation
Description
Version
1.63.0 (matching bundled full Chromium 153.0.8010.12). The same script also reproduces with playwright-core 1.62.1 / Chromium 151.0.7922.34.
Steps to reproduce
The repository must remain private under the account owner's policy; maintainers will not have access by default. I understand the template requests a repository. To make this report independently reproducible without access, the complete synthetic script and exact dependency are included below. It contains no application code or application data.
In an empty directory, save the following as package.json:
{
"name": "playwright-no-store-stream-repro",
"private": true,
"type": "module",
"devDependencies": { "playwright-core": "1.63.0" }
}Save the following as repro.mjs:
import { createServer } from 'node:http';
import { chromium } from 'playwright-core';
const server = createServer((req, res) => {
const url = new URL(req.url, 'http://localhost');
if (url.pathname !== '/data') return res.end('<html>synthetic reproduction</html>');
res.writeHead(200, {
'Content-Type': 'application/json',
'Cache-Control': url.searchParams.get('cache'),
});
res.write('{"ok":');
setTimeout(() => res.end('true}'), 20);
});
await new Promise(resolve => server.listen(0, '127.0.0.1', resolve));
const origin = `http://127.0.0.1:${server.address().port}`;
const browser = await chromium.launch({ headless: true, executablePath: chromium.executablePath() });
const results = [];
try {
for (const [cache, reader] of [['no-store', 'stream'], ['no-store', 'json'], ['no-cache', 'stream']]) {
for (let repeat = 0; repeat < 2; repeat++) {
const context = await browser.newContext();
try {
const page = await context.newPage();
await page.goto(origin);
const matches = request => new URL(request.url()).pathname === '/data';
const terminal = new Promise(resolve => {
page.on('requestfinished', request => {
if (matches(request)) resolve({ event: 'requestfinished' });
});
page.on('requestfailed', request => {
if (matches(request)) resolve({ event: 'requestfailed', failure: request.failure()?.errorText });
});
});
const headers = page.waitForResponse(response => matches(response.request()));
const application = page.evaluate(async ({ cache, reader }) => {
const response = await fetch(`/data?cache=${cache}`);
if (reader === 'json') return (await response.json()).ok;
const handle = response.body.getReader();
const chunks = [];
while (true) {
const { done, value } = await handle.read();
if (done) break;
chunks.push(...value);
}
handle.releaseLock();
return JSON.parse(new TextDecoder().decode(new Uint8Array(chunks))).ok;
}, { cache, reader });
const response = await headers;
let hostBodyOk = false;
let hostError = null;
try { hostBodyOk = (await response.json()).ok === true; }
catch (error) {
hostError = error.message.includes('No data found for resource with given identifier')
? 'Network.getResponseBody: No data found for resource with given identifier'
: 'Other response body error';
}
results.push({ cache, reader, repeat, pageBodyOk: await application, hostBodyOk, hostError, terminal: await terminal });
} finally { await context.close(); }
}
}
console.log(JSON.stringify({ node: process.version, browser: browser.version(), results }, null, 2));
} finally {
await browser.close();
server.closeAllConnections();
await new Promise(resolve => server.close(resolve));
}Run on Linux:
npm install --ignore-scripts --no-audit --no-fund --registry=https://registry.npmjs.org
export PLAYWRIGHT_BROWSERS_PATH="$(mktemp -d)"
npx playwright-core install chromium
timeout 30s node repro.mjsThe repository pins the same version and includes a lockfile, so a repository checkout can use npm ci.
Expected behavior
All six responses are completely consumed by the page. For each, Playwright should emit requestfinished, and host-side response.json() should return {"ok":true}.
Actual behavior
Both no-store + stream repetitions:
- Page reader reaches
done: true, parses all 11 bytes and returnsok: true. - Playwright emits
requestfailedwithnet::ERR_ABORTED. - Host
response.json()fails withNetwork.getResponseBody: No data found for resource with given identifier.
Both no-store + native response.json() controls and both no-cache + stream controls emit requestfinished and allow host body reading. The same six-case result was observed on both versions listed above.
The process exits 0 after printing the diagnostic results; exit 0 is not a passing assertion.
Additional context
This uses only a synthetic loopback Node HTTP server and Playwright. There is no AbortController, reader.cancel, request interception, response mocking, Service Worker, application framework, account or database. Each page/context is closed only after the page promise and original request terminal event have completed.
The server's 20 ms delay separates two writes; it is not a client-side sleep intended to fix or hide a failure. Full Chromium is launched using chromium.executablePath(). Changing to no-cache is only a diagnostic control, not a proposed workaround for sensitive responses that must retain no-store.
I have not established the upstream implementation cause or whether it belongs to Chromium or Playwright. No application workaround is being claimed.
Environment
Manually allowlisted environment fields (no environment-variable dump):
- OS: Ubuntu 26.04 LTS, Linux x86_64 under WSL2
- Kernel: 6.18.33.1-microsoft-standard-WSL2
- Node: 22.23.2
- npm: 10.9.8
- playwright-core: 1.63.0, exact npm dependency
- Browser: bundled Chromium 153.0.8010.12, headless, full executable
Activity
etonedu2026 commentedon Sep 16, 2026
Additional synthetic isolation and an exact-revision source-level hypothesis. This is not a verified Chromium fix or a captured C++ call stack.
Controlled response comparison
Using Playwright 1.62.1 and its Chromium 151.0.7922.34, a loopback Node HTTP server returned only the fixed 11-byte body
{"ok":true}with HTTP/1.1,Content-Length: 11,Cache-Control: no-store, andConnection: keep-alive. There was no proxy, authentication, database, or application service. The server either wrote the body once or split it into 6 + 5 bytes separated by 20 ms. Each cell below was observed twice:response.json()requestfinished, host body readablerequestfinished, host body readableresponse.body.getReader()looprequestfinished, host body readablerequestfailed/aborted and host body unavailableThese are observed diagnostic counts, not a comprehensive regression suite. The response bytes, HTTP version, headers, and connection policy were held constant.
Two further tiny synthetic comparisons:
Response.clone()before acquiring the original reader, immediately cancelling the unused clone without awaiting that cancellation, changed the split-response result to 2/2requestfinishedwith a readable host body.response.body.tee()with the unused branch cancelled still produced 2/2 page success but native aborted/host body unavailable.I am not recommending clone as a workaround. In this revision, the native tee implementation eagerly reads into destination chunk queues. Cancelling one branch does not impose the application's byte limit/backpressure on the active native queue. Tiny successful examples cannot establish a memory bound.
Source-level reentrancy candidate
Browser.getVersionreported productChrome/151.0.7922.34and revision@782af9cb30a53f54487e5d2e44738645a8ec457c. At that exact public revision:OnStateChange()invokes the client before its later terminal-state handling.Close()toCancelConsumer().Cancel()marks it cancelled. Later completion handling ignores a non-loading state, allowing the pending notification to dispatch cancellation rather than completion.That ordering is consistent with the multi-write page-EOF/native-abort discrepancy, but I have not instrumented Blink to prove this is the runtime path, nor proved from this inspection why
no-storeselects it. No patched Chromium build has been tested.Would latching an already-observed terminal state before invoking the reentrant client be an appropriate upstream investigation direction? Any change would need to preserve real transport errors, cancellation, waiting/lookahead and unread-body semantics; valid JSON bytes alone must not turn a truncated or cancelled response into successful delivery.
dcrousso commentedon Sep 18, 2026
this appears to be a Chromium issue rather than a problem with your script and ordinary streaming responses can trigger it without artificial delays
i think https://chromium-review.googlesource.com/c/chromium/src/+/6716020 is maybe relevant?
github-actions commentedon Sep 21, 2026
Hi, I'm the Playwright bot and I took a first look at this.
Reproduced on tip-of-tree (npm
1.64.0-next, sha42fbb78, bundled Chromium 154.0.8037.0). Chromium only — Firefox and WebKit reportrequestfinishedfor the same response. Your narrowing holds exactly: it needsno-storeand a streamingbody.getReader()consumer and a body split across more than one write. Any one of those removed and the request finishes cleanly.Your read of it as a Chromium issue matches what I see, and Devin Rousso (@dcrousso)'s pointer looks like the right thread to pull: crrev.com/c/6716020 — "
Network.loadingFailedis issued for fetch requests with empty response" — touchesresponse_body_loader.cc, the same file your reentrancy hypothesis lands on. It's still WIP upstream (last touched Aug 2025, never landed), so there's nothing to pick up on our side yet.Control matrix (chromium, tip-of-tree, 1 run each)
response.json()no-storegetReader()requestfailed/net::ERR_ABORTEDNo data found for resource with given identifierno-storegetReader()requestfinishedno-storeresponse.json()requestfinishedno-storeresponse.json()requestfinishedno-cachegetReader()requestfinishedno-cachegetReader()requestfinishedno-cacheresponse.json()requestfinishedno-cacheresponse.json()requestfinishedIn every row the page-side reader reached EOF and parsed
{"ok":true}— only the Playwright-observed outcome differs.Also run: the failing case 3x on each of chromium/firefox/webkit (headless). Chromium failed all 3; firefox and webkit passed all 3. Both the headless shell and the full Chromium binary you used show it, so it isn't headless-specific.
Condensed repro (
tests/page/style, fails on chromium)Thanks for the unusually thorough report — the six-case matrix and the exact-revision source pointers made this quick to confirm.
Triaged on Linux by the Playwright bot - agent run
0moku commentedon Oct 1, 2026
Additional evidence for this issue: BYOB and bounded
pipeToalso reproduce the failure, without an HTTP release request or an explicit successful-EOF cancellation in thepipeToarm.Node 22.23.1, Playwright 1.63.0, HeadlessChrome/153.0.8010.12, revision
971a7443b0c9b0a9b2860529b33331b76077ec62.One synthetic HTTP matrix used three fresh-context repetitions per arm. Response:
Cache-Control: no-store, private; fetch:cache: 'no-store'; routing off. Each response sent{"ok":true}in 6 + 5 bytes, with a Playwright host binding releasing the final five bytes—no HTTP ACK endpoint. Default/BYOB issued the next read before invoking the binding. Binding ACK was joined only after body consumption settled.pipeToResponse.json()referenceAll nine bounded positives observed chunks
[6,5], EOF and valid JSON; Node responsefinishoccurred without premature close. Native events nevertheless reportedNetwork.loadingFailed, typeFetch,net::ERR_ABORTED,canceled:true, agreeing with Playwright. Native JSON emittedloadingFinished/requestfinished. There were no additional request failures, and all terminals were observed before teardown. Native JSON's first chunk/raw consumed byte count was not instrumented; it is an unbounded diagnostic control, not a proposed replacement.Seven negative controls retained genuine failures:
ERR_CONTENT_LENGTH_MISMATCH,canceled:false, Node premature close.AbortError/ERR_ABORTED, with Node premature close.Native/PW terminals agreed for 19/19 data requests (12 positive + 7 negative). The
pipeToarm does not explicitly callreader.cancel()after EOF, so that application cleanup call is not necessary for this reproduction. These are finite synthetic observations, not a failing C++ stack or evidence that a bounded workaround is safe.Executed code excerpts (not a standalone reproduction)
The fragments below are copied verbatim from the executed synthetic harness/controller, with no code substitutions. They fit together as described, but omit fixture setup, bookkeeping and lifecycle observers. These fragments are not a separately validated standalone program. No original application helper or private import is included.
Browser: validation, bounded consumers, release ordering and deferred ACK join
The page function receives
spec.arm(A/B/C/D) andspec.kind(positive/oversize/truncated/abort). Its omitted setup creates metrics, an AbortController, and a same-origin fetch of/datawith request cacheno-storeand that controller's signal. The response is passed to the following executed consumer block.releaseFinalBytesis the host binding shown below, not HTTP.Validation functions:
Inside the page function, release signaling and byte accounting:
After fetch resolves, inside the surrounding try/catch:
The surrounding catch records consumer failure (it does not convert it to success), and finally sets
bodySettled=true. Only then is the binding promise joined:BYOB uses a fresh view of at most 16 KiB (or remaining limit + 1), copies accepted views, handles a nonempty final BYOB value before EOF, and has no fallback. A/B both cancel/release in finally; C uses no manual EOF reader cancellation. The normal fixture limit is 131072 bytes; the oversize control uses 256. The native JSON reference deliberately bypasses these bounded-consumer checks.
Controller: Playwright binding and Node 6 + 5 byte response
Each fresh context registers this binding before page creation.
itemis the active fixture case.demandthrows on a false assertion;faultrecords an infrastructure fault. These are synthetic-controller bookkeeping, not application code.The host callback checks the page's metadata and resolves the case's deferred release promise:
In the Node data handler, the executed response header block:
The following is the exact write callback body within the controller's response-completion observer. That observer and its accounting wrapper are omitted, not replaced.
recordcontains server counters;item.release.promiseis the deferred gate resolved above.item.kindselects the positive/negative control. The ordinary positive branch writes{"ok":immediately andtrue}only after release. The explicit-abort control intentionally withholds the remainder.The omitted observer waits for Node response finish/error/premature close. Separate observers capture the original request's CDP and Playwright terminal events before teardown; they retain failures even when the page parsed valid JSON.
yury-s commentedon Oct 2, 2026
Filed upstream https://issues.chromium.org/issues/568852319
yury-s commentedon Oct 6, 2026
Should be fixed by https://chromium-review.googlesource.com/c/chromium/src/+/8508456
Serve test files with no-cache instead of no-store
Check the real site after each deploy; add issue and PR templates (#7)
yury-s commentedon Oct 21, 2026
Fixed by https://chromium-review.googlesource.com/c/chromium/src/+/8508456 upstream, should be working in canary already.
rldyourmnd commentedon Oct 31, 2026
Verification of the Chromium fix (crrev.com/c/8508456, first in 157.0.8090.0) on official Chrome for Testing builds. Synthetic loopback server, Playwright 1.64.1, headless, 3 fresh contexts per cell. The response is
Cache-Control: no-storeand the request usescache: 'no-store'. Each cell checks the CDP terminal event, the Playwright terminal event and the host-side body.getReader()/ BYOB /pipeTo/ pull-through wrapper to EOF; 3 deliveries each (chunked,Content-Length, page-gated second chunk)loadingFailed net::ERR_ABORTED canceledloadingFinished,requestfinished, host body OKresponse.json()(3 deliveries)Content-Length: 12, 11 bytes, FINERR_CONTENT_LENGTH_MISMATCHAbortController.abort()/reader.cancel()mid-bodyERR_ABORTED canceledSo the fixed builds report completion for every stream consumer, and genuine truncation and cancellation still fail as they should. Note that Playwright 1.64.1 (the latest release) still bundles 156.0.8078.4 and is affected;
main(Chromium r1253, 158.0.8127.2) is not.Regression test: #43830 (
NE-144intests/page/page-event-request.spec.ts, next to the 204 test). It delivers the last data chunk and the end of the body separately, each only after the page has read everything before it. It is skipped on Chromium before 157. With that skip removed, it fails 10/10 withnet::ERR_ABORTEDon 156.0.8078.80. It passes on 157.0.8103.15, on bundled r1253, on Firefox r1570 and on WebKit r2387 (Linux).test: move no-store stream test next to 204 request test
fix(e2e): upgrade Playwright to 1.65 for the Chromium no-store EOF fix
test(e2e): check server-action bodies by interception (Chromium 153 n…
fix(belle-tests): revalidate streamed co-op assets without no-store E…
e2e: read a start's answer in the page, not from DevTools
e2e: read the T3 start's answer in the page, not from DevTools