Next.js Discord

Discord Forum

Prisma error when saving file sometimes

Unanswered
Polar bear posted this in #help-forum
Open in Discord
Polar bearOP
Hello, I'm having issues with my project. I constantly receive this error randomly whenever I save my file. I'm not sure where this is coming from and don't know how to fix it as well.

[next-auth][error][SESSION_ERROR]
https://next-auth.js.org/errors#session_error
Invalid `prisma.session.findUnique()` invocation:


This is always bugging me out whenever I update a file from the project. Everything seems working fine in production and sometimes work in my local when saving file. But when somtimes I do small changes, I tend to save the file quicker and this happens.

May I ask if this is a known bug or is there anything I can do to avoid this error?

I only call PrismaClient once and uses that as to call prisma.

1 Reply

Polar bearOP
Thank you. I feel like this is a missed step on my end but can't really sure where can I fix this.