Skip to content

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

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

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

Triggered via pull request March 21, 2026 09:29
Status Failure
Total duration 2m 37s
Artifacts 3

ci.yml

on: pull_request
Matrix: create-next-app
Matrix: e2e
Matrix: test-integration
Vitest (integration report)
20s
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
22 passed (9.7s)
🎭 Playwright Run Summary
37 passed (11.7s)
🎭 Playwright Run Summary
37 passed (19.6s)
🎭 Playwright Run Summary
84 passed (22.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:709340b03e76968659c1a5e372583a385c87b04790c53c9ad2034b48a344eb2d
blob-report-2 Expired
68 KB
sha256:01e61f537b16187bb9bd8e5885f0b6c0a16de2d5b3853a0fb523385c508038bc
blob-report-3 Expired
29.1 KB
sha256:d1e57ace162a2b69e593ee0eea5030a3a8b01608eef49223a1b5789740c11758