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

Pisma Studio unable to open scheme #1019

Closed
BeepboyAlgo opened this issue Sep 15, 2022 · 1 comment
Closed

Pisma Studio unable to open scheme #1019

BeepboyAlgo opened this issue Sep 15, 2022 · 1 comment

Comments

@BeepboyAlgo
Copy link

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

prisma : 3.13.0
@prisma/client : 3.13.0
Current platform : windows
Query Engine (Node-API) : libquery-engine efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules@prisma\engines\query_engine-windows.dll.node)
Migration Engine : migration-engine-cli efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules@prisma\engines\migration-engine-windows.exe)
Introspection Engine : introspection-core efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules@prisma\engines\introspection-engine-windows.exe)
Format Binary : prisma-fmt efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules@prisma\engines\prisma-fmt-windows.exe)
Default Engines Hash : efdf9b1183dddfd4258cd181a72125755215ab7b
Studio : 0.459.0

  1. Logs from Developer Tools Console or Command line, if any:
Invalid string length
RangeError: Invalid string length
    at JSON.stringify (<anonymous>)
    at _t.serialize (file:///C:/Users/isica/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/dist/renderer/assets/index.js:1:49091)
    at _t.update (file:///C:/Users/isica/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/dist/renderer/assets/index.js:1:12197)
    at Cc (file:///C:/Users/isica/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/dist/renderer/assets/vendor.js:50:6994)
    at _t.n (file:///C:/Users/isica/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/dist/renderer/assets/vendor.js:50:6688)
    at _t.update (file:///C:/Users/isica/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/dist/renderer/assets/index.js:1:48948)
    at Cc (file:///C:/Users/isica/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/dist/renderer/assets/vendor.js:50:6994)
    at _t.n (file:///C:/Users/isica/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/dist/renderer/assets/vendor.js:50:6688)
    at file:///C:/Users/isica/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/dist/renderer/assets/index.js:1:82151
    at Array.forEach (<anonymous>)
  1. Does the issue persist even after updating to the latest prisma CLI dev version? (npm i -D prisma@dev)

  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 = "sqlite"
  url      = env("DATABASE_URL")
}

model User {
  id                    String     @id @default(uuid())
  algorandAddress       String     @unique
  discordId             String?    @unique
  discordUsername       String?    @unique
  verified              Boolean    @default(false)
  userHit               UserHit[]
  treasureHunt          TreasureHunt[]
  treasureHuntPrize     TreasureHuntPrize[]
}

model TreasureHunt {
  id                String           @id @default(uuid())
  prizeId           String
  treasureHuntPrize TreasureHuntPrize      @relation(fields: [prizeId], references: [id])
  assetId           Int
  name              String
  url               String?
  distance          Int
  numDistance       Int              @default(0)
  totalDistance     Int              @default(0)
  cooldown          Int
  messageId         String?
  wonById           String?
  wonBy             User?            @relation(fields: [wonById], references: [id])
  userHit           UserHit[]
  discordMessagesId String?
  discordMessages   DiscordMessages? @relation(fields: [discordMessagesId], references: [id])
}

model TreasureHuntPrize {
  id           String   @id @default(uuid())
  assetId      Int
  distance     Int
  rarity       Int
  quantity     Int
  isInTreasure Boolean  @default(false)
  isWon        Boolean  @default(false)
  wonById      String?
  wonBy        User?    @relation(fields: [wonById], references: [id])
  TreasureHunt TreasureHunt[]
}

model UserHit {
  id           String   @id @default(uuid())
  userId       String
  user         User     @relation(fields: [userId], references: [id])
  treasureId   String
  treasure     TreasureHunt   @relation(fields: [treasureId], references: [id])
  meters       Int      @default(0)
  banned       Boolean  @default(false)
  lastRollTime DateTime

  @@unique([userId, treasureId])
}

model DiscordMessages {
  id             String    @id @default(uuid())
  // Channel the competition is in
  channelId      String
  // ID of the core message
  messageId      String
  // ID of the current "leaderboard" message that is being regualarly updated
  currentReplyId String?
  // The time the reply was created
  replyCreatedAt DateTime?
  TreasureHunt   TreasureHunt[]
}
@petradonka
Copy link
Contributor

It looks like you're running into a known issue, could you try if the following workaround helps? #895 (comment)

@janpio janpio closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants