Marten T.
Marten T.
WWasp-lang
Created by Marten T. on 9/18/2024 in #đŸ™‹questions
onAfterLogin hook crashing the server
I'm trying to implement the v0.14.1 onAfterLogin hooks but after logging in with email it loads for like 20seconds and after gives error to the console. This error is logged out hundreds of times
[ Server!] This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
[ Server!] Please open an issue with this stack trace at https://github.com/nodejs/node/issues
[ Server!]
[ Server!] at Function.fail (node:internal/assert:20:9)
[ Server!] at handleMaxCallStackSize (node:internal/util/inspect:1556:10)
[ Server!] at formatRaw (node:internal/util/inspect:1062:12)
[ Server!] at formatValue (node:internal/util/inspect:840:10)
[ Server!] at formatProperty (node:internal/util/inspect:1945:11)
[ Server!] at formatRaw (node:internal/util/inspect:1054:9)
[ Server!] at formatValue (node:internal/util/inspect:840:10)
[ Server!] at inspect (node:internal/util/inspect:364:10)
[ Server!] at Ne.i.<computed> (/..../SC-app/app/node_modules/@prisma/client/runtime/library.js:31:8652)
[ Server!] at formatValue (node:internal/util/inspect:805:19)
[ Server!] This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
[ Server!] Please open an issue with this stack trace at https://github.com/nodejs/node/issues
[ Server!]
[ Server!] at Function.fail (node:internal/assert:20:9)
[ Server!] at handleMaxCallStackSize (node:internal/util/inspect:1556:10)
[ Server!] at formatRaw (node:internal/util/inspect:1062:12)
[ Server!] at formatValue (node:internal/util/inspect:840:10)
[ Server!] at formatProperty (node:internal/util/inspect:1945:11)
[ Server!] at formatRaw (node:internal/util/inspect:1054:9)
[ Server!] at formatValue (node:internal/util/inspect:840:10)
[ Server!] at inspect (node:internal/util/inspect:364:10)
[ Server!] at Ne.i.<computed> (/..../SC-app/app/node_modules/@prisma/client/runtime/library.js:31:8652)
[ Server!] at formatValue (node:internal/util/inspect:805:19)
Everything other works fine but logging in halts the server Created this in hooks.ts
export const onAfterLogin: OnAfterLoginHook = async ({ user, prisma }) => {
console.log({ user });
};
export const onAfterLogin: OnAfterLoginHook = async ({ user, prisma }) => {
console.log({ user });
};
I've also tried v0.14.2 version, doing wasp clean but nothing. using node v20.14.0 How could I fix this issue?
5 replies