Skip to content

Fix migration tests #1607

Fix migration tests

Fix migration tests #1607

Triggered via push May 6, 2026 22:18
Status Failure
Total duration 47m 38s
Artifacts
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

9 errors and 1 warning
E2E Tests (Local Emulator, Node 22.x)
Process completed with exit code 1.
src/auto-migrations/migration-tests.test.ts > database migration tests > 20260420000000_add_project_onboarding_state > default-and-updates: apps/backend/prisma/migrations/20260420000000_add_project_onboarding_state/tests/default-and-updates.ts#L42
Error: Snapshot `database migration tests > 20260420000000_add_project_onboarding_state > default-and-updates 1` mismatched - Expected + Received - { - "selected_apps": [ - "authentication", - "emails", - ], - "selected_config_choice": "create-new", - "selected_email_theme_id": null, - "selected_payments_country": "US", - "selected_sign_in_methods": [ - "credential", - "magicLink", - ], - } + "{"selected_config_choice":"create-new","selected_apps":["authentication","emails"],"selected_sign_in_methods":["credential","magicLink"],"selected_email_theme_id":null,"selected_payments_country":"US"}" ❯ Module.postMigration prisma/migrations/20260420000000_add_project_onboarding_state/tests/default-and-updates.ts:42:54 ❯ src/auto-migrations/migration-tests.test.ts:148:13
tests/backend/endpoints/api/v1/auth/mfa/sign-in.test.ts > should reject invalid attempt codes: apps/e2e/tests/helpers.ts#L254
StackAssertionError: Expected at least 1 messages with subject containing "Verify your email", but found 0 This is likely an error in Stack. Please make sure you are running the newest version and report it. ❯ Mailbox.waitForMessagesWithSubjectCount tests/helpers.ts:254:13 ❯ Mailbox.waitForMessagesWithSubject tests/helpers.ts:240:14 ❯ Object.signUpWithEmail tests/backend/backend-helpers.ts:586:9 ❯ tests/backend/endpoints/api/v1/auth/mfa/sign-in.test.ts:67:23 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { extraData: { messages: [] }, customCaptureExtraArgs: [ { messages: [] } ] }
tests/backend/endpoints/api/v1/internal/local-emulator-project.test.ts > local emulator project endpoint > updates onboarding_state on local emulator projects without mutating env config: apps/e2e/tests/backend/backend-helpers.ts#L195
StackAssertionError: API threw ISE in PATCH /api/v1/internal/projects/current: 500 Internal Server Error. The error message follows, but will be stripped in production. StackAssertionError: Environment configuration overrides cannot be changed in the local emulator. Update this in your production deployment instead. Stack: This is likely an error in Stack. Please make sure you are running the newest version and report it. at C (/home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__cd51ff84._.js:2862:2911) at process.processTicksAndRejections (node:internal/process/task_queues:103:5) at async D (/home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__cd51ff84._.js:2862:4510) at async h (/home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__cd51ff84._.js:3049:2809) at async Object.onUpdate (/home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__4e7131b6._.js:2:8497) at async invoke (/home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__c2e8bff3._.js:6363:153194) at async Object.handler (/home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__c2e8bff3._.js:6363:154076) at async /home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__c2e8bff3._.js:6480:5616 at async /home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/_c749694c._.js:31:63397 at async s (/home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/_c749694c._.js:31:63246) at async a (/home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__c2e8bff3._.js:6480:4834) at async /home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__c2e8bff3._.js:6480:5913 at async /home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__c2e8bff3._.js:6480:1903 at async /home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/_c749694c._.js:31:63397 at async s (/home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/_c749694c._.js:31:63246) at async /home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__c2e8bff3._.js:6480:420 at async rW.do (/home/runner/work/stack-auth/stack-auth/node_modules/.pnpm/next@16.1.7_@babel+core@7.26.0_@opentelemetry+api@1.9.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js:5:20181) at async rW.handle (/home/runner/work/stack-auth/stack-auth/node_modules/.pnpm/next@16.1.7_@babel+core@7.26.0_@opentelemetry+api@1.9.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js:5:24961) at async c (/home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__eaee2046._.js:2:12698) at async rW.handleResponse (/home/runner/work/stack-auth/stack-auth/node_modules/.pnpm/next@16.1.7_@babel+core@7.26.0_@opentelemetry+api@1.9.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js:1:104155) at async s (/home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__eaee2046._.js:2:13739) at async Module.C (/home/runner/work/stack-auth/stack-auth/apps/backend/.next/server/chunks/[root-of-the-server]__eaee2046._.js:2:14806) at async NextNodeServer.renderToResponseWithComponentsImpl (/home/runner/work/stack-auth/stack-auth/node_modules/.pnpm/next@16.1.7_@babel+core@7.26.0_@opentelemetry+api@1.9.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/base-server.js:1428:9) at async NextNodeServer.renderPageComponent (/home/runner/work/stack-auth/stack-auth/node_modules/.pnpm/next@16.1.7_@babel+core@7
tests/backend/endpoints/api/v1/internal/failed-emails-digest.test.ts > with valid credentials > should return 200 and process dry run request: apps/e2e/tests/backend/endpoints/api/v1/internal/failed-emails-digest.test.ts#L127
Error: Snapshot `with valid credentials > should return 200 and process dry run request 32` mismatched - Expected + Received @@ -3,18 +3,11 @@ "emails": [ { "subject": "", "to": ["User ID: <stripped UUID>"], }, - { - "subject": "Verify your email at Test Failed Emails Project", - "to": ["default-mailbox--<stripped UUID>@stack-generated.example.com"], - }, ], "project_id": "<stripped UUID>", "tenancy_id": "<stripped UUID>", - "tenant_owner_emails": [ - "default-mailbox--<stripped UUID>@stack-generated.example.com", - "default-mailbox--<stripped UUID>@stack-generated.example.com", - ], + "tenant_owner_emails": ["default-mailbox--<stripped UUID>@stack-generated.example.com"], }, ] ❯ testFailedEmails tests/backend/endpoints/api/v1/internal/failed-emails-digest.test.ts:127:39 ❯ it.repeats tests/backend/endpoints/api/v1/internal/failed-emails-digest.test.ts:158:37
tests/backend/endpoints/api/v1/internal/failed-emails-digest.test.ts > with valid credentials > should return 200 and process dry run request: apps/e2e/tests/backend/endpoints/api/v1/internal/failed-emails-digest.test.ts#L127
Error: Snapshot `with valid credentials > should return 200 and process dry run request 18` mismatched - Expected + Received [ { "emails": [ { - "subject": "", - "to": ["User ID: <stripped UUID>"], - }, - { "subject": "Verify your email at Test Failed Emails Project", "to": ["default-mailbox--<stripped UUID>@stack-generated.example.com"], }, ], "project_id": "<stripped UUID>", "tenancy_id": "<stripped UUID>", - "tenant_owner_emails": [ - "default-mailbox--<stripped UUID>@stack-generated.example.com", - "default-mailbox--<stripped UUID>@stack-generated.example.com", - ], + "tenant_owner_emails": ["default-mailbox--<stripped UUID>@stack-generated.example.com"], }, ] ❯ testFailedEmails tests/backend/endpoints/api/v1/internal/failed-emails-digest.test.ts:127:39 ❯ it.repeats tests/backend/endpoints/api/v1/internal/failed-emails-digest.test.ts:158:37
tests/backend/endpoints/api/v1/internal/failed-emails-digest.test.ts > with valid credentials > should return 200 and process dry run request: apps/e2e/tests/backend/endpoints/api/v1/internal/failed-emails-digest.test.ts#L127
Error: Snapshot `with valid credentials > should return 200 and process dry run request 14` mismatched - Expected + Received [ { "emails": [ { - "subject": "", - "to": ["User ID: <stripped UUID>"], - }, - { "subject": "Verify your email at Test Failed Emails Project", "to": ["default-mailbox--<stripped UUID>@stack-generated.example.com"], }, ], "project_id": "<stripped UUID>", "tenancy_id": "<stripped UUID>", - "tenant_owner_emails": [ - "default-mailbox--<stripped UUID>@stack-generated.example.com", - "default-mailbox--<stripped UUID>@stack-generated.example.com", - ], + "tenant_owner_emails": ["default-mailbox--<stripped UUID>@stack-generated.example.com"], }, ] ❯ testFailedEmails tests/backend/endpoints/api/v1/internal/failed-emails-digest.test.ts:127:39 ❯ it.repeats tests/backend/endpoints/api/v1/internal/failed-emails-digest.test.ts:158:37
tests/backend/endpoints/api/v1/internal-metrics.test.ts > should handle anonymous users with activity correctly: apps/e2e/tests/backend/endpoints/api/v1/internal-metrics.test.ts#L311
AssertionError: expected +0 to be 1 // Object.is equality - Expected + Received - 1 + 0 ❯ it.timeout tests/backend/endpoints/api/v1/internal-metrics.test.ts:311:29
tests/backend/endpoints/api/v1/internal-metrics.test.ts > should return metrics data with users: apps/e2e/tests/backend/endpoints/api/v1/internal-metrics.test.ts#L179
Error: Snapshot `should return metrics data with users > metrics_result_with_users 1` mismatched - Expected + Received @@ -5,29 +5,19 @@ "AQ": [ { "display_name": null, "id": "<stripped UUID>", "last_active_at_millis": <stripped field 'last_active_at_millis'>, - "primary_email": "mailbox-1--<stripped UUID>@stack-generated.example.com", - "profile_image_url": null, - "signed_up_at_millis": <stripped field 'signed_up_at_millis'>, - }, - { - "display_name": null, - "id": "<stripped UUID>", - "last_active_at_millis": <stripped field 'last_active_at_millis'>, "primary_email": "mailbox-2--<stripped UUID>@stack-generated.example.com", "profile_image_url": null, "signed_up_at_millis": <stripped field 'signed_up_at_millis'>, }, - ], - "CH": [ { "display_name": null, "id": "<stripped UUID>", "last_active_at_millis": <stripped field 'last_active_at_millis'>, - "primary_email": "mailbox-3--<stripped UUID>@stack-generated.example.com", + "primary_email": "mailbox-1--<stripped UUID>@stack-generated.example.com", "profile_image_url": null, "signed_up_at_millis": <stripped field 'signed_up_at_millis'>, }, ], }, @@ -3021,12 +3011,9 @@ "server_metadata": null, "signed_up_at_millis": <stripped field 'signed_up_at_millis'>, }, ], "total_users": 9, - "users_by_country": { - "AQ": 2, - "CH": 1, - }, + "users_by_country": { "AQ": 2 }, }, "headers": Headers { <some fields may have been hidden> }, } ❯ it.timeout tests/backend/endpoints/api/v1/internal-metrics.test.ts:179:20
E2E Tests (Local Emulator, Node 22.x)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: JarvusInnovations/background-action@v1.0.7, pnpm/action-setup@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/