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
Everything other works fine but logging in halts the server
Created this in hooks.ts
I've also tried v0.14.2 version, doing wasp clean but nothing.
using node v20.14.0
How could I fix this issue?
2 Replies
Hi @Marten T.. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain specific information about the
onAfterLogin
hook causing server crashes in Wasp.
However, based on the error message you provided, it seems like there might be an issue with Node.js or its usage. It's also possible that the issue is related to the Prisma client, as it's mentioned in the error stack trace.
In the meantime, you might find it helpful to check the Wasp GitHub issues (https://github.com/wasp-lang/wasp/issues) for similar problems or the Wasp documentation (https://wasp-lang.dev/docs) for more information on how to use hooks.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Marten T., I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?Could you share a bit of your Wasp file where you set up the hook and the full hook code?