Skip to content

fix: prevent useActionState state becoming undefined when redirect() is called (#589) #1921

fix: prevent useActionState state becoming undefined when redirect() is called (#589)

fix: prevent useActionState state becoming undefined when redirect() is called (#589) #1921

Triggered via pull request March 21, 2026 14:12
Status Failure
Total duration 2m 39s
Artifacts 3

ci.yml

on: pull_request
Matrix: create-next-app
Matrix: e2e
Matrix: test-integration
Vitest (integration report)
22s
Vitest (integration report)
Fit to window
Zoom out
Zoom in

Annotations

6 errors, 1 warning, and 7 notices
E2E (app-router)
Process completed with exit code 1.
[app-router] › tests/e2e/app-router/server-actions.spec.ts:174:7 › useActionState › useActionState: redirect does not cause undefined state (issue #589): tests/e2e/app-router/server-actions.spec.ts#L188
2) [app-router] › tests/e2e/app-router/server-actions.spec.ts:174:7 › useActionState › useActionState: redirect does not cause undefined state (issue #589) Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(page).toHaveURL(expected) failed Expected pattern: /\/action-state-test$/ Received string: "http://localhost:4174/action-state-redirect" Timeout: 5000ms Call log: - Expect "toHaveURL" with timeout 5000ms 9 × unexpected value "http://localhost:4174/action-state-redirect" 186 | 187 | // Should navigate to /action-state-test without crashing > 188 | await expect(page).toHaveURL(/\/action-state-test$/); | ^ 189 | await expect(page.locator("h1")).toHaveText("useActionState Test"); 190 | }); 191 | }); at /home/runner/work/vinext/vinext/tests/e2e/app-router/server-actions.spec.ts:188:24
[app-router] › tests/e2e/app-router/server-actions.spec.ts:174:7 › useActionState › useActionState: redirect does not cause undefined state (issue #589): tests/e2e/app-router/server-actions.spec.ts#L188
2) [app-router] › tests/e2e/app-router/server-actions.spec.ts:174:7 › useActionState › useActionState: redirect does not cause undefined state (issue #589) Error: expect(page).toHaveURL(expected) failed Expected pattern: /\/action-state-test$/ Received string: "http://localhost:4174/action-state-redirect" Timeout: 5000ms Call log: - Expect "toHaveURL" with timeout 5000ms 9 × unexpected value "http://localhost:4174/action-state-redirect" 186 | 187 | // Should navigate to /action-state-test without crashing > 188 | await expect(page).toHaveURL(/\/action-state-test$/); | ^ 189 | await expect(page.locator("h1")).toHaveText("useActionState Test"); 190 | }); 191 | }); at /home/runner/work/vinext/vinext/tests/e2e/app-router/server-actions.spec.ts:188:24
[app-router] › tests/e2e/app-router/server-actions.spec.ts:69:7 › Server Actions › server action with redirect() navigates to target page: tests/e2e/app-router/server-actions.spec.ts#L79
1) [app-router] › tests/e2e/app-router/server-actions.spec.ts:69:7 › Server Actions › server action with redirect() navigates to target page Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(locator).toHaveText(expected) failed Locator: locator('h1') Expected: "About" Received: "Something went wrong!" Timeout: 5000ms Call log: - Expect "toHaveText" with timeout 5000ms - waiting for locator('h1') 2 × locator resolved to <h1>Action Redirect Test</h1> - unexpected value "Action Redirect Test" 7 × locator resolved to <h1>Something went wrong!</h1> - unexpected value "Something went wrong!" 77 | // Should navigate to /about 78 | await expect(page).toHaveURL(/\/about/, { timeout: 10_000 }); > 79 | await expect(page.locator("h1")).toHaveText("About"); | ^ 80 | }); 81 | 82 | test("server action cookie writes do not make the rerender path mutable", async ({ page }) => { at /home/runner/work/vinext/vinext/tests/e2e/app-router/server-actions.spec.ts:79:38
[app-router] › tests/e2e/app-router/server-actions.spec.ts:69:7 › Server Actions › server action with redirect() navigates to target page: tests/e2e/app-router/server-actions.spec.ts#L79
1) [app-router] › tests/e2e/app-router/server-actions.spec.ts:69:7 › Server Actions › server action with redirect() navigates to target page Error: expect(locator).toHaveText(expected) failed Locator: locator('h1') Expected: "About" Received: "Something went wrong!" Timeout: 5000ms Call log: - Expect "toHaveText" with timeout 5000ms - waiting for locator('h1') 2 × locator resolved to <h1>Action Redirect Test</h1> - unexpected value "Action Redirect Test" 7 × locator resolved to <h1>Something went wrong!</h1> - unexpected value "Something went wrong!" 77 | // Should navigate to /about 78 | await expect(page).toHaveURL(/\/about/, { timeout: 10_000 }); > 79 | await expect(page.locator("h1")).toHaveText("About"); | ^ 80 | }); 81 | 82 | test("server action cookie writes do not make the rerender path mutable", async ({ page }) => { at /home/runner/work/vinext/vinext/tests/e2e/app-router/server-actions.spec.ts:79:38
CI
Process completed with exit code 1.
E2E (app-router)
No files were found with the provided path: playwright-report/. No artifacts will be uploaded.
🎭 Playwright Run Summary
13 passed (6.7s)
🎭 Playwright Run Summary
16 passed (8.8s)
🎭 Playwright Run Summary
37 passed (12.3s)
🎭 Playwright Run Summary
22 passed (11.3s)
🎭 Playwright Run Summary
37 passed (19.5s)
🎭 Playwright Run Summary
84 passed (23.3s)
🎭 Playwright Run Summary
2 failed [app-router] › tests/e2e/app-router/server-actions.spec.ts:69:7 › Server Actions › server action with redirect() navigates to target page [app-router] › tests/e2e/app-router/server-actions.spec.ts:174:7 › useActionState › useActionState: redirect does not cause undefined state (issue #589) 9 skipped 282 passed (1.4m)

Artifacts

Produced during runtime
Name Size Digest
blob-report-1 Expired
44.4 KB
sha256:ee7e017942388f5a302ebaea9495779f007ea3fd07032a8323c4ff914f2dce7f
blob-report-2 Expired
68 KB
sha256:6b3b1efa0a33dee583397cceba54d08221045dc2d26de10db167281a386cf7b1
blob-report-3 Expired
29 KB
sha256:a4fb09f9fdde6b4ab5074393ee75e8ab3c37ced98deca95cab3aa7f2bf670d5f