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
Mashwishi5mo 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
Mashwishi5mo 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
Mashwishi5mo 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