Invalid `prisma.account.findUnique()` invocation:

I am having issues with the google signin redirecting me to http://localhost:3000/api/auth/error?error=AdapterError Here's the error log:
[auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror
[auth][cause]: PrismaClientValidationError:
Invalid `prisma.account.findUnique()` invocation:

{
where: {
provider_providerAccountId: {
~~~~~~~~~~~~~~~~~~~~~~~~~~
providerAccountId: "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
provider: "google"
},
? id?: Int,
? providerId_providerAccountId?: accountProviderIdProviderAccountIdCompoundUniqueInput,
? AND?: accountWhereInput | accountWhereInput[],
? OR?: accountWhereInput[],
? NOT?: accountWhereInput | accountWhereInput[],
? userId?: IntFilter | Int,
? providerType?: StringFilter | String,
? providerId?: StringFilter | String,
? providerAccountId?: StringFilter | String,
? refreshToken?: StringNullableFilter | String | Null,
? accessToken?: StringNullableFilter | String | Null,
? accessTokenExpires?: DateTimeNullableFilter | DateTime | Null,
? createdAt?: DateTimeFilter | DateTime,
? updatedAt?: DateTimeFilter | DateTime,
? user?: UserRelationFilter | userWhereInput
},
select: {
user: true
}
}

Unknown argument `provider_providerAccountId`. Did you mean `providerId_providerAccountId`? Available options are marked with ?.
[auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror
[auth][cause]: PrismaClientValidationError:
Invalid `prisma.account.findUnique()` invocation:

{
where: {
provider_providerAccountId: {
~~~~~~~~~~~~~~~~~~~~~~~~~~
providerAccountId: "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
provider: "google"
},
? id?: Int,
? providerId_providerAccountId?: accountProviderIdProviderAccountIdCompoundUniqueInput,
? AND?: accountWhereInput | accountWhereInput[],
? OR?: accountWhereInput[],
? NOT?: accountWhereInput | accountWhereInput[],
? userId?: IntFilter | Int,
? providerType?: StringFilter | String,
? providerId?: StringFilter | String,
? providerAccountId?: StringFilter | String,
? refreshToken?: StringNullableFilter | String | Null,
? accessToken?: StringNullableFilter | String | Null,
? accessTokenExpires?: DateTimeNullableFilter | DateTime | Null,
? createdAt?: DateTimeFilter | DateTime,
? updatedAt?: DateTimeFilter | DateTime,
? user?: UserRelationFilter | userWhereInput
},
select: {
user: true
}
}

Unknown argument `provider_providerAccountId`. Did you mean `providerId_providerAccountId`? Available options are marked with ?.
Solution:
GitHub
Unknown argument provider_providerAccountId. Available options ar...
Adapter type @auth/prisma-adapter Environment System: OS: Windows 11 10.0.22631 CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz Memory: 17.58 GB / 31.94 GB Binaries: Node: 18.18.2 - c:\progra...
Jump to solution
3 Replies
Mashwishi
Mashwishi5w ago
This is my schema generated via CLI using npx prisma db pull wish can send full text code here, but i dont have nitro sorry. https://pastebin.com/TCnDjDXz
Pastebin
generator client { provider = "prisma-client-js"}datasource db { ...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Mashwishi
Mashwishi5w ago
oh i forgot
"dependencies": {
"@auth/prisma-adapter": "^1.3.3",
"@hookform/resolvers": "^3.3.4",
"@prisma/client": "^5.9.1",
"bcryptjs": "^2.4.3",
"md5": "^2.3.0",
"next": "14.1.0",
"next-auth": "5.0.0-beta.5",
"react": "^18",
"react-dom": "^18",
"react-hook-form": "^7.50.1",
"react-hot-toast": "^2.4.1",
"tailwind-merge": "^2.2.1",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/bcryptjs": "^2.4.6",
"@types/md5": "^2.3.5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.4.17",
"eslint": "^8",
"eslint-config-next": "14.1.0",
"postcss": "^8",
"prisma": "^5.9.1",
"tailwindcss": "^3.4.1",
"ts-node": "^10.9.2",
"typescript": "^5"
}
"dependencies": {
"@auth/prisma-adapter": "^1.3.3",
"@hookform/resolvers": "^3.3.4",
"@prisma/client": "^5.9.1",
"bcryptjs": "^2.4.3",
"md5": "^2.3.0",
"next": "14.1.0",
"next-auth": "5.0.0-beta.5",
"react": "^18",
"react-dom": "^18",
"react-hook-form": "^7.50.1",
"react-hot-toast": "^2.4.1",
"tailwind-merge": "^2.2.1",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/bcryptjs": "^2.4.6",
"@types/md5": "^2.3.5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.4.17",
"eslint": "^8",
"eslint-config-next": "14.1.0",
"postcss": "^8",
"prisma": "^5.9.1",
"tailwindcss": "^3.4.1",
"ts-node": "^10.9.2",
"typescript": "^5"
}
Solution
Mashwishi
Mashwishi5w ago
GitHub
Unknown argument provider_providerAccountId. Available options ar...
Adapter type @auth/prisma-adapter Environment System: OS: Windows 11 10.0.22631 CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz Memory: 17.58 GB / 31.94 GB Binaries: Node: 18.18.2 - c:\progra...
Want results from more Discord servers?
Add your server
More Posts
How can we do arbitrary atomic number operation in prisma?Something like: ```sql SET avg = (avg + newValue) / (count + 1) ```Accelerate migration not happening Vercel Prod but does with Vercel PreviewVercel Preview migration just built and deployed just fine as expected, but Production build does noLocal sqlite db in monorepo with nextJS trying to find table 'main.TABLE' instead of 'TABLE'Hi, I'm running a monorepo with my db separate from my NextJS package, and have already implementedPrisma runtime error using direct db access in parallel with Accelerate on VercelI want to use two paths to Postgres: Prisma Accelerate and direct for a very limited use case (mentiMultiple relation between modelsHello guys, I'm creating a marketplace but I have a problem. I have 2 models: `User` and `Post`. I wprisma is generating some crappy migrations for no reasonHey folks, Can someone guide me why prims is generating some crappy migrations for no reason? I meanPointing two relations to same field?I have a scenario where it make sense to store informations about two 1-n relation in one field. I'Cannot read properties of undefined (reading 'kind')Hey, i get the following error, when performing a db action. ``` [Nest] 43127 - 06/17/2024, 10:06Docker error Can't reach database server at localhost:5432I'm using docker compose and my server api depends on a postgres server in the same container. DurinWhy doesn't the generated client use the .env file specified by dotenv?package.json ```json { "scripts": { "migrate:dev": "dotenv -e .env.development -- npx prisma