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

Fatal error: `Unable to init PersistenceStore undefined` #900

Open mikenikles opened 2 years ago

mikenikles commented 2 years ago
  1. Prisma version (prisma -v or npx prisma -v):

    prisma                  : 3.11.1
    @prisma/client          : 3.9.2
    Current platform        : debian-openssl-1.1.x
    Query Engine (Node-API) : libquery-engine 1a2506facaf1a4727b7c26850735e88ec779dee9 (at ../../node_modules/.pnpm/@prisma+engines@3.11.1-1.1a2506facaf1a4727b7c26850735e88ec779dee9/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
    Migration Engine        : migration-engine-cli 1a2506facaf1a4727b7c26850735e88ec779dee9 (at ../../node_modules/.pnpm/@prisma+engines@3.11.1-1.1a2506facaf1a4727b7c26850735e88ec779dee9/node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
    Introspection Engine    : introspection-core 1a2506facaf1a4727b7c26850735e88ec779dee9 (at ../../node_modules/.pnpm/@prisma+engines@3.11.1-1.1a2506facaf1a4727b7c26850735e88ec779dee9/node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
    Format Binary           : prisma-fmt 1a2506facaf1a4727b7c26850735e88ec779dee9 (at ../../node_modules/.pnpm/@prisma+engines@3.11.1-1.1a2506facaf1a4727b7c26850735e88ec779dee9/node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
    Default Engines Hash    : 1a2506facaf1a4727b7c26850735e88ec779dee9
    Studio                  : 0.458.0
  2. Logs from Developer Tools Console or Command line, if any:

    Screenshot
  3. Does the issue persist even after updating to the latest prisma CLI dev version? (npm i -D prisma@dev) Yes

  4. Prisma schema (if relevant): N/A

Additional notes

This started to happen to me as of today with Brave V1.37.109 (Mar 30, 2022).

Their changelog mentions an upgrade to Chromium 100.0.4896.60 (changelog).

The only reference to "indexed db" I found is a commit that reverts https://chromium-review.googlesource.com/c/chromium/src/+/3271759/.

Also worth mentioning, Studio works with Firefox.

janpio commented 2 years ago

Thanks for the report. Let's see if someone else has the same problem with Chrome(ium) 100.

kleydon commented 2 years ago

Consistently running into "Unable to init PersistenceStore" error (presented by dialog, in Studio), in Firefox.

mikenikles commented 2 years ago

This is no longer an issue for me with Chromium 101.0.4951.64. Given others reported the same issue with Firefox, I'm going to keep the issue open.

athammer commented 2 years ago

Can confirm having this issue with Chrome: 106.0.5249.61 however not getting this on Brave: Version 1.44.108 Chromium: 106.0.5249.103 or on Edge: Version 106.0.1370.37. Weird maybe something chrome specific?

It works on Incognito on Chrome for me. I tried to see if it was any extensions but didn't seem to be.

kleydon commented 1 year ago

Still an issue on FireFox (107.0.1)

kleydon commented 1 year ago

Additional context, from browser log on FireFox:

[PersistenceStore.init] Unable to init PersistenceStore undefined [index.js:1:1750](https://server-dev-jf52kv5fsq-uw.a.run.app/admin/prisma/assets/index.js)
DOMException: A mutation operation was attempted on a database that did not allow mutations. [index.js:1:1781](https://server-dev-jf52kv5fsq-uw.a.run.app/admin/prisma/assets/index.js)
Object { path: "PersistenceStore.init", code: undefined, type: undefined, message: "Unable to init PersistenceStore", stack: undefined, context: null, nativeError: DOMException }
[index.js:1:84080](https://server-dev-jf52kv5fsq-uw.a.run.app/admin/prisma/assets/index.js)
[BootstrapStore.init] Studio bootstrap failed 
Object { message: "Unable to init PersistenceStore", stack: undefined }
[index.js:1:1750](https://server-dev-jf52kv5fsq-uw.a.run.app/admin/prisma/assets/index.js)
Object { path: "PersistenceStore.init", code: undefined, type: undefined, message: "Unable to init PersistenceStore", stack: undefined, context: null, nativeError: DOMException }
[index.js:1:1781](https://server-dev-jf52kv5fsq-uw.a.run.app/admin/prisma/assets/index.js)
Uncaught (in promise) 
Object { path: "BootstrapStore.init", code: undefined, type: undefined, message: "Studio bootstrap failed", stack: undefined, context: {…}, nativeError: {…} }
batmar125 commented 1 year ago

Yep! Same error on firefox. Using Cloudflare as a auth gateway for my database to keep it public. Y´all have a nice day!

dchiasson commented 1 year ago

I saw this same issue on Chrome (111.0.5563.65). The issue did not occur in incognito mode or using any other browser. This happened right after I made a significant database migration, so I assume it was related to some state stored in the browser. I cleared all browser cache and cookies then restarted my browser to fix it.

carolbenichio commented 1 year ago

I had the same problem with Chrome. Works fine on Mozila.

cloudbring commented 1 year ago

I'm seeing the error on Chrome (versions / platform below). Oddly, Prisma Studio works in Incognito Mode

Platform Version
Chrome Version 112.0.5615.137 (Official Build) (arm64)
MacOS 13.3.1 (22E261)
hazlema commented 1 year ago

I'm getting this error with Brave even with all plugins disabled and shields down. However, It works using Google Chrome for me.

Work around that works for me:

Add to the package.json launchers "studio": "npx prisma studio --browser /usr/bin/google-chrome-stable"

hazlema commented 1 year ago

I figured this out.. You need to allow ALL cookies from localhost and 127.0.0.1. For some reason just lowering the shields does not work image