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
TypeError since upgrade to prisma 2.29.0 #53
Comments
I've used the high art of the diff*** /tmp/tmp-priceless-euler/node_modules/@quixo3/prisma-session-store/dist/lib/prisma-session-store.js 2021-08-11 08:38:53.209000000 +0200
--- node_modules/@quixo3/prisma-session-store/dist/lib/prisma-session-store.js 2021-08-11 15:38:11.431780377 +0200
***************
*** 283,286 ****
--- 283,287 ----
var session, result;
var _a;
+ console.log("DEBUG session.get()", sid);
return __generator(this, function (_b) {
switch (_b.label) {
***************
*** 289,299 ****
--- 290,303 ----
if (!(_b.sent()))
return [2 /*return*/, callback === null || callback === void 0 ? void 0 : callback()];
+ console.log("DEBUG case1: prisma.session.findUnique({ where: { sid:", sid, "} })")
return [4 /*yield*/, this.prisma.session
.findUnique({
where: { sid: sid },
})
+ .then(res => { console.log("DEBUG prisma result:", res); return res; })
.catch(function () { return null; })];
case 2:
session = _b.sent();
+ console.log("DEBUG case2: session is", session);
if (session === null)
return [2 /*return*/, callback === null || callback === void 0 ? void 0 : callback()];
Apparently it's Schrödinger's session though. If I add a
Logging in still does not work though because I get a different error later on:
I am a little lost .. is this possibly a prisma issue? |
Not sure... Haven't seen anything like this yet. Internally, Perhaps this will improve matters? |
Aye. I've subscribed to its merging and will try again then. (just for reference: #55 appears to be the PR in question) |
👍 |
I noticed your PR updated prisma to And indeed, simply updating to Thus I'm closing this. It appears to have been a prisma issue indeed. |
@ansemjo Glad to hear its resolved! |
I haven't looked into it very far yet but I've ran
yarn upgrade
earlier today, which updated both@prisma/client
andprisma
from2.28.0
to2.29.0
. Trying to login or really just visiting any site which requires a session now results in the following error:Reverting these two packages to
~2.28.0
fixes the issue again.For reference, my database model and initialization code
It appears that it is this line that throws:
prisma-session-store/src/lib/prisma-session-store.ts
Line 242 in 8941f85
Since it tries to lookup a specific
sid
, I tried to clear cookies but that didn't help. Running the query manually returnsnull
, which should properly return from the function before trying to parse anything?The text was updated successfully, but these errors were encountered: