umami icon indicating copy to clipboard operation
umami copied to clipboard

Inconsistent query result: Field user is required to return data, got `null` instead

Open manuel-rw opened this issue 4 months ago • 6 comments

Describe the Bug

Users are unable to access the teams page. The following error message appears: image

It seems that database migrations may not have been applied. We do see other errors as well hinting that some website events aren't being inserted. This instance has been running for months and we have not tampered with the database or Umami itself.

Database

PostgreSQL

Relevant log output

PrismaClientUnknownRequestError: 
Invalid `prisma.team.findMany()` invocation:
Inconsistent query result: Field user is required to return data, got `null` instead.
    at ai.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:126:6965)
    at ai.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:126:6109)
    at ai.request (/app/node_modules/@prisma/client/runtime/library.js:126:5817)
    at async l (/app/node_modules/@prisma/client/runtime/library.js:131:9709)
    at async Object._ [as pagedQuery] (/app/.next/server/chunks/6688.js:1:18567)
    at async m (/app/.next/server/pages/api/users/[userId]/teams.js:1:2083)
    at async K (/app/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:16545)
    at async U.render (/app/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:16981)
    at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:556:9)
    at async NextNodeServer.handleCatchallRenderRequest (/app/node_modules/next/dist/server/next-server.js:268:37) {
  clientVersion: '5.9.1'
}

Which Umami version are you using? (if relevant)

v2.10.2

Which browser are you using? (if relevant)

Firefox

How are you deploying your application? (if relevant)

Docker

manuel-rw avatar Mar 23 '24 10:03 manuel-rw