Files
gymflow/debug_output.txt
2025-12-10 14:56:20 +02:00

186 lines
17 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Running 1 test using 1 worker
[1/1] [chromium] › tests\user-system-management.spec.ts:253:5 › V. User & System Management › 5.7. B. Admin Panel - View User List
[chromium] › tests\user-system-management.spec.ts:253:5 › V. User & System Management › 5.7. B. Admin Panel - View User List
Promoting user test.user.yuinwb@example.com to ADMIN...
node.exe : Error promoting user test.user.yuinwb@example.co
m to ADMIN: Error: Command failed: npx ts-node promote_admin.ts tes
t.user.yuinwb@example.com
At C:\Program Files\nodejs\npx.ps1:29 char:3
+ & $NODE_EXE $NPX_CLI_JS $args
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Error p...nwb
@example.com:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Error: PrismaClientKnownRequestError:
Invalid `prisma.user.update()` invocation in
D:\Coding\gymflow\server\promote_admin.ts:22:27
19 const found = await prisma.user.findUnique({ where: { email }
});
20 console.log('User found check:', found ? 'YES' : 'NO');
21
→ 22 await prisma.user.update(
An operation failed because it depends on one or more records that
were required but not found. No record was found for an update.
at qr.handleRequestError (D:\Coding\gymflow\server\no
de_modules\@prisma\client\src\runtime\RequestHandler.ts:22
8:13)
at qr.handleAndLogRequestError (D:\Coding\gymflow\server\
[39mnode_modules\@prisma\client\src\runtime\RequestHandler
.ts:174:12)
at qr.request (D:\Coding\gymflow\server\node_modules\
@prisma\client\src\runtime\RequestHandler.ts:143:12)
[39m
 at processTicksAndRejections (node:internal/process/task_q
ueues:105:5)
at async a (D:\Coding\gymflow\server\node_modules\[4
m@prisma\client\src\runtime\getPrismaClient.ts:805:24)[3
9m {
code: 'P2025',
meta: { modelName: 'User', operation: 'an update'
[39m },
clientVersion: '7.1.0'
}
 at genericNodeError (node:internal/errors:983:15)
 at wrappedFn (node:internal/errors:537:14)
 at ChildProcess.exithandler (node:child_process:415:12)[3
9m
 at ChildProcess.emit (node:events:518:28)
 at maybeClose (node:internal/child_process:1101:16)
 at Process.ChildProcess._handle.onexit (node:internal/chil
d_process:304:5)
 at Process.callbackTrampoline (node:internal/async_hooks:1
30:17) {
code: 1,
killed: false,
signal: null,
cmd: 'npx ts-node promote_admin.ts test.user.yuinwb@example.
com',
stdout: '[Prisma] Initializing in TEST mode\n' +
'Initializing Prisma Adapter with URL: file:./test.db\n'[
39m +
'Script CWD: D:\\Coding\\gymflow\\server\n' +
'DATABASE_URL: file:./test.db\n' +
'Looking for email: test.user.yuinwb@example.com\n' +
'Total users in DB: \x1B[33m128\x1B[39m\n' +
'User found check: NO\n',
stderr: 'Error: PrismaClientKnownRequestError: \n' +
'Invalid `prisma.user.update()` invocation in\n' +
'D:\\Coding\\gymflow\\server\\promote_admin.ts:22:27\n'[3
9m +
'\n' +
' 19 const found = await prisma.user.findUnique({ where:
{ email } });\n' +
" 20 console.log('User found check:', found ? 'YES' : 'NO
');\n" +
' 21 \n' +
'→ 22 await prisma.user.update(\n' +
'An operation failed because it depends on one or more rec
ords that were required but not found. No record was found for an u
pdate.\n' +
' at qr.handleRequestError \x1B[90m(D:\\Coding\\gymflow
\\server\\\x1B[39mnode_modules\\\x1B[4m@prisma\x1B[24m\\client\\src
\\runtime\\RequestHandler.ts:228:13\x1B[90m)\x1B[39m\n' +
' at qr.handleAndLogRequestError \x1B[90m(D:\\Coding\\g
ymflow\\server\\\x1B[39mnode_modules\\\x1B[4m@prisma\x1B[24m\\clien
t\\src\\runtime\\RequestHandler.ts:174:12\x1B[90m)\x1B[39m\n'
+
' at qr.request \x1B[90m(D:\\Coding\\gymflow\\server\\\
x1B[39mnode_modules\\\x1B[4m@prisma\x1B[24m\\client\\src\\runtime\\
RequestHandler.ts:143:12\x1B[90m)\x1B[39m\n' +
'\x1B[90m at processTicksAndRejections (node:internal/p
rocess/task_queues:105:5)\x1B[39m\n' +
' at async a \x1B[90m(D:\\Coding\\gymflow\\server\\\x1B
[39mnode_modules\\\x1B[4m@prisma\x1B[24m\\client\\src\\runtime\\get
PrismaClient.ts:805:24\x1B[90m)\x1B[39m {\n' +
" code: \x1B[32m'P2025'\x1B[39m,\n" +
" meta: { modelName: \x1B[32m'User'\x1B[39m, operation: \
x1B[32m'an update'\x1B[39m },\n" +
" clientVersion: \x1B[32m'7.1.0'\x1B[39m\n" +
'}\n'
}
Failed CMD Stdout: [Prisma] Initializing in TEST mode
Initializing Prisma Adapter with URL: file:./test.db
Script CWD: D:\Coding\gymflow\server
DATABASE_URL: file:./test.db
Looking for email: test.user.yuinwb@example.com
Total users in DB: 128
User found check: NO
Failed CMD Stderr: Error: PrismaClientKnownRequestError:
Invalid `prisma.user.update()` invocation in
D:\Coding\gymflow\server\promote_admin.ts:22:27
19 const found = await prisma.user.findUnique({ where: { email }
});
20 console.log('User found check:', found ? 'YES' : 'NO');
21
→ 22 await prisma.user.update(
An operation failed because it depends on one or more records that
were required but not found. No record was found for an update.
at qr.handleRequestError (D:\Coding\gymflow\server\no
de_modules\@prisma\client\src\runtime\RequestHandler.ts:22
8:13)
at qr.handleAndLogRequestError (D:\Coding\gymflow\server\
[39mnode_modules\@prisma\client\src\runtime\RequestHandler
.ts:174:12)
at qr.request (D:\Coding\gymflow\server\node_modules\
@prisma\client\src\runtime\RequestHandler.ts:143:12)
[39m
 at processTicksAndRejections (node:internal/process/task_q
ueues:105:5)
at async a (D:\Coding\gymflow\server\node_modules\[4
m@prisma\client\src\runtime\getPrismaClient.ts:805:24)[3
9m {
code: 'P2025',
meta: { modelName: 'User', operation: 'an update'
[39m },
clientVersion: '7.1.0'
}
 1) [chromium] › tests\user-system-management.spec.ts:253:5 › V. User & System Management › 5.7. B. Admin Panel - View User List
Error: Command failed: npx ts-node promote_admin.ts test.user.yuinwb@example.com
Error: PrismaClientKnownRequestError:
Invalid `prisma.user.update()` invocation in
D:\Coding\gymflow\server\promote_admin.ts:22:27
19 const found = await prisma.user.findUnique({ where: { email } });
20 console.log('User found check:', found ? 'YES' : 'NO');
21
→ 22 await prisma.user.update(
An operation failed because it depends on one or more records that were required but not found. No record was found for an update.
at ..\server\promote_admin.ts:22
20 | console.log('User found check:', found ? 'YES' : 'NO');
21 |
> 22 | await prisma.user.update({
| ^
23 | where: { email },
24 | data: {
25 | role: 'ADMIN'
at qr.handleRequestError (D:\Coding\gymflow\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:228:13)
at qr.handleAndLogRequestError (D:\Coding\gymflow\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:174:12)
at qr.request (D:\Coding\gymflow\server\node_modules\@prisma\client\src\runtime\RequestHandler.ts:143:12)
 at processTicksAndRejections (node:internal/process/task_queues:105:5)
at async a (D:\Coding\gymflow\server\node_modules\@prisma\client\src\runtime\getPrismaClient.ts:805:24) {
code: 'P2025',
meta: { modelName: 'User', operation: 'an update' },
clientVersion: '7.1.0'
}
at D:\Coding\gymflow\server\promote_admin.ts:22:27
 1 failed
[chromium] › tests\user-system-management.spec.ts:253:5 › V. User & System Management › 5.7. B. Admin Panel - View User List