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

Prisma Studio Fatal Error #924

Closed
VgRuaya opened this issue May 3, 2022 · 1 comment
Closed

Prisma Studio Fatal Error #924

VgRuaya opened this issue May 3, 2022 · 1 comment

Comments

@VgRuaya
Copy link

VgRuaya commented May 3, 2022

  1. Prisma version (prisma -v or npx prisma -v): 3.13.0

  2. Logs from Developer Tools Console or Command line, if any:

Invalid string length
RangeError: Invalid string length
    at JSON.stringify (<anonymous>)
    at _t.serialize (http://localhost:5555/assets/index.js:1:49091)
    at _t.update (http://localhost:5555/assets/index.js:1:12197)
    at Cc (http://localhost:5555/assets/vendor.js:50:6994)
    at _t.n (http://localhost:5555/assets/vendor.js:50:6688)
    at _t.update (http://localhost:5555/assets/index.js:1:48948)
    at Cc (http://localhost:5555/assets/vendor.js:50:6994)
    at _t.n (http://localhost:5555/assets/vendor.js:50:6688)
    at http://localhost:5555/assets/index.js:1:82272
    at Array.forEach (<anonymous>)
  1. Does the issue persist even after updating to the latest prisma CLI dev version? (npm i -D prisma@dev) Yes

  2. Prisma schema (if relevant):

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

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

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

model User {
  id           Int            @id @default(autoincrement())
  username     String         @unique @db.VarChar(100)
  password     String         @db.Text
  firstName    String         @db.VarChar(100)
  lastName     String         @db.VarChar(100)
  branch       Branch         @relation(fields: [branchId], references: [id])
  branchId     Int
  roleId       Int
  role         Role           @relation(fields: [roleId], references: [id])
  createdAt    DateTime       @default(now())
  updatedAt    DateTime       @updatedAt
  CashPosition CashPosition[]
  CashFund     CashFund[]
}

model Role {
  id          Int        @id @default(autoincrement())
  name        String     @db.VarChar(100)
  description String?    @db.VarChar(100)
  createdAt   DateTime   @default(now())
  updatedAt   DateTime   @updatedAt
  users       User[]
  CashFund    CashFund[]

}

model MigrationSeed {
  id        Int       @id @default(autoincrement()) @db.UnsignedInt
  name      String    @unique
  createdAt DateTime  @default(now())
  updatedAt DateTime? @updatedAt
}

model CashFund {
  id            BigInt    @id @default(autoincrement())
  transactionNo String    @db.VarChar(100)
  user          User      @relation(fields: [userId], references: [id])
  userId        Int
  date          DateTime
  type          String    @db.VarChar(100)
  branchFrom    String    @db.VarChar(100)
  branchTo      String    @db.VarChar(100)
  requestedBy   String    @db.VarChar(100)
  borrower      String?
  loanNumber    String?
  remarks       String    @db.VarChar(100)
  amount        Int
  payType       String    @db.VarChar(100)
  reference     String    @db.VarChar(100)
  approvedBy    String?   @db.VarChar(100)
  approvedDate  DateTime?
  status        String    @db.VarChar(50)
  receivedBy    String?   @db.VarChar(100)
  receivedDate  DateTime?
  createdAt     DateTime  @default(now())
  updatedAt     DateTime? @updatedAt
  Role          Role?     @relation(fields: [roleId], references: [id])
  roleId        Int?
}

model Area {
  id          Int      @id @default(autoincrement())
  name        String   @db.VarChar(100)
  description String?  @db.VarChar(100)
  createdAt   DateTime @default(now())
  updatedAt   DateTime @updatedAt
  Branch      Branch[]
}

model Branch {
  id                           Int                            @id @default(autoincrement())
  code                         String
  name                         String                         @db.VarChar(100)
  description                  String?                        @db.VarChar(100)
  areaId                       Int
  area                         Area                           @relation(fields: [areaId], references: [id])
  createdAt                    DateTime                       @default(now())
  updatedAt                    DateTime                       @updatedAt
  nonCashTransactionCreditType NonCashTransactionCreditType[]
  nonCashTransactionCredit     NonCashTransactionCredit[]
  productReleases              ProductReleases[]
  sukli                        Sukli[]
  nonCashTransactionDebit      NonCashTransactionDebit[]
  users                        User[]
  Collections                  Collections[]
}

model CashPosition {
  id                       Int            @id @default(autoincrement())
  user                     User           @relation(fields: [userId], references: [id])
  userId                   Int
  createdBy                String
  branchId                 String
  branch                   String
  asOfDate                 DateTime
  beginningBalance         Float
  //Collection
  pensionLoanCol           Float
  pivateLoanCol            Float
  ffelLoanCol              Float
  sblBranchCol             Float
  sblCollector             Float
  trueMoneyCol             Float
  othersCol                Float
  btuCollection            Float
  sweldoAdvanceColl        Float
  salaryLoanTieUpColl      Float
  BNIColl                  Float
  totalCol                 Float
  addCapitalHo             Float
  addCapOnline             Float
  cashTransfer             Float
  totalFunding             Float
  trueMoneyAgentsWalletCol Float
  gcashPayoutCol           Float
  othersNonCashCol         Float
  totalNonCashTransaction  Float
  grandTotalColl           Float
  //Disbursement
  pensionLoanRelease       Float
  checkRediscounting       Float
  sblLoanRelease           Float
  agentsLoan               Float
  fclRelease               Float
  mcRedemption             Float
  totalOnetoSix            Float
  sukliRelease             Float
  otherDisbursement        Float
  salaryLoanTieUpDis       Float
  BNIDis                   Float
  totalSevenToEight        Float
  pettyCashReplenishment   Float
  commissionExpenses       Float
  totalNineToTen           Float
  trueMoneyAgentsWalletDis Float
  gcashPayoutDid           Float
  othersNonCashDis         Float
  grandTotalDisbursement   Float
  //Deposits
  firstDeposits            Float
  firstDepositsBank        String?
  firstDepositsBranch      String?
  firstDepositsRefences    String?
  secondDeposits           Float
  secondDepositsBank       String?
  secondDepositsBranch     String?
  secondDepositsReferences String?
  endOfDayHarvest          Float
  grandTotalDeposits       Float
  endingBalance            Float
  cashCountTotal           Float
  shortage                 Float
  overage                  Float
  remarks                  String?
  cashCount                CashCount?
  manualInputs             ManualInputs[]
  createdAt                DateTime       @default(now())
  updatedAt                DateTime       @updatedAt
}

model CashCount {
  id             Int          @id @default(autoincrement())
  cashPosition   CashPosition @relation(fields: [cashPositionId], references: [id])
  cashPositionId Int          @unique
  psc1000        Int
  psc500         Int
  psc200         Int
  psc100         Int
  psc50          Int
  psc20          Int
  psc10          Int
  psc5           Int
  psc1           Int
  psc0_5         Int
  psc0_25        Int
  psc0_10        Int
  psc0_05        Int
  temptPsc1000   Int
  temptPsc500    Int
  temptPsc200    Int
  temptPsc100    Int
  temptPsc50     Int
  temptPsc20     Int
  temptPsc10     Int
  temptPsc5      Int
  temptPsc1      Int
  temptPsc0_5    Int
  temptPsc0_25   Int
  temptPsc0_10   Int
  temptPsc0_05   Int
  createdAt      DateTime     @default(now())
  updatedAt      DateTime     @updatedAt
}

model ManualInputCategory {
  id          Int      @id @default(autoincrement())
  name        String   @db.VarChar(100)
  description String?  @db.VarChar(100)
  createdAt   DateTime @default(now())
  updatedAt   DateTime @updatedAt

}

model ManualInputs {
  id             Int          @id @default(autoincrement())
  createdAt      DateTime     @default(now())
  updatedAt      DateTime     @updatedAt
  cashPosition   CashPosition @relation(fields: [cashPositionId], references: [id])
  cashPositionId Int
  borrower       String?
  type           String?
  amount         Float?
  refNo          String?
  controlNo      String?
  clientType     String?
  loanType       String?
  mode           String?
  bank           String?
  wd             String?
  rate           String?
  terms          String?
  principal      Float?
  interest       String?
  spf            String?
  tnmCardFee     String?
  arOld          String?
  proceed        Float?
  remarks        String?
  categoryId     Int?
}

model CollectionType {
  id          Int           @id @default(autoincrement())
  name        String        @db.VarChar(100)
  description String?       @db.VarChar(100)
  Collections Collections[]
  createdAt   DateTime      @default(now())
  updatedAt   DateTime      @updatedAt
}

model Product {
  id              Int               @id @default(autoincrement())
  name            String            @db.VarChar(100)
  description     String?           @db.VarChar(100)
  Collections     Collections[]
  createdAt       DateTime          @default(now())
  updatedAt       DateTime          @updatedAt
  ProductReleases ProductReleases[]
}

model Collections {
  id               Int            @id @default(autoincrement())
  loanSystemId     Int
  productId        Int
  product          Product        @relation(fields: [productId], references: [id])
  collectionTypeId Int
  collectionType   CollectionType @relation(fields: [collectionTypeId], references: [id])
  branchId         Int
  branch           String
  date             DateTime
  orNumber         String
  code             String
  name             String
  amount           Float
  collector        String
  remarks          String
  productType      String
  createdAt        DateTime       @default(now())
  updatedAt        DateTime       @updatedAt
  Branch           Branch         @relation(fields: [branchId], references: [id])
}

model NonCashTransactionCreditType {
  id                       Int                        @id @default(autoincrement())
  name                     String                     @db.VarChar(100)
  description              String?                    @db.VarChar(100)
  createdAt                DateTime                   @default(now())
  updatedAt                DateTime                   @updatedAt
  NonCashTransactionCredit NonCashTransactionCredit[]
  Branch                   Branch?                    @relation(fields: [branchId], references: [id])
  branchId                 Int?
}

model NonCashTransactionCredit {
  id              Int                          @id @default(autoincrement())
  nCTCReditTypeId Int
  nctCredit       NonCashTransactionCreditType @relation(fields: [nCTCReditTypeId], references: [id])
  branch          Branch                       @relation(fields: [branchId], references: [id])
  branchId        Int
  date            DateTime
  OrNumber        String
  code            String
  name            String
  amount          Float
  collector       String
  remarks         String
  createdAt       DateTime                     @default(now())
  updatedAt       DateTime                     @updatedAt
}

model ProductReleases {
  id            Int      @id @default(autoincrement())
  productId     Int
  loanSystemId  Int
  product       Product  @relation(fields: [productId], references: [id])
  branch        String
  branchId      Int
  date          DateTime
  loanNumber    String
  cvNumber      String
  name          String
  controlNumber String
  clientType    String
  loanType      String
  mode          String
  bank          String
  wd            Int
  stRate        Float
  period        Int
  MA            Float
  loanAmount    Float
  totalInterest Float
  UDI           Float
  serviceFee    Float
  computerFee   Float
  doCFee        Float
  arBalance     Float
  advanceCol    Float
  default       Float
  otherCharges  Float
  penalty       Float
  others        String
  proceed       Float
  agentName     String
  remarks       String
  productType   String
  createdAt     DateTime @default(now())
  updatedAt     DateTime @updatedAt
  Branch        Branch   @relation(fields: [branchId], references: [id])
}

model Sukli {
  id        Int      @id @default(autoincrement())
  branch    Branch   @relation(fields: [branchId], references: [id])
  branchId  Int
  name      String
  date      DateTime @db.Date
  proceed   Float
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

model NonCashTransactionDebitType {
  id                      Int                       @id @default(autoincrement())
  name                    String                    @db.VarChar(100)
  description             String?                   @db.VarChar(100)
  createdAt               DateTime                  @default(now())
  updatedAt               DateTime                  @updatedAt
  branchId                Int?
  NonCashTransactionDebit NonCashTransactionDebit[]
}

model NonCashTransactionDebit {
  id                            Int                         @id @default(autoincrement())
  nctDebitType                  NonCashTransactionDebitType @relation(fields: [nonCashTransactionDebitTypeId], references: [id])
  nonCashTransactionDebitTypeId Int
  branch                        Branch                      @relation(fields: [branchId], references: [id])
  branchId                      Int
  date                          DateTime
  OrNumber                      String
  code                          String
  name                          String
  amount                        Float
  collector                     String
  remarks                       String
  createdAt                     DateTime                    @default(now())
  updatedAt                     DateTime                    @updatedAt
}

model Deposits {
  id                       Int      @id @default(autoincrement())
  firstDeposits            Float
  firstDepositsBank        String
  firstDepositsBranch      String
  firstDepositsReferences  String
  secondDeposits           Float
  secondDepositsBank       String
  secondDepositsBranch     String
  secondDepositsReferences String
  endOfDayHarvest          Float
  totalAmountDeposits      Float
  createdAt                DateTime @default(now())
  updatedAt                DateTime @updatedAt
}

@VgRuaya VgRuaya changed the title Fatal error Prisma Studio Fatal Error May 3, 2022
@janpio
Copy link
Contributor

janpio commented May 3, 2022

#895 with workaround.

@janpio janpio closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants