Getting a fetch failed call stack error after connecting an adapter

After chapter 9 database adapters - the connection to Google works normally, but right after the connection error 1 appears - I put a screenshot of the error + a screenshot of the code in route.ts

It should be noted that the data enters well into mysql and from the network, 2 requests go out at the same time to the same endpoint. Has anyone encountered this?


import { PrismaAdapter } from "@next-auth/prisma-adapter";
import { prisma } from "@/prisma/client";
import GoogleProvider from "next-auth/providers/google";
import NextAuth, { NextAuthOptions } from "next-auth";

export const authOptions: NextAuthOptions = {
    adapter: PrismaAdapter(prisma),
    providers: [
            clientId: process.env.GOOGLE_CLIENT_ID!,
            clientSecret: process.env.GOOGLE_CLIENT_SECRET!
    session: {
        strategy: 'jwt'

const handler = NextAuth(authOptions)

export { handler as GET, handler as POST }```

thanks a lot!