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

PANIC in query-engine\core\src\interpreter\query_interpreters\nested_read.rs:79:561 #7007

Closed
gabrnunes opened this issue May 10, 2021 · 2 comments
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/client Issue for team Client. topic: basic error report topic: BigInt scalar type `BigInt`
Milestone

Comments

@gabrnunes
Copy link

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

Versions

Name Version
Node v14.16.1
OS windows
Prisma Client 2.22.0
Query Engine query-engine 60cc71d884972ab4e897f0277c4b84383dddaf6c
Database undefined

Query

query {
  findManytalk(orderBy: [
    {
      date: asc
    }
  ]) {
    id
    createdAt
    updatedAt
    deleted
    date
    place
    type
    name
    description
    thumb
    speakers {
      id
      createdAt
      updatedAt
      deleted
      name
      photo
      thumb
      description
      excerpt
    }
  }
}

Logs

t-site%5Cnode_modules%5C%40prisma%5Cclient%5Cruntime%5Cindex.js%3A27787%3A21%29%0A++prisma%3Aclient+++++at+NodeEngine.handleRequestError+%28D%3A%5Cwww%5Cshuft-site%5Cnode_modules%5C%40prisma%5Cclient%5Cruntime%5Cindex.js%3A27123%3A16%29%0A++prisma%3Aclient+++++at+runMicrotasks+%28%3Canonymous%3E%29%0A++prisma%3Aclient+++++at+processTicksAndRejections+%28internal%2Fprocess%2Ftask_queues.js%3A93%3A5%29%0A++prisma%3Aclient+++++at+async+NodeEngine.request+%28D%3A%5Cwww%5Cshuft-site%5Cnode_modules%5C%40prisma%5Cclient%5Cruntime%5Cindex.js%3A27721%3A9%29%0A++prisma%3Aclient+++++at+async+cb+%28D%3A%5Cwww%5Cshuft-site%5Cnode_modules%5C%40prisma%5Cclient%5Cruntime%5Cindex.js%3A35068%3A26%29%0A++prisma%3Aclient+++++at+async+getAllTalks+%28D%3A%5Cwww%5Cshuft-site%5C.next%5Cserver%5Cpages%5Cprogramacao.js%3A1711%3A17%29%0A++prisma%3Aclient+++++at+async+D%3A%5Cwww%5Cshuft-site%5C.next%5Cserver%5Cpages%5Cprogramacao.js%3A5538%3A17++%2B2m%0A++prisma%3Aengine+There+is+a+child+that+still+runs+and+we+want+to+start+again++%0A++prisma%3Aengine+%7B+cwd%3A+%27D%3A%5C%5Cwww%5C%5Cshuft-site%5C%5Cprisma%27+%7D++%0A++prisma%3Aengine+Search+for+Query+Engine+in+D%3A%5Cwww%5Cshuft-site%5Cnode_modules%5C.prisma%5Cclient++%0A++prisma%3Aengine+%7B+flags%3A+%5B+%27--enable-raw-queries%27%2C+%27--port%27%2C+%2757511%27+%5D+%7D++%0A++prisma%3Aengine+Client+Version%3A+2.22.0++%0A++prisma%3Aengine+Engine+Version%3A+query-engine+60cc71d884972ab4e897f0277c4b84383dddaf6c++%0A++prisma%3Aengine+Active+provider%3A+mysql++%0A++prisma%3Aengine+stdout++Starting+a+mysql+pool+with+9+connections.++%0A++prisma%3Aengine+stdout++Started+http+server+on+http%3A%2F%2F127.0.0.1%3A57511++%0A++prisma%3Aengine+Search+for+Query+Engine+in+D%3A%5Cwww%5Cshuft-site%5Cnode_modules%5C.prisma%5Cclient++%0A++prisma%3Aengine+stdout++PANIC+in+query-engine%5Ccore%5Csrc%5Cinterpreter%5Cquery_interpreters%5Cnested_read.rs%3A79%3A56%0A1++%0A++prisma%3Aengine+%7B%0A++prisma%3Aengine+++error%3A+Error%3A+read+ECONNRESET%0A++prisma%3Aengine+++++++at+TCP.onStreamRead+%28internal%2Fstream_base_commons.js%3A209%3A20%29+%7B%0A++prisma%3Aengine+++++errno%3A+-4077%2C%0A++prisma%3Aengine+++++code%3A+%27ECONNRESET%27%2C%0A++prisma%3Aengine+++++syscall%3A+%27read%27%0A++prisma%3Aengine+++%7D%0A++prisma%3Aengine+%7D++%0A%60%60%60%0A%0A%23%23+Client+Snippet%0A%60%60%60ts%0A%2F%2F+PLEASE+FILL+YOUR+CODE+SNIPPET+HERE%0A%60%60%60%0A%0A%23%23+Schema%0A%60%60%60prisma%0A%2F%2F+PLEASE+ADD+YOUR+SCHEMA+HERE+IF+POSSIBLE%0A%60%60%60%0A&title=PANIC+in+query-engine%5Ccore%5Csrc%5Cinterpreter%5Cquery_interpreters%5Cnested_read.rs%3A79%3A56%0A1&template=bug_report.md
  prisma:client 
  prisma:client If you want the Prisma team to look into it, please open the link above 🙏
  prisma:client To increase the chance of success, please post your schema and a snippet of
  prisma:client how you used Prisma Client in the issue. 
  prisma:client 
  prisma:client     at NodeEngine.throwAsyncErrorIfExists (D:\www\shuft-site\node_modules\@prisma\client\runtime\index.js:27787:21)
  prisma:client     at NodeEngine.handleRequestError (D:\www\shuft-site\node_modules\@prisma\client\runtime\index.js:27101:14)
  prisma:client     at runMicrotasks (<anonymous>)
  prisma:client     at processTicksAndRejections (internal/process/task_queues.js:93:5)
  prisma:client     at async NodeEngine.request (D:\www\shuft-site\node_modules\@prisma\client\runtime\index.js:27721:9)
  prisma:client     at async cb (D:\www\shuft-site\node_modules\@prisma\client\runtime\index.js:35068:26)
  prisma:client     at async getAllTalks (D:\www\shuft-site\.next\server\pages\programacao.js:1711:17)
  prisma:client     at async D:\www\shuft-site\.next\server\pages\programacao.js:5538:17  
  prisma:engine There is a child that still runs and we want to start again  
  prisma:engine { cwd: 'D:\\www\\shuft-site\\prisma' }  
  prisma:engine Search for Query Engine in D:\www\shuft-site\node_modules\.prisma\client  
  prisma:engine { flags: [ '--enable-raw-queries', '--port', '57520' ] }  
  prisma:engine Client Version: 2.22.0  
  prisma:engine Engine Version: query-engine 60cc71d884972ab4e897f0277c4b84383dddaf6c  
  prisma:engine Active provider: mysql  
  prisma:engine stdout  Starting a mysql pool with 9 connections.  
  prisma:engine stdout  Started http server on http://127.0.0.1:57520  
  prisma:engine Search for Query Engine in D:\www\shuft-site\node_modules\.prisma\client  
  prisma:engine stdout  PANIC in query-engine\core\src\interpreter\query_interpreters\nested_read.rs:79:56
