Closed
Description
Describe the bug
Using the default authentication mechanism.
After having invited a user and this user having logged in successfully, as a owner I still see the user in "Pending requests".
When clicking "Approve", I get an error in the UI:
Errors logs:
[web] | 2025-06-06T16:12:47.053Z error: [web-actions]
[web] | Invalid `prisma.userToOrg.create()` invocation:
[web] |
[web] |
[web] | Unique constraint failed on the fields: (`orgId`,`userId`)
[web] | PrismaClientKnownRequestError:
[web] | Invalid `prisma.userToOrg.create()` invocation:
[web] |
[web] |
[web] | Unique constraint failed on the fields: (`orgId`,`userId`)
[web] | at Vn.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:121:7339)
[web] | at Vn.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:121:6663)
[web] | at Vn.request (/app/node_modules/@prisma/client/runtime/library.js:121:6370)
[web] | at async l (/app/node_modules/@prisma/client/runtime/library.js:130:9617)
[web] | at async /app/packages/web/.next/server/chunks/616.js:1:58882
[web] | at async Proxy._transactionWithCallback (/app/node_modules/@prisma/client/runtime/library.js:130:7984)
[web] | at async /app/packages/web/.next/server/chunks/616.js:1:58760
[web] | at async es (/app/packages/web/.next/server/chunks/616.js:1:38506)
[web] | at async /app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:16:418
[web] | at async rE (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:8148)
It doesn't seem to cause any actual issue, just the request stays as pending.
Sourcebot deployment information
Sourcebot version (e.g. v3.0.1): v4.1.1