Error with NextAuth and prisma

I am using the google provider with nextauth and prisma along with supabase, and I get this error when trying to sign in,
[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error
Invalid `prisma.account.findUnique()` invocation:


Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "42P05", message: "prepared statement \"s1\" already exists", severity: "ERROR", detail: None, column: None, hint: None }), transient: false }) PrismaClientUnknownRequestError:
Invalid `prisma.account.findUnique()` invocation:


Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "42P05", message: "prepared statement \"s1\" already exists", severity: "ERROR", detail: None, column: None, hint: None }), transient: false })
at In.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:122:7044)
at In.handleAndLogRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:122:6188)
at In.request (/var/task/node_modules/@prisma/client/runtime/library.js:122:5896)
at async l (/var/task/node_modules/@prisma/client/runtime/library.js:127:11167)
at async getUserByAccount (/var/task/.next/server/chunks/606.js:39:176522) {
name: 'GetUserByAccountError',
code: undefined
}
[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error
Invalid `prisma.account.findUnique()` invocation:


Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "42P05", message: "prepared statement \"s1\" already exists", severity: "ERROR", detail: None, column: None, hint: None }), transient: false }) PrismaClientUnknownRequestError:
Invalid `prisma.account.findUnique()` invocation:


Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "42P05", message: "prepared statement \"s1\" already exists", severity: "ERROR", detail: None, column: None, hint: None }), transient: false })
at In.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:122:7044)
at In.handleAndLogRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:122:6188)
at In.request (/var/task/node_modules/@prisma/client/runtime/library.js:122:5896)
at async l (/var/task/node_modules/@prisma/client/runtime/library.js:127:11167)
at async getUserByAccount (/var/task/.next/server/chunks/606.js:39:176522) {
name: 'GetUserByAccountError',
code: undefined
}
I haven't changed anything in the prisma.schema that comes with t3 setup, The google credentials setup and everything was done right, and I was able to sign in properly yesterday. Any help is much appreciated thanks in advance.
13 Replies
Slavi
Slavi8mo ago
Are you using only OAuth or do you have credentials provider along side with it?
saloodpeepo
saloodpeepoOP8mo ago
only the google oauth provider Im not using a credentials provider
Slavi
Slavi8mo ago
Oh I am having the same error but I am not using prisma I am using only the Xata adapter If you want to I can dm you and we can go through our app idea and just share opinions
Slavi
Slavi8mo ago
but it is kind of old I am using it for my current app, but I am not sure if I should really continue What do you think?
saloodpeepo
saloodpeepoOP8mo ago
its only 3 months old right
Slavi
Slavi8mo ago
yeah but they could have made some changes idk
saloodpeepo
saloodpeepoOP8mo ago
dont think that would be an issue hmm
Slavi
Slavi8mo ago
for now I have set up things and only need to finish the forms and make some callbacks or whatever I need to do By the way, what is your app for? Mine is just for my portfolio and is a blog app
saloodpeepo
saloodpeepoOP8mo ago
its for a tv streaming channel
Slavi
Slavi8mo ago
that sounds interesting I am not even sure if a blog is a good idea for my first personal side project I am still thinking of how to implement the auth
saloodpeepo
saloodpeepoOP8mo ago
maybe you could use clerk or something
Slavi
Slavi8mo ago
I think services like Clerk and Kinde make a big abstraction and you do not have control over neither the functionalities nor the the users' data
Want results from more Discord servers?
Add your server