1  
  prisma:engine {
  prisma:engine   error: Error: read ECONNRESET
  prisma:engine       at TCP.onStreamRead (internal/stream_base_commons.js:209:20) {
  prisma:engine     errno: -4077,
  prisma:engine     code: 'ECONNRESET',
  prisma:engine     syscall: 'read'
  prisma:engine   }
  prisma:engine }  

Client Snippet

export async function getAllTalks() {
  const talks = await prisma.talk.findMany({
    orderBy: {
      date: 'asc',
    },
    include: {
      speakers: true
    }
  })
  console.log(talks)

  return talks || [];
}

Schema

datasource db {
    url      = env("DATABASE_URL")
    provider = "mysql"
}

generator client {
    provider = "prisma-client-js"
}

model configuration {
    id        BigInt   @id @default(autoincrement())
    createdAt DateTime @default(now())
    updatedAt DateTime @updatedAt
    deleted   Boolean  @default(false)
    name      String
    value     String   @db.LongText
}

model faq {
    id        BigInt   @id @default(autoincrement())
    createdAt DateTime @default(now())
    updatedAt DateTime @updatedAt
    deleted   Boolean  @default(false)
    question  String
    answer    String   @db.LongText
}

enum sponsor_type {
    APRESENTA
    PATROCINADOR
    APOIO
}

