#[TypeError: The "payload" argument must be of type object. Received null]

7 messages · Page 1 of 1 (latest)

leaden bronzeBOT
#

Skipping coffee for instant knowledge! Let's brew that AI answer now.

dreamy cobalt
leaden bronzeBOT
# leaden bronze Skipping coffee for instant knowledge! Let's brew that AI answer now.

Based on the information provided in the knowledge sources, it appears that you're encountering a known issue related to Next.js and Prisma. This error is not directly related to your Prisma schema, but rather to how Next.js handles stack traces and source maps after upgrading.

The error message "TypeError: The "payload" argument must be of type object. Received null" is actually coming from the console.log() function, not from Prisma itself. This issue has been reported and discussed in several GitHub issues.

Here are a few potential solutions and workarounds:

  1. As suggested in this GitHub issue, you can try removing the line //# sourceMappingURL=library.js.map from node_modules/@prisma/client/runtime/library.js as a temporary workaround.

  2. Make sure that both your Prisma CLI and Prisma Client are updated to the same version. As mentioned in another GitHub issue, having mismatched versions can cause similar errors.

  3. If you're using TypeScript, updating to a newer version might help. In this GitHub discussion, updating TypeScript from version 4.5.5 to 5.2.2 resolved a similar error.

If these solutions don't work, you may need to provide more details about your setup, including your exact Prisma and Next.js versions, and possibly a minimal reproduction of the issue.

Remember to always run prisma generate after upgrading Prisma or making changes to your schema.

If the problem persists, you might want to consider opening a new issue on the Prisma GitHub repository with a minimal reproduction of your specific case.

dreamy cobalt
# leaden bronze Based on the information provided in the knowledge sources, it appears that you'...

prisma:client Generated request: +1ms
prisma:client {
"modelName": "User",
"action": "findUnique",
"query": {
"arguments": {
"where": {
"id": "user_2k4mhHWHN8ueSCiVmEiwWV9YCX0"
}
},
"selection": {
"$composites": true,
"$scalars": true,
"passwordItems": {
"arguments": {},
"selection": {
"$composites": true,
"$scalars": true
}
},
"cardItems": {
"arguments": {},
"selection": {
"$composites": true,
"$scalars": true
}
},
"pinItems": {
"arguments": {},
"selection": {
"$composites": true,
"$scalars": true
}
},
"noteItems": {
"arguments": {},
"selection": {
"$composites": true,
"$scalars": true
}
}
}
}
}
+1ms
prisma:client:libraryEngine sending request, this.libraryStarted: false +4ms
prisma:client:request_handler {} +1ms
⨯ [TypeError: Cannot read properties of undefined (reading 'bind')] {
clientVersion: '5.22.0',
digest: '4055108486'
}

leaden bronzeBOT
dreamy cobalt
#

Fixed the issue. had to regenerate / make sure prisma was the same version as @prisma/client