[Bug]: `--disable-features` in `args` replaces Playwright's own `--disable-features` list
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
- Ambito
- testing-qa
Direzione di ricerca
Start in packages/playwright-core/src/server/chromium/chromium.ts, where the issue says user args are appended, and inspect chromiumSwitches.ts for Playwright’s default --disable-features value. Reproduce with the linked test and compare the two launch arguments and storage result. Done means user-supplied disabled features are merged with Playwright’s defaults and both projects pass; the reporter asks whether this approach is acceptable, so check the thread for maintainer direction first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version
1.64.1
Steps to reproduce
- Clone https://github.com/aik099/playwright-disable-features-repro
npm installnpx playwright install chromiumnpx playwright test
The same test runs in two projects. The only difference is launchOptions: { args: ['--disable-features=WebOTP'] } in the second one. It checks that a cross-site iframe still shares localStorage with its first-party site, which holds because Playwright disables ThirdPartyStoragePartitioning (#32230).
Expected behavior
Both projects pass. A user --disable-features adds to the features Playwright disables, the way ChromeDriver handles it: enable-features, disable-features, enable-blink-features and disable-blink-features (joined with ,) and js-flags (joined with a space) are treated as multi-valued, and every occurrence is merged, ChromeDriver's own defaults included (kMultivaluedSwitches / SetMultivaluedSwitch()).
Actual behavior
The with --disable-features=WebOTP project fails, because the iframe gets partitioned storage:
[with --disable-features=WebOTP] › tests/disable-features.spec.ts:5:5 › cross-site iframe shares storage with its first-party site
Expected: "first-party value"
Received: null
Chromium keeps only the last value of a repeated switch, and Playwright puts its own --disable-features=... from chromiumSwitches.ts before the user args. chrome://version shows both:
--disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,DestroyProfileOnBrowserClose,...,msEdgeUpdateLaunchServicesPreferredVersion
--disable-features=WebOTP
so all 18 of Playwright's entries are dropped without a warning, including the redirect/interception workarounds (BlockOriginHeaderModificationOnRedirect, AvoidCorsURLLoaderRestartOnRedirect).
Additional context
The last-value-wins part on its own, with two features visible from JS ("OTPCredential" in window, "xr" in navigator):
args |
WebOTP | WebXR |
|---|---|---|
--disable-features=WebOTP |
off | on |
--disable-features=WebOTP, --disable-features=WebXR |
on | off |
--disable-features=WebOTP,WebXR |
off | off |
Same results with chromium-headless-shell and channel: 'chromium', on macOS and Linux arm64.
A merge would fit in chromium.ts, where the user args are appended (chromeArguments.push(...args)). The current workaround is to copy Playwright's list into your own --disable-features value and keep it in sync on every upgrade.
I'd like to work on this if the approach is OK.
Environment
System:
OS: macOS 26.7
CPU: arm64
Binaries:
Node: 26.11.1
npm: 11.20.0
npmPackages:
@playwright/test: 1.64.1 => 1.64.1
- Lingua principale
- TypeScript
- Stelle
- 98k
- Fork
- 6.6k
- Merge medio
- 16h 20m
- PR unite (30g)
- 301
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/playwright
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
microsoft/playwright#43581 · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature]: Set `this.name` in `TargetClosedError` constructorForse di nuovo libera @LeonxLJX l’ha presa 49 giorni fa e non c’è nessuna pull request aperta. ApertaP3-collecting-feedback
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
microsoft/playwright#42522 · 7 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
microsoft/playwright#43586 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
microsoft/playwright#43587 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 55/100
microsoft/playwright#43588 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/playwright
Issue simili
-
createAI: the ai peer range allows ai@6, which the provider cannot work withForse già presa @akhil9tiet l’ha presa oggi. Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
cloudflare/agents#2690 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[fullsend] E2E: theme — global-header ignores app.branding.fullLogo (RHDHBUGS-3670)Forse già presa @fullsend-ai-coder l’ha presa oggi. Apertae2e-failure ready-to-code
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
redhat-developer/rhdh-plugin-export-overlays#4503 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
needs triage 📥
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
ethereum/ethereum-org-website#19601 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
cloudscape-design/components#5184 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
agilepathway/label-checker#805 ·
I maintainer di solito rispondono entro 1 giorno