Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug]: `--disable-features` in `args` replaces Playwright's own `--disable-features` list

Aperta
#43,557 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
  1. Clone https://github.com/aik099/playwright-disable-features-repro
  2. npm install
  3. npx playwright install chromium
  4. npx 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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/playwright

Tutte le issue di microsoft/playwright

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.