prisma / studio

🎙️ The easiest way to explore and manipulate your data in all of your Prisma projects.
https://www.prisma.io/studio
1.89k stars 47 forks source link

Pisma Studio unable to open scheme #1019

Closed BeepboyAlgo closed 5 months ago

BeepboyAlgo commented 2 years ago
  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>)
  2. Does the issue persist even after updating to the latest prisma CLI dev version? (npm i -D prisma@dev)

  3. 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 commented 2 years ago

It looks like you're running into a known issue, could you try if the following workaround helps? https://github.com/prisma/studio/issues/895#issuecomment-1083051249