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
Bug: Error or bug using Prisma with DriverAdapter with PostgreSQL database Neon #23903
Comments
Interesting |
Does this cause any problems or error, or is this just a warning? |
It is a warn, but at the end of so many calls or restarts of the page, sometimes it does not restart and I have to restart the server, already in turbo mode because the warn does not appear. |
Same here ! Initially I had this problem :
I don't know why because I never tried to use the edge. So then, i tried to use the neon edge adapter and got the same error as you... |
I just found out something ! Middlewareimport { withAuth } from "next-auth/middleware";
import prisma from "./db";
export default withAuth(
// `withAuth` augments your `Request` with the user's token.
function middleware(req) {
console.log(req.nextauth.token);
},
{
callbacks: {
authorized: async ({ req: { cookies } }) => {
const sessionToken = cookies.get("next-auth.session-token")?.value;
const user = await prisma.session
.findUnique({ where: { sessionToken } })
.user();
console.log(user?.isAdmin);
return sessionToken != null;
},
},
}
); Error
|
@Hugo-Lorenzoni Well, if you are using neon serverless it works, everything and remove the prism warn from the edge functions, and that works but sometimes the Edge Functions invocations are not completed because of the async await, in the middleware it can serve as protecting routes, I I solved it by removing the middleware, since I won't need it for the moment, but I think it's a Prisma adapter error |
Bug description
I'm using NextJS and NextAuth in its v5 beta version, when I use Prisma with Neon as a postgresql database, and using the adapters, to remove the Edge Functions error, I get that, and it is a basic code, what can be the solution, or is it a bug?
Error
Code
How to reproduce
The error or bug occurs when it is already running, it appears for a few moments or several logs and then does not appear.
Expected behavior
No response
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: