prisma / prisma-client-js

Type-safe database client for TypeScript & Node.js (ORM replacement)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PANIC: Application logic invariant error: received null value for field metadata which may not be null

mcsdevv opened this issue · comments

Hi Prisma Team! My Prisma Client just crashed. This is the report:

Versions

Name Version
Node v10.18.1
OS darwin
Prisma Client 2.8.0

Logs

  prisma-client { engineConfig:
  prisma-client    { cwd: '/Users/mcs/dev/projects/draftly/prisma',
  prisma-client      enableDebugLogs: false,
  prisma-client      enableEngineDebugMode: undefined,
  prisma-client      datamodelPath:
  prisma-client       '/Users/mcs/dev/projects/draftly/node_modules/.prisma/client/schema.prisma',
  prisma-client      prismaPath: undefined,
  prisma-client      engineEndpoint: undefined,
  prisma-client      generator:
  prisma-client       { name: 'client',
  prisma-client         provider: 'prisma-client-js',
  prisma-client         output:
  prisma-client          '/Users/mcs/dev/projects/draftly/node_modules/@prisma/client',
  prisma-client         binaryTargets: [],
  prisma-client         previewFeatures: [],
  prisma-client         config: {} },
  prisma-client      showColors: false,
  prisma-client      logLevel: undefined,
  prisma-client      logQueries: undefined,
  prisma-client      flags: [],
  prisma-client      clientVersion: '2.8.0',
  prisma-client      enableExperimental: [],
  prisma-client      useUds: undefined } }  
  plusX Execution permissions of /Users/mcs/dev/projects/draftly/node_modules/.prisma/client/query-engine-darwin are fine  
  plusX Execution permissions of /Users/mcs/dev/projects/draftly/node_modules/.prisma/client/query-engine-darwin are fine  

Resolved, this was caused by changing a relation type from an array to an object, thus returned null rather than [] when the expected relation data was not present (due to manual editing of the database.

This seems a pretty harsh way to fail in this situation although 100% my fault!

Thanks for letting us know! We would definitely like to improve the error message if I can manage to reproduce this locally.

Engine panic is undesired in any case and we want to avoid them in most cases.

Hmm, I wasn't able to reproduce this locally. I will close this for now....