model sponsor {
    id          BigInt   @id @default(autoincrement())
    createdAt   DateTime @default(now())
    updatedAt   DateTime @updatedAt
    deleted     Boolean  @default(false)
    logo        String   @unique
    type        sponsor_type
    website     String
    title       String
}

enum type {
    PAINEL
    PALESTRA
    ENTREVISTA
    CUMBUCA_DE_PEIXE
    HAPPY_HOUR
}

model talk {
    id            BigInt          @id @default(autoincrement())
    createdAt     DateTime        @default(now())
    updatedAt     DateTime        @updatedAt
    deleted       Boolean         @default(false)
    date          DateTime
    place         String
    type          type
    name          String
    description   String          @db.LongText
    talk_reaction talk_reaction[]
    speakers      speaker[]       @relation(references: [id])
    thumb         String          @unique
}

model talk_reaction {
    id        BigInt   @id @default(autoincrement())
    createdAt DateTime @default(now())
    updatedAt DateTime @updatedAt
    deleted   Boolean  @default(false)
    uuid      String
    talk      talk     @relation(references: [id], fields: [talk_id])
    talk_id   BigInt
}

model speaker {
    id                   BigInt                 @id @default(autoincrement())
    createdAt            DateTime               @default(now())
    updatedAt            DateTime               @updatedAt
    deleted              Boolean                @default(false)
    name                 String
    photo                String                 @unique
    thumb                String                 @unique
    description          String                 @db.LongText
    excerpt              String                 @db.LongText
    talks                talk[]                 @relation(references: [id])
    speaker_reaction     speaker_reaction[]
    speaker_social_media speaker_social_media[]
}

model speaker_reaction {
    id         BigInt   @id @default(autoincrement())
    createdAt  DateTime @default(now())
    updatedAt  DateTime @updatedAt
    deleted    Boolean  @default(false)
    uuid       String
    speaker    speaker  @relation(fields: [speaker_id], references: [id])
    speaker_id BigInt
}

enum social_media {
    LINKEDIN
    INSTAGRAM
    FACEBOOK
    TWITTER
}

model speaker_social_media {
    id         BigInt       @id @default(autoincrement())
    createdAt  DateTime     @default(now())
    updatedAt  DateTime     @updatedAt
    deleted    Boolean      @default(false)
    type       social_media
    value      String
    speaker    speaker      @relation(fields: [speaker_id], references: [id])
    speaker_id BigInt
}

enum discount_type {
    FIXED_VALUE
    PERCENTAGE
}

model coupon {
    id             BigInt           @id @default(autoincrement())
    createdAt      DateTime         @default(now())
    updatedAt      DateTime         @updatedAt
    deleted        Boolean          @default(false)
    code           String           @unique
    max_usages     Int
    value          Decimal          @db.Decimal(3, 2)
    discount_type  discount_type
    ticket_payment ticket_payment[]
}

model user {
    id             BigInt           @id @default(autoincrement())
    createdAt      DateTime         @default(now())
    updatedAt      DateTime         @updatedAt
    deleted        Boolean          @default(false)
    email          String           @unique
    ticket         ticket[]
    referral       referral[]
    login_link     login_link[]
    asaas_id       String           @unique
    ticket_payment ticket_payment[]
}

