Skip to content

Raw project query #3072

Raw project query

Raw project query #3072

Triggered via pull request December 28, 2024 16:31
Status Failure
Total duration 4m 4s
Artifacts

e2e-api-tests.yaml

on: pull_request
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

10 errors
tests/general/verify-data-integrity.test.ts > Data integrity verification > completes successfully: apps/e2e/tests/general/verify-data-integrity.test.ts#L12
AssertionError: Expected no error to be thrown! stdout: > @stackframe/[email protected] verify-data-integrity /home/runner/work/stack/stack > only-allow pnpm && pnpm -C apps/backend run verify-data-integrity > @stackframe/[email protected] verify-data-integrity /home/runner/work/stack/stack/apps/backend > pnpm run with-env tsx scripts/verify-data-integrity.ts > @stackframe/[email protected] with-env /home/runner/work/stack/stack/apps/backend > dotenv -c development -- "tsx" "scripts/verify-data-integrity.ts" =================================================== Welcome to verify-data-integrity.ts. This script will ensure that the data in the database is not corrupted. It will call the most important endpoints for each project and every user, and ensure that the status codes are what they should be. It's a good idea to run this script on REPLICAS of the production database regularly (not the actual prod db!); it should never fail at any point in time. IMPORTANT: This script may modify the database during its execution in all sorts of ways, so don't run it on production! =================================================== Starting in 3 seconds... 2... 1... Found 15 projects, iterating over them. [project 1/15] 063a51fc-a665-47ea-960a-84b807df583f New Project [project 8/15] 4d6d77eb-9f49-4d28-8514-49a2f2b63b02 Test Project ERROR!  ELIFECYCLE  Command failed with exit code 1.  ELIFECYCLE  Command failed with exit code 1.  ELIFECYCLE  Command failed with exit code 1. stderr: ERROR! Could not verify data integrity. See the error message for more details. StackAssertionError: Expected status code 200 but got 500 for /api/v1/projects/current: Internal Server Error. The error message follows, but will be stripped in production. PrismaClientKnownRequestError: Invalid `prisma.$queryRaw()` invocation: Raw query failed. Code: `21000`. Message: `ERROR: more than one row returned by a subquery used as an expression` at Mn.handleRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338) at Mn.handleAndLogRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663) at Mn.request (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370) at async l (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633) at async rawQueryArray (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:89:23) at async rawQuery (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:58:20) at async getProject (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:2797:20) at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 at async traceSpan (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:122:12) This is likely an error in Stack. Please make sure you are running the newest version and report it. at expectStatusCode (/home/runner/work/stack/stack/apps/backend/scripts/verify-data-integrity.ts:143:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 0) at async <anonymous> (/home/runner/work/stack/stack/apps/backend/scripts/verify-data-integrity.ts:73:39) at async _recurse (/home/runner/work/stack/stack/apps/backend/scripts/verify-data-integrity.ts:166:12) at async main (/home/runner/work/stack/stack/apps/backend/scripts/verify-data-integrity.ts:72:5) { extraData: { request: { method: 'GET', headers: [Object] }, response: Response { status: 500, statusText: 'Internal Server Error'
tests/backend/endpoints/api/v1/auth-flows.test.ts > should not be able to sign in again after signing in with OTP and disabling auth: apps/e2e/tests/backend/backend-helpers.ts#L145
StackAssertionError: Unexpected internal server error: 500 Internal Server Error. The error message follows, but will be stripped in production. PrismaClientKnownRequestError: Invalid `prisma.$queryRaw()` invocation: Raw query failed. Code: `21000`. Message: `ERROR: more than one row returned by a subquery used as an expression` at Mn.handleRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338) at Mn.handleAndLogRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663) at Mn.request (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370) at async l (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633) at async rawQueryArray (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:89:23) at async rawQuery (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:58:20) at async getProject (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:2797:20) at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 at async traceSpan (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:122:12) This is likely an error in Stack. Please make sure you are running the newest version and report it. ❯ Mn.handleRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338 ❯ Mn.handleAndLogRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663 ❯ Mn.request ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370 ❯ l ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633 ❯ rawQueryArray ../backend/.next/server/chunks/3838.js:89:23 ❯ rawQuery ../backend/.next/server/chunks/3838.js:58:20 ❯ getProject ../backend/.next/server/chunks/3759.js:2797:20 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 ❯ traceSpan ../backend/.next/server/chunks/3838.js:122:12 ❯ niceBackendFetch tests/backend/backend-helpers.ts:145:11 ❯ sendSignInCode tests/backend/backend-helpers.ts:306:24 ❯ Object.signIn tests/backend/backend-helpers.ts:332:33 ❯ tests/backend/endpoints/api/v1/auth-flows.test.ts:5:3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { extraData: undefined, customCaptureExtraArgs: [ undefined ] }
tests/backend/endpoints/api/v1/auth-flows.test.ts > should not be able to sign in with OTP anymore after signing in with password first: apps/e2e/tests/backend/backend-helpers.ts#L145
StackAssertionError: Unexpected internal server error: 500 Internal Server Error. The error message follows, but will be stripped in production. PrismaClientKnownRequestError: Invalid `prisma.$queryRaw()` invocation: Raw query failed. Code: `21000`. Message: `ERROR: more than one row returned by a subquery used as an expression` at Mn.handleRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338) at Mn.handleAndLogRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663) at Mn.request (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370) at async l (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633) at async rawQueryArray (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:89:23) at async rawQuery (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:58:20) at async getProject (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:2797:20) at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 at async traceSpan (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:122:12) This is likely an error in Stack. Please make sure you are running the newest version and report it. ❯ Mn.handleRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338 ❯ Mn.handleAndLogRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663 ❯ Mn.request ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370 ❯ l ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633 ❯ rawQueryArray ../backend/.next/server/chunks/3838.js:89:23 ❯ rawQuery ../backend/.next/server/chunks/3838.js:58:20 ❯ getProject ../backend/.next/server/chunks/3759.js:2797:20 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 ❯ traceSpan ../backend/.next/server/chunks/3838.js:122:12 ❯ niceBackendFetch tests/backend/backend-helpers.ts:145:11 ❯ Object.signUpWithEmail tests/backend/backend-helpers.ts:374:24 ❯ tests/backend/endpoints/api/v1/auth-flows.test.ts:42:3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { extraData: undefined, customCaptureExtraArgs: [ undefined ] }
tests/backend/endpoints/api/v1/auth-flows.test.ts > signing in with OTP first, then signing in with OAuth, should set used_for_auth to false: apps/e2e/tests/backend/backend-helpers.ts#L145
StackAssertionError: Unexpected internal server error: 500 Internal Server Error. The error message follows, but will be stripped in production. PrismaClientKnownRequestError: Invalid `prisma.$queryRaw()` invocation: Raw query failed. Code: `21000`. Message: `ERROR: more than one row returned by a subquery used as an expression` at Mn.handleRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338) at Mn.handleAndLogRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663) at Mn.request (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370) at async l (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633) at async rawQueryArray (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:89:23) at async rawQuery (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:58:20) at async getProject (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:2797:20) at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 at async traceSpan (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:122:12) This is likely an error in Stack. Please make sure you are running the newest version and report it. ❯ Mn.handleRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338 ❯ Mn.handleAndLogRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663 ❯ Mn.request ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370 ❯ l ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633 ❯ rawQueryArray ../backend/.next/server/chunks/3838.js:89:23 ❯ rawQuery ../backend/.next/server/chunks/3838.js:58:20 ❯ getProject ../backend/.next/server/chunks/3759.js:2797:20 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 ❯ traceSpan ../backend/.next/server/chunks/3838.js:122:12 ❯ niceBackendFetch tests/backend/backend-helpers.ts:145:11 ❯ sendSignInCode tests/backend/backend-helpers.ts:306:24 ❯ Object.signIn tests/backend/backend-helpers.ts:332:33 ❯ tests/backend/endpoints/api/v1/auth-flows.test.ts:69:3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { extraData: undefined, customCaptureExtraArgs: [ undefined ] }
tests/backend/endpoints/api/v1/auth-flows.test.ts > signs in with password first, then signs in with oauth should give an account with used_for_auth false: apps/e2e/tests/backend/backend-helpers.ts#L145
StackAssertionError: Unexpected internal server error: 500 Internal Server Error. The error message follows, but will be stripped in production. PrismaClientKnownRequestError: Invalid `prisma.$queryRaw()` invocation: Raw query failed. Code: `21000`. Message: `ERROR: more than one row returned by a subquery used as an expression` at Mn.handleRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338) at Mn.handleAndLogRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663) at Mn.request (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370) at async l (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633) at async rawQueryArray (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:89:23) at async rawQuery (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:58:20) at async getProject (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:2797:20) at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 at async traceSpan (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:122:12) This is likely an error in Stack. Please make sure you are running the newest version and report it. ❯ Mn.handleRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338 ❯ Mn.handleAndLogRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663 ❯ Mn.request ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370 ❯ l ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633 ❯ rawQueryArray ../backend/.next/server/chunks/3838.js:89:23 ❯ rawQuery ../backend/.next/server/chunks/3838.js:58:20 ❯ getProject ../backend/.next/server/chunks/3759.js:2797:20 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 ❯ traceSpan ../backend/.next/server/chunks/3838.js:122:12 ❯ niceBackendFetch tests/backend/backend-helpers.ts:145:11 ❯ Object.signUpWithEmail tests/backend/backend-helpers.ts:374:24 ❯ tests/backend/endpoints/api/v1/auth-flows.test.ts:82:3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { extraData: undefined, customCaptureExtraArgs: [ undefined ] }
tests/backend/endpoints/api/v1/auth-flows.test.ts > should merge accounts when signing in with OTP after OAuth sign-in and email verification: apps/e2e/tests/backend/backend-helpers.ts#L145
StackAssertionError: Unexpected internal server error: 500 Internal Server Error. The error message follows, but will be stripped in production. PrismaClientKnownRequestError: Invalid `prisma.$queryRaw()` invocation: Raw query failed. Code: `21000`. Message: `ERROR: more than one row returned by a subquery used as an expression` at Mn.handleRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338) at Mn.handleAndLogRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663) at Mn.request (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370) at async l (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633) at async rawQueryArray (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:89:23) at async rawQuery (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:58:20) at async getProject (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:2797:20) at async Object.handler (/home/runner/work/stack/stack/apps/backend/.next/server/app/api/v1/auth/oauth/authorize/[provider_id]/route.js:485:25) at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4726:20 at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 This is likely an error in Stack. Please make sure you are running the newest version and report it. ❯ Mn.handleRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338 ❯ Mn.handleAndLogRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663 ❯ Mn.request ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370 ❯ l ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633 ❯ rawQueryArray ../backend/.next/server/chunks/3838.js:89:23 ❯ rawQuery ../backend/.next/server/chunks/3838.js:58:20 ❯ getProject ../backend/.next/server/chunks/3759.js:2797:20 ❯ Object.handler ../backend/.next/server/app/api/v1/auth/oauth/authorize/[provider_id]/route.js:485:25 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4726:20 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 ❯ niceBackendFetch tests/backend/backend-helpers.ts:145:11 ❯ Object.authorize tests/backend/backend-helpers.ts:568:24 ❯ Object.getInnerCallbackUrl tests/backend/backend-helpers.ts:587:19 ❯ Object.getAuthorizationCode tests/backend/backend-helpers.ts:668:19 ❯ Object.signIn tests/backend/backend-helpers.ts:697:42 ❯ tests/backend/endpoints/api/v1/auth-flows.test.ts:95:3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { extraData: undefined, customCaptureExtraArgs: [ undefined ] }
tests/backend/endpoints/api/v1/index.test.ts > with project keys that don't match the project ID > should not have client access: apps/e2e/tests/backend/backend-helpers.ts#L145
StackAssertionError: Unexpected internal server error: 500 Internal Server Error. The error message follows, but will be stripped in production. StackAssertionError: Project result mismatch This is likely an error in Stack. Please make sure you are running the newest version and report it. at getProject (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:2803:19) at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 at async traceSpan (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:122:12) This is likely an error in Stack. Please make sure you are running the newest version and report it. ❯ getProject ../backend/.next/server/chunks/3759.js:2803:19 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 ❯ traceSpan ../backend/.next/server/chunks/3838.js:122:12 ❯ niceBackendFetch tests/backend/backend-helpers.ts:145:11 ❯ sendSignInCode tests/backend/backend-helpers.ts:306:24 ❯ Object.signIn tests/backend/backend-helpers.ts:332:33 ❯ Object.createAndGetAdminToken tests/backend/backend-helpers.ts:931:24 ❯ Object.createAndSwitch tests/backend/backend-helpers.ts:953:26 ❯ init tests/backend/endpoints/api/v1/index.test.ts:105:5 ❯ tests/backend/endpoints/api/v1/index.test.ts:119:5 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { extraData: undefined, customCaptureExtraArgs: [ undefined ] }
tests/backend/endpoints/api/v1/internal-metrics.test.ts > should return metrics data: apps/e2e/tests/backend/backend-helpers.ts#L145
StackAssertionError: Unexpected internal server error: 500 Internal Server Error. The error message follows, but will be stripped in production. PrismaClientKnownRequestError: Invalid `prisma.$queryRaw()` invocation: Raw query failed. Code: `21000`. Message: `ERROR: more than one row returned by a subquery used as an expression` at Mn.handleRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338) at Mn.handleAndLogRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663) at Mn.request (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370) at async l (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633) at async rawQueryArray (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:89:23) at async rawQuery (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:58:20) at async getProject (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:2797:20) at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 at async traceSpan (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:122:12) This is likely an error in Stack. Please make sure you are running the newest version and report it. ❯ Mn.handleRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338 ❯ Mn.handleAndLogRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663 ❯ Mn.request ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370 ❯ l ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633 ❯ rawQueryArray ../backend/.next/server/chunks/3838.js:89:23 ❯ rawQuery ../backend/.next/server/chunks/3838.js:58:20 ❯ getProject ../backend/.next/server/chunks/3759.js:2797:20 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 ❯ traceSpan ../backend/.next/server/chunks/3838.js:122:12 ❯ niceBackendFetch tests/backend/backend-helpers.ts:145:11 ❯ sendSignInCode tests/backend/backend-helpers.ts:306:24 ❯ Object.signIn tests/backend/backend-helpers.ts:332:33 ❯ Object.createAndGetAdminToken tests/backend/backend-helpers.ts:931:24 ❯ Object.createAndSwitch tests/backend/backend-helpers.ts:953:26 ❯ tests/backend/endpoints/api/v1/internal-metrics.test.ts:5:3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { extraData: undefined, customCaptureExtraArgs: [ undefined ] }
tests/backend/endpoints/api/v1/internal-metrics.test.ts > should return metrics data with users: apps/e2e/tests/backend/backend-helpers.ts#L145
StackAssertionError: Unexpected internal server error: 500 Internal Server Error. The error message follows, but will be stripped in production. PrismaClientKnownRequestError: Invalid `prisma.$queryRaw()` invocation: Raw query failed. Code: `21000`. Message: `ERROR: more than one row returned by a subquery used as an expression` at Mn.handleRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338) at Mn.handleAndLogRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663) at Mn.request (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370) at async l (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633) at async rawQueryArray (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:89:23) at async rawQuery (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:58:20) at async getProject (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:2797:20) at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 at async traceSpan (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:122:12) This is likely an error in Stack. Please make sure you are running the newest version and report it. ❯ Mn.handleRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338 ❯ Mn.handleAndLogRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663 ❯ Mn.request ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370 ❯ l ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633 ❯ rawQueryArray ../backend/.next/server/chunks/3838.js:89:23 ❯ rawQuery ../backend/.next/server/chunks/3838.js:58:20 ❯ getProject ../backend/.next/server/chunks/3759.js:2797:20 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 ❯ traceSpan ../backend/.next/server/chunks/3838.js:122:12 ❯ niceBackendFetch tests/backend/backend-helpers.ts:145:11 ❯ sendSignInCode tests/backend/backend-helpers.ts:306:24 ❯ Object.signIn tests/backend/backend-helpers.ts:332:33 ❯ Object.createAndGetAdminToken tests/backend/backend-helpers.ts:931:24 ❯ Object.createAndSwitch tests/backend/backend-helpers.ts:953:26 ❯ it.timeout tests/backend/endpoints/api/v1/internal-metrics.test.ts:16:3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { extraData: undefined, customCaptureExtraArgs: [ undefined ] }
tests/backend/endpoints/api/v1/internal-metrics.test.ts > should not work for non-admins: apps/e2e/tests/backend/backend-helpers.ts#L145
StackAssertionError: Unexpected internal server error: 500 Internal Server Error. The error message follows, but will be stripped in production. PrismaClientKnownRequestError: Invalid `prisma.$queryRaw()` invocation: Raw query failed. Code: `21000`. Message: `ERROR: more than one row returned by a subquery used as an expression` at Mn.handleRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338) at Mn.handleAndLogRequestError (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663) at Mn.request (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370) at async l (/home/runner/work/stack/stack/node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633) at async rawQueryArray (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:89:23) at async rawQuery (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:58:20) at async getProject (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:2797:20) at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 at async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 at async traceSpan (/home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:122:12) This is likely an error in Stack. Please make sure you are running the newest version and report it. ❯ Mn.handleRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:7338 ❯ Mn.handleAndLogRequestError ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6663 ❯ Mn.request ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:121:6370 ❯ l ../../node_modules/.pnpm/@prisma[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:130:9633 ❯ rawQueryArray ../backend/.next/server/chunks/3838.js:89:23 ❯ rawQuery ../backend/.next/server/chunks/3838.js:58:20 ❯ getProject ../backend/.next/server/chunks/3759.js:2797:20 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3759.js:4313:24 ❯ ../../async /home/runner/work/stack/stack/apps/backend/.next/server/chunks/3838.js:129:20 ❯ traceSpan ../backend/.next/server/chunks/3838.js:122:12 ❯ niceBackendFetch tests/backend/backend-helpers.ts:145:11 ❯ sendSignInCode tests/backend/backend-helpers.ts:306:24 ❯ Object.signIn tests/backend/backend-helpers.ts:332:33 ❯ Object.createAndGetAdminToken tests/backend/backend-helpers.ts:931:24 ❯ Object.createAndSwitch tests/backend/backend-helpers.ts:953:26 ❯ tests/backend/endpoints/api/v1/internal-metrics.test.ts:54:3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { extraData: undefined, customCaptureExtraArgs: [ undefined ] }