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

[Bug]: Chromium: a popup that opens the next popup through its opener never finishes loading when it holds a cross-site iframe

Aperta
#43,629 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
node.js, typescript

Direzione di ricerca

Start by running the supplied Node.js reproduction with Playwright's bundled Chromium, then compare it with the listed same-site, no-iframe, and no-opener variants. The issue names no Playwright source file or test, so trace popup creation and cross-site iframe loading in the Chromium path. Done means both popups reliably reach complete and the reproduction is covered by a regression test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Version

1.64.0-alpha-2026-09-14 (also seen with Playwright Java 1.63.0)

Steps to reproduce
// node repro.mjs — a popup that opens the next popup through its opener, while it holds a cross-site iframe.
import http from 'node:http';
import { chromium } from 'playwright-core';

const server = http.createServer((req, res) => {
  const port = server.address().port;
  const pages = {
    '/': `<!doctype html><html><head><meta charset="utf-8"><title>opener</title></head><body>
      <button id="open">Open</button><script>
      const queue = ['first', 'second'];
      window.next = () => { const name = queue.shift(); if (name) window.open('http://127.0.0.1:${port}/popup?name=' + name, name); };
      document.getElementById('open').addEventListener('click', () => window.next());
      </script></body></html>`,
    // Each popup holds a cross-site iframe, then asks its opener for the next popup while it parses.
    '/popup': `<!doctype html><html><head><meta charset="utf-8"><title>popup</title></head><body><p>Popup</p>
      <iframe src="http://localhost:${port}/frame" style="width:1px;height:1px;border:0"></iframe>
      <script>if (window.opener && window.opener.next) window.opener.next();</script></body></html>`,
    '/frame': `<!doctype html><html><head><meta charset="utf-8"><title>frame</title></head><body>frame</body></html>`,
  };
  const body = pages[req.url.split('?')[0]];
  res.writeHead(body ? 200 : 404, { 'Content-Type': 'text/html', 'Cache-Control': 'no-store' });
  res.end(body || '');
});
await new Promise(r => server.listen(0, '127.0.0.1', r));

let stuck = 0;
const RUNS = 10;
for (let run = 0; run < RUNS; run++) {
  const browser = await chromium.launch();
  const page = await browser.newPage();
  await page.goto(`http://127.0.0.1:${server.address().port}/`);
  await page.click('#open');
  await page.waitForTimeout(2000);
  const [first] = page.context().pages().slice(1);
  if (await first.evaluate(() => document.readyState) !== 'complete') stuck++;
  await browser.close();
}
console.log(`first popup still loading after 2 s: ${stuck}/${RUNS} runs`);
server.close();
Expected behavior

Both popups reach complete, as they do when the same pages are opened in the same Chromium binary without Playwright.

Actual behavior

first popup still loading after 2 s: 7/10 runs (8/10 on a second run of the script). In our longer runs it was still loading after 10 s. The first popup stays interactive: its iframe never finishes loading (frame.waitForLoadState('load') never resolves). The second popup is complete. The server answers every request, the iframe's document included, within milliseconds.

Variant First popup
as above interactive 7/10 and 8/10
window.open without a window name interactive 3/4
iframe on the same site (127.0.0.1 instead of localhost) complete 4/4
popup does not call opener.next() complete 4/4
popup without iframe complete 4/4
same pages, same headless shell binary launched without Playwright (--disable-popup-blocking, the page clicks itself) complete 4/4
same pages, Google Chrome 155 (--headless=new) launched without Playwright complete 4/4

Possibly related: #43496 (a stalled request in a popup, attributed to the opener's session), though no route is involved here.

Additional context

No route, no interception, no context option. Seen with the bundled headless shell (Chromium 153.0.8010.12) and with Google Chrome 155 driven by Playwright Java 1.63.0.

Environment
  • OS: macOS 26 (arm64)
  • Node.js: 22.17.0
  • Browser: chromium headless shell 153.0.8010.12
Lingua principale
TypeScript
Stelle
98.5k
Fork
6.7k
Merge medio
15h 28m
PR unite (30g)
279

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.