model login_link {
    id         BigInt   @id @default(autoincrement())
    createdAt  DateTime @default(now())
    updatedAt  DateTime @updatedAt
    deleted    Boolean  @default(false)
    expires_at DateTime
    hash       String   @unique
    user       user     @relation(fields: [user_id], references: [id])
    user_id    BigInt
}

enum billing_type {
    BOLETO
    CREDIT_CARD
}

enum payment_status {
    PAID
    PENDING
    OVERDUE
}

model ticket_payment {
    id           BigInt         @id @default(autoincrement())
    createdAt    DateTime       @default(now())
    updatedAt    DateTime       @updatedAt
    deleted      Boolean        @default(false)
    billing_type billing_type
    value        Decimal        @db.Decimal(5, 2)
    status       payment_status
    due_date     DateTime
    asaas_id     String
    coupon       coupon?        @relation(fields: [coupon_id], references: [id])
    coupon_id    BigInt?
    ticket       ticket[]
    user         user           @relation(fields: [user_id], references: [id])
    user_id      BigInt
}

model ticket {
    id                BigInt         @id @default(autoincrement())
    createdAt         DateTime       @default(now())
    updatedAt         DateTime       @updatedAt
    deleted           Boolean        @default(false)
    thumb             String         @unique
    user              user           @relation(fields: [user_id], references: [id])
    user_id           BigInt
    ticket_payment    ticket_payment @relation(fields: [ticket_payment_id], references: [id])
    ticket_payment_id BigInt
    attendee          attendee[]
}

enum state {
    AC
    AL
    AP
    AM
    BA
    CE
    DF
    ES
    GO
    MA
    MT
    MS
    MG
    PA
    PB
    PR
    PE
    PI
    RJ
    RN
    RS
    RO
    RR
    SC
    SP
    SE
    TO
}

model attendee {
    id                           BigInt     @id @default(autoincrement())
    createdAt                    DateTime   @default(now())
    updatedAt                    DateTime   @updatedAt
    deleted                      Boolean    @default(false)
    ticket                       ticket     @relation(fields: [ticket_id], references: [id])
    ticket_id                    BigInt
    first_name                   String
    last_name                    String
    email                        String     @unique
    city                         String?
    state                        state?
    company                      String?
    segment                      String?
    experience                   String?
    allow_sponsor_content        Boolean
    allow_register_on_newsletter Boolean
    referral                     referral[]
}

model referral {
    id          BigInt   @id @default(autoincrement())
    createdAt   DateTime @default(now())
    updatedAt   DateTime @updatedAt
    deleted     Boolean  @default(false)
    attendee    attendee @relation(fields: [attendee_id], references: [id])
    attendee_id BigInt
    user        user     @relation(fields: [user_id], references: [id])
    user_id     BigInt
}
@janpio janpio added topic: basic error report bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug. labels May 10, 2021
@pantharshit00
Copy link
Contributor

Hey @gabrnunes

Thanks for reporting this! I can confirm the issue. Looks like nested_read resolver is unable to handles bigints for this case.

Minimal reproduction: https://github.com/harshit-test-org/prisma-issue-7007

@pantharshit00 pantharshit00 added bug/2-confirmed Bug has been reproduced and confirmed. process/candidate and removed bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. labels May 13, 2021
@janpio janpio added team/client Issue for team Client. topic: BigInt scalar type `BigInt` labels May 18, 2021
@dpetrick dpetrick self-assigned this May 19, 2021
@matthewmueller matthewmueller added this to the 2.24.0 milestone May 19, 2021
@dpetrick
Copy link
Contributor

Thanks for reporting. This will be fixed with 2.24.

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. team/client Issue for team Client. topic: basic error report topic: BigInt scalar type `BigInt`
Projects
None yet
Development

No branches or pull requests

5 participants