P
Prisma3w ago
Riko

Problem with Studio in the console (Data Platform)

Hello, I'm currently trying to set up a way for non-tech people in my team to use prisma studio. I thought to use your console feature, but I'm getting a completely blank screen and an error in the browser's console. Studio works perfectly locally and the db works perfectly in the app both locally and in prod, so I'm not sure if this is on my side. I've run prisma validate and the schema came out as valid too. This is a Postgres database on supabase, if that information helps at all. The error I'm getting is:
{"error_code":"P1012","message":"\u001b[1;91merror\u001b[0m: \u001b[1mUnknown escape sequence. If the value is a windows-style path, `\\` must be escaped as `\\\\`.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:365\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m364 | \u001b[0m keyId BigInt? @default(autoincrement()) @map(\"key_id\")\n\u001b[1;94m365 | \u001b[0m keyContext Bytes? @default(dbgenerated(\"\u001b[1;91m\\x\u001b[0m7067736f6469756d\")) @map(\"key_context\")\n\u001b[1;94m | \u001b[0m\n\u001b[1;91merror\u001b[0m: \u001b[1mError validating: The character `-` is not allowed in Enum Value names.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:779\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m778 | \u001b[0m hmacsha512\n\u001b[1;94m779 | \u001b[0m \u001b[1;91maead-det\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;91merror\u001b[0m: \u001b[1mError validating: The character `-` is not allowed in Enum Value names.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:780\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m779 | \u001b[0m aead-det\n\u001b[1;94m780 | \u001b[0m \u001b[1;91maead-ietf\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;91merror\u001b[0m: \u001b[1mError parsing attribute \"@default\": Only @default(dbgenerated(\"...\")) can be used for Unsupported types.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:596\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m595 | \u001b[0m entity Unsupported(\"regclass\")\n\u001b[1;94m596 | \u001b[0m filters Unsupported(\"_user_defined_filter\")[] \u001b[1;91m@default([dbgenerated(\"'{}'::realtime.user_defined_filter[]\")])\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;91merror\u001b[0m: \u001b[1mError parsing attribute \"@default\": Expected a String value, but found `dbgenerated(\"'/'::text)\")`.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:645\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m644 | \u001b[0m metadata Json?\n\u001b[1;94m645 | \u001b[0m pathTokens String[] \u001b[1;91m@default([\"string_to_array(name\", dbgenerated(\"'/'::text)\")])\u001b[0m @map(\"path_tokens\")\n\u001b[1;94m | \u001b[0m\n\nValidation Error Count: 5"}
{"error_code":"P1012","message":"\u001b[1;91merror\u001b[0m: \u001b[1mUnknown escape sequence. If the value is a windows-style path, `\\` must be escaped as `\\\\`.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:365\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m364 | \u001b[0m keyId BigInt? @default(autoincrement()) @map(\"key_id\")\n\u001b[1;94m365 | \u001b[0m keyContext Bytes? @default(dbgenerated(\"\u001b[1;91m\\x\u001b[0m7067736f6469756d\")) @map(\"key_context\")\n\u001b[1;94m | \u001b[0m\n\u001b[1;91merror\u001b[0m: \u001b[1mError validating: The character `-` is not allowed in Enum Value names.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:779\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m778 | \u001b[0m hmacsha512\n\u001b[1;94m779 | \u001b[0m \u001b[1;91maead-det\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;91merror\u001b[0m: \u001b[1mError validating: The character `-` is not allowed in Enum Value names.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:780\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m779 | \u001b[0m aead-det\n\u001b[1;94m780 | \u001b[0m \u001b[1;91maead-ietf\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;91merror\u001b[0m: \u001b[1mError parsing attribute \"@default\": Only @default(dbgenerated(\"...\")) can be used for Unsupported types.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:596\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m595 | \u001b[0m entity Unsupported(\"regclass\")\n\u001b[1;94m596 | \u001b[0m filters Unsupported(\"_user_defined_filter\")[] \u001b[1;91m@default([dbgenerated(\"'{}'::realtime.user_defined_filter[]\")])\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;91merror\u001b[0m: \u001b[1mError parsing attribute \"@default\": Expected a String value, but found `dbgenerated(\"'/'::text)\")`.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:645\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m644 | \u001b[0m metadata Json?\n\u001b[1;94m645 | \u001b[0m pathTokens String[] \u001b[1;91m@default([\"string_to_array(name\", dbgenerated(\"'/'::text)\")])\u001b[0m @map(\"path_tokens\")\n\u001b[1;94m | \u001b[0m\n\nValidation Error Count: 5"}
I've checked for the issues the error mentions, but haven't found anything in my schema.
No description
5 Replies
Prisma AI Help
You decided to hold for human wisdom. We'll chime in soon! Meanwhile, #ask-ai is there if you need a quick second opinion.
Nurul
Nurul3w ago
Hey @Riko! Can you share with me the email id or GitHub handle with which you signed up? I would like to take a look at the logs Also, do you get any errors in the browser console?
Riko
RikoOP3w ago
Hello! Thanks for the reply. The github handle I used is arthurpolice. The error I mentioned on the main message is on the console.
Riko
RikoOP3w ago
Here are screenshots of everything going on in the console
No description
No description
No description
Nurul
Nurul3w ago
Thank you for sharing the error screenshots. I am raising this with our Studio team internally.

Did you find this page helpful?