Repository navigation
Description
Last Good Version
1.64.1
First Bad Version
1.65.0
Steps to reproduce
- Clone https://github.com/bartech-lab/firefox-aria-reflection-crash
- npm ci
- npx playwright install firefox
- npm test
- You should see 2 failures with "Page crashed", and 3 control tests passing
The failing test is:
await page.setContent(`<span id="l">Save</span><button id="b" aria-labelledby="l"></button>`);
await page.evaluate(() => document.getElementById('b').ariaLabelledByElements);
await page.getByRole('button', { name: 'Save' }).click({ trial: true });Expected behavior
The test passes, as it does on Chromium and WebKit.
Actual behavior
locator.click: Page crashed. The Firefox content process exits on signal 11.
20 of 20 runs crash, in either read order. The controls pass 30 of 30: main world twice, utility world twice, and no aria-labelledby. It also reproduces on main at 58d69dc.
The test does not need its own read. A real suite hit this in two ways:
- locator.dispatchEvent() resolves getByRole in the main world, then an action or assertion resolves it in the utility world.
- getByRole in the utility world, then an @axe-core/playwright scan. A plain page.evaluate of the property crashes at the same point. I did not identify which axe call crashes.
Additional context
This is a Firefox bug, which #43577 exposed by reading element.ariaLabelledByElements in the utility world. It also crashes stock Firefox 159.0.1 and Nightly 162.0a1 with an extension content script: https://bugzilla.mozilla.org/show_bug.cgi?id=2090055, with a tested patch. Playwright's Firefox 157 crashes too when a custom selector engine does the same read.
I would like to work on this. I have a change ready for a PR if you approve it:
const attribute = element.getAttribute('aria-labelledby');
const refs = attribute ? getIdRefs(element, attribute) : element.ariaLabelledByElements;One added line in SE-060 crashes Firefox without this change and passes with it. npm run flint passes.
Limit: this does not cover references set from script. If a page sets ariaLabelledByElements and reads it back, the attribute is empty, so Playwright still reads the property and Firefox still crashes. Only the Firefox fix closes that case, so you may prefer to carry it in your Firefox patches, which I did not try.
Environment
System:
OS: Linux 7.2 EndeavourOS
CPU: (16) x64 AMD Ryzen 7 9800X3D 8-Core Processor
Memory: 37.05 GB / 60.20 GB
Container: Yes
Binaries:
Node: 26.13.0 - /usr/bin/node
npm: 12.2.2 - /usr/bin/npm
Deno: 2.9.8 - /usr/bin/deno
Languages:
Bash: 5.3.20 - /usr/bin/bash
npmPackages:
@playwright/test: 1.65.0 => 1.65.0
Activity
bartech-lab commentedon Nov 6, 2026
The full change, with the test, is on this branch if it helps you decide: main...bartech-lab:playwright:fix-43967
github-actions commentedon Nov 6, 2026
microsoft-playwright-automation commentedon Nov 6, 2026
Hi, I'm the Playwright bot and I reproduced this on the current checkout.
Reproduced in Firefox 159.0 (build 1573), on Linux, at
58d69dcc392af3a6994eab0323dc2e883f05f396(1.66.0-next). Chromium and WebKit pass. Direct property reads in the page and an isolated world also crash Firefox, without any role-selector logic. This confirms a Firefox defect, consistent with Mozilla bug 2090055.The attribute fallback would not fix script-set label references: that case also crashes here. The complete fix belongs in Firefox; the upstream patch is proposed but was not verified in this run.
Condensed reproduction and results
Tested headless on Ubuntu 24.04.5 x86-64, using Chromium 158.0.8127.18, Firefox 159.0 and WebKit 27.2:
I also extended the existing
SE-060 should support nametest with a main-world property read before its accessible-name assertion:Chromium and WebKit passed; Firefox crashed in both runs. The debug log confirms that the content process exited on signal 11.
The upstream source has an unchecked write through
aUseCachedValueinElement::GetAttrAssociatedElementsForBindings, matching the two-world trigger. No reporter project or third-party branch was executed. Published versions and headed mode were not tested.Blocked-by: https://github.com/microsoft/playwright-browsers/issues/2682
Triaged on Linux by the Playwright bot - agent run
socrastein commentedon Nov 7, 2026
Another way in, in case it helps:
getByLabeltriggers it too, and so does a plaingetByRole/getByLabellookup followed by an@axe-core/playwrightscan. Running axe-core 4.14.0's 105 rules one at a time aftergetByLabel, onlyaria-prohibited-attrandhidden-contentcrash, so those are the main-world reads in axe. Minimal page:<div aria-labelledby="x"></div>. The element type doesn't matter, and neither does whether the id exists. Replacingaria-labelledbywitharia-label, or skipping the locator, passes.Also reproduced on Windows 10 (19045, Node 22.23.3) with Playwright 1.65.0's Firefox build 1572, so it isn't Linux-specific.
Point the Firefox crash note at its upstream bug
Work around Firefox and WebKit bugs in Playwright v1.65.0
jokoso commentedon Nov 8, 2026
evaluateAllafter a namedgetByRolelookup also seems to be triggering this.pavelfeldman commentedon Nov 9, 2026
Should be fixed in the next FF roll
build(deps): force minimatch 11.0.5 and hold two broken bumps
fix(e2e): Firefox 'Page crashed' (pin Playwright 1.64.1); one sign-in…
chore(deps): sweep backend and frontend dependencies to latest stable
chore(deps): sweep backend and frontend dependencies to latest stable
chore(deps): sweep backend and frontend dependencies to latest stable
21 remaining items
fix(deps): pin playwright to 1.64.1 for Firefox E2E
test(ui): avoid Firefox 159 cross-world ariaLabelledByElements crash
build(deps-dev): Bump playwright-core from 1.64.1 to 1.65.1 (#58)
build(deps): CI-03 Playwright stays at 1.64.1 while its 1.65 Firefox …
Keep Playwright at 1.64.1, since the Firefox of 1.65.1 crashes on rea…
test(desktop): skip two axe scans in Firefox for Playwright's crash
build(deps): vitest 5 and the npm group, with the Playwright image (#472
Tests: axe on Firefox reads aria-labelledby from the attribute, past …
test(e2e): read locator texts outside the page's world
chore(renovate): let Docker image updates through without a release t…
fix(e2e): stay on Playwright 1.64.1 while its Firefox build crashes
test(e2e): skip axe scans in Firefox, which crash the page (#2974)
test(desktop): skip two function axe scans in Firefox (F-226)
feat(desktop): new function dialog, critical points and audify readout (
fix(ui): keep the focus off the page when Cancelling… goes; read arou…