Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear rust error PANIC #1671

Closed
steebchen opened this issue Feb 21, 2020 · 3 comments
Closed

Unclear rust error PANIC #1671

steebchen opened this issue Feb 21, 2020 · 3 comments
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Milestone

Comments

@steebchen
Copy link
Contributor

steebchen commented Feb 21, 2020

Note: This bug report is just about the fact that the error message reports "PANIC" and the user needs to set DEBUG=*, not about the actual error.

Invalid `prisma.posts.findOne()` invocation in
/Users/prisma/prisma/prisma-examples/typescript/graphql-sdl-first/src/schema.ts:71:18

   67 return ctx.prisma.post.findMany({
   68   where: {
   69     OR: [
   70       { title: { contains: args.searchString } },
→  71       PANIC
    at PrismaClientFetcher.request (/Users/prisma/prisma/prisma-examples/typescript/graphql-sdl-first/node_modules/@prisma/client/index.js:89:17)
    at process._tickCallback (internal/process/next_tick.js:68:7)

With DEBUG=*:

  engine stdout { timestamp: 'Feb 21 14:24:17.391',
  level: 'ERROR',
  target: 'prisma',
  fields:
   { message: 'PANIC',
     reason: 'called `Option::unwrap()` on a `None` value',
     file:
      '/rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libcore/macros/mod.rs',
     line: 15,
     column: 40 } } +21ms
  engine { error:
  engine    { Error: socket hang up
  engine        at createHangUpError (_http_client.js:323:15)
  engine        at Socket.socketOnEnd (_http_client.js:426:23)
  engine        at Socket.emit (events.js:203:15)
  engine        at endReadableNT (_stream_readable.js:1145:12)
  engine        at process._tickCallback (internal/process/next_tick.js:63:19) code: 'ECONNRESET' } } +1ms
  prisma-client Error: PANIC
  prisma-client     at currentRequestPromise.then.catch.e (/Users/prisma/prisma/prisma-examples/typescript/graphql-sdl-first/node_modules/@prisma/client/runtime/index.js:1:16175)
  prisma-client     at process._tickCallback (internal/process/next_tick.js:68:7) +8ms
Error: 
Invalid `prisma.posts.findOne()` invocation in
/Users/prisma/prisma/prisma-examples/typescript/graphql-sdl-first/src/schema.ts:71:18

   67 return ctx.prisma.post.findMany({
   68   where: {
   69     OR: [
   70       { title: { contains: args.searchString } },
→  71       PANIC
    at PrismaClientFetcher.request (/Users/prisma/prisma/prisma-examples/typescript/graphql-sdl-first/node_modules/@prisma/client/index.js:89:17)
    at process._tickCallback (internal/process/next_tick.js:68:7)

reproduction available at https://github.com/prisma/prisma-examples/tree/prisma2/typescript/graphql-sdl-first:

git clone https://github.com/prisma/prisma-examples
cd prisma-examples/typescript/graphql-sdl-first
yarn install
prisma2 generate
yarn dev &
pid=$!

sleep 10

curl 'http://localhost:4000/' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: http://localhost:4000' --data-binary '{"query":"query {\n  feed {\n    id\n    content\n    author {\n      id\n      name\n      email\n    }\n  }\n}"}' --compressed

kill "$pid"
@steebchen steebchen transferred this issue from prisma/prisma-client-js Feb 21, 2020
@steebchen steebchen transferred this issue from prisma/prisma-examples Feb 21, 2020
@pantharshit00
Copy link
Contributor

I can confirm this. Another issue that also causes PANIC without much information: prisma/prisma-client-js#502

Might be related to recent AUMFIDARR merges.

@pantharshit00 pantharshit00 added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. labels Feb 21, 2020
@steebchen steebchen changed the title Unclear rust error Unclear rust error PANIC Feb 21, 2020
@divyenduz divyenduz added this to the Preview 24 New milestone Mar 3, 2020
@janpio
Copy link
Member

janpio commented Mar 6, 2020

Is this still reproducible @pantharshit00?

@pantharshit00
Copy link
Contributor

Unable to reproduce this now with preview024:
image

@steebchen report back if you can still reproduce this.

@pantharshit00 pantharshit00 removed their assignment Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

5 participants