`goto({ waitUntil: "hydration" })` times out on Firefox — `window.useNuxtApp?.().isHydrating` never resolves
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- nuxt, playwright, typescript
- 領域
- testing-qa
調査の方向性
src/e2e/browser.ts の 69 行目付近にある waitForFunction の呼び出しから始め、続いて 72 行目付近にある関連する waitUntil: "route" の処理を調べます。提供された Playwright 設定を使って、Chromium、Firefox、WebKit でサンプルアプリを再現します。完了条件は、既存の browser プロジェクトを壊さずに、Firefox で hydration と route の待機が解決されることです。
索引モデルが issue の本文から書いたものです。
説明
Environment
- Operating System: Windows 11 Enterprise (10.0.26100)
- Node Version: v20.20.0
- Nuxt Version: 4.4.2
- CLI Version: 3.34.0
- Nitro Version: 2.13.3
- Package Manager: [email protected]
- Builder: vite
- @nuxt/test-utils Version: 4.0.0
- @playwright/test Version: 1.59.1
- Vue Version: 3.5.32
Reproduction
Minimal repro using the test-utils example app:
- Clone the https://stackblitz.com/github/nuxt/test-utils/tree/main/examples/app-vitest or any Nuxt app with Playwright E2E tests
- Add a Firefox project to
playwright.config.ts:
projects: [
{ name: "chromium", use: { ...devices["Desktop Chrome"] } },
{ name: "firefox", use: { ...devices["Desktop Firefox"] } },
]
- Write a test using
gotowithwaitUntil: "hydration":
import { expect, test } from "@nuxt/test-utils/playwright";
test("page loads", async ({ page, goto }) => {
await goto("/", { waitUntil: "hydration" });
await expect(page.locator("body")).toBeVisible();
});
- Run:
npx playwright test - Chromium passes. Firefox times out at
goto().
Describe the bug
When using goto(url, { waitUntil: "hydration" }) with Playwright's Firefox project, the call never resolves and the test times out. The page loads fully — Playwright's page snapshot confirms the entire DOM is rendered, auth works, routing completes — but the hydration detection never fires.
The root cause is in https://github.com/nuxt/test-utils/blob/main/src/e2e/browser.ts#L69:
await page.waitForFunction(() => window.useNuxtApp?.().isHydrating === false)
In Firefox, this waitForFunction call never resolves. Either window.useNuxtApp is not exposed to the page's global scope in Firefox, or isHydrating never transitions from true to false.
This affects 100% of tests that use waitUntil: "hydration" (or waitUntil: "route"), making Firefox E2E testing impossible with @nuxt/test-utils.
Chromium: passes
WebKit: passes
Firefox: 0% pass rate (all timeout)
Additional context
- The app renders and functions correctly in Firefox — this is purely a test-utils detection issue, not a browser compatibility problem.
- Tested with a production Nuxt 4.4.2 app (55 E2E specs). Chromium and WebKit both pass 100%. Firefox fails 100%, all at the waitForHydration call.
- The waitUntil: "route" option (line 72, same file) likely has the same issue since it also relies on window.useNuxtApp?.().
- Playwright version 1.59.1 with Firefox 148.0.2.
Logs
Error: page.goto: Test timeout of 30000ms exceeded.
Call log:
- navigating to "https://example.com/", waiting until "load"
at goto (node_modules/@nuxt/test-utils/dist/playwright.mjs:46:35)
- 主要言語
- TypeScript
- スター
- 445
- フォーク
- 121
- 平均マージ
- 3日 11時間
- マージ済み PR(30日)
- 23
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nuxt/test-utils のほかの issue
-
nuxt environment: `fetch(new Request(url))` fails with `Failed to parse URL from [object Request]`対応中かも @yamachi4416 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
nuxt/test-utils#1891 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
nuxt/test-utils#1889 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
nuxt/test-utils#1883 ·
メンテナーはふだん 2 日以内に返信
-
pending triage
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
nuxt/test-utils#1607 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
`@vitest-environment-options` is not working対応中かも @yamachi4416 が 210 日前に担当しました。 オープンpending triage
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
nuxt/test-utils#1541 · リアクション 2 件 ·
メンテナーはふだん 2 日以内に返信
nuxt/test-utils の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Search input loses focus while typing on the Inventory, Reservations and Locations lists (view_configurations enabled)対応中かも @medusa-os-bot が今日担当しました。 オープンstatus: needs triaging type: bug version: 2.0
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
medusajs/medusa#17886 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
marimo-team/marimo#11949 ·
メンテナーはふだん 1 日以内に返信
-
bug server-time v2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
modelcontextprotocol/servers#5559 ·
メンテナーはふだん 1 日以内に返信
-
D1 Time Travel restore help advertises 30 days without a plan qualifier対応中かも @akhil9tiet が今日担当しました。 オープンbug package:wrangler product:d1
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
cloudflare/workers-sdk#17000 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信