-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash app error: touch(): PrismaClientKnownRequestError: #125
Comments
Hi @Damiandeveloper26, |
I am not using NestJs, only Express, but I have this error.
|
So it looks like for some reason a session might not be in the db - and this throws in the extension -> which leads to the server trying to send error response and getting double headers somewhere down the line -> whih gets surfaced rather then this issue. It would be best if the lib could Looks like |
@Damiandeveloper26 Thanks for pointing this out. |
To be fair, in my case it looks like it's a race condition - I'm facing this in e2e tests only so far. From what I was able to gather it looks like;
Looking at some other session stores - looks like some don't even implement |
Hello i got the problem with crashed app. After some times my app is crashing and it's random time ,no idea why. I'm using nest js with prisma session store.
There is error:
touch(): PrismaClientKnownRequestError:
Invalid
this.prisma[this.sessionModelName].findUnique()
invocation in/Users/crasher/node_modules/@quixo3/prisma-session-store/dist/lib/prisma-session-store.js:610:81
607 expiresAt = (0, utils_1.createExpiration)(ttl, {
608 rounding: this.options.roundTTL,
609 });
→ 610 return [4 /yield/, this.prisma[this.sessionModelName].findUnique(
Server has closed the connection.
Error: Cannot set headers after they are sent to the client
at new NodeError (node:internal/errors:387:5)
at ServerResponse.setHeader (node:_http_outgoing:644:11)`
The text was updated successfully, but these errors were encountered: