[Bug]: A paused clock still fires a timer the page sets while loading
メンテナーはふだん 1 日以内に返信
@microsoft-playwright-automation がすでに取り組んでいます。
2026年11月3日 から。
- #43873 @microsoft-playwright-automation による — オープン
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, typescript
- 領域
- testing-qa
調査の方向性
The clock logic lives in the injected clock code, where _replayLogOnce() sets _realTime = undefined in the paused branch while _currentRealTimeTimer is left armed; compare with _innerPause(), which disposes it. Start by running the repro test from the issue under the Playwright clock tests. Done when the timer no longer fires with the clock paused, and the test asserting fired is 0 passes in Chromium, Firefox and WebKit.
索引モデルが issue の本文から書いたものです。
説明
After page.clock.pauseAt(), a timer that a newly loaded page sets during load fires once by itself, without runFor or fastForward.
Version: 1.63.0 in Chromium, Firefox and WebKit; also Chromium on 1.60.0, 1.64.1 and 1.65.0-alpha-2026-11-02 (after #43224). Linux, Node 24. Not seen on 1.48 or 1.56.
Repro:
import { test, expect } from "@playwright/test";
test("a paused clock does not fire a timer the page sets while loading", async ({ page }) => {
await page.route("http://repro.test/", (route) =>
route.fulfill({
contentType: "text/html",
body: "<script>window.fired = 0; setTimeout(() => window.fired++, 0);</script>",
}),
);
await page.clock.install({ time: new Date("2024-01-15T12:00:00Z") });
await page.clock.pauseAt(new Date("2024-01-15T12:00:10Z"));
await page.goto("http://repro.test/");
await page.waitForTimeout(500);
expect(await page.evaluate(() => (window as any).fired)).toBe(0);
});
Expected: fired is 0. The clock is paused, so the timer waits for runFor.
Actual: fired is 1, 5 times out of 5 in each case above. Possibly related to #43214, but #43224 does not fix this one.
Cause: in a new document the injected clock starts running, and resume() arms the real-time timer. When _replayLogOnce() replays a log that ends paused, it sets _realTime = undefined but never disposes _currentRealTimeTimer. Up to 100 ms later that timer fires and runs _runTo(now), which fires every timer already due. Disposing the timer in the paused branch, as _innerPause() does, should fix it.
- 主要言語
- TypeScript
- スター
- 99.1k
- フォーク
- 6.8k
- 平均マージ
- 16時間 3分
- マージ済み PR(30日)
- 315
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/playwright のほかの issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/playwright#43875 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
microsoft/playwright#43871 ·
メンテナーはふだん 1 日以内に返信
-
[Feature]: Configure web servers per project対応中かも @microsoft-playwright-automation が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
microsoft/playwright#43853 · コメント 4 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[Feature]: Extend isVisible/toBeVisible API to include overlap detection対応中かも @microsoft-playwright-automation が今日担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
microsoft/playwright#43849 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: connectOverCDP: a tab whose main frame was swapped in by a prerender never initializes, and title()/evaluate() hang forever (default Chrome/Edge settings)対応中かも @dgozman が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
microsoft/playwright#43842 ·
メンテナーはふだん 1 日以内に返信
microsoft/playwright の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
🔊 a11y
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
betagouv/mon-entreprise#4726 ·
メンテナーはふだん 9 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Deltares/fews-pi-requests#357 ·
メンテナーはふだん 1 日以内に返信
-
bug confirmed js v6
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信