prisma / studio

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

Random crashes on Firefox when switching databases #351

Closed pantharshit00 closed 4 years ago

pantharshit00 commented 4 years ago

Studio crashes sometimes when I switch schemas in firefox. It works after I clear indexeddb multiple times.

  1. Prisma2 version (prisma2 -v): prisma2@2.0.0-alpha.810, binary version: da777113717fdeb88c9ed94e41d69a35dae32968
  2. Logs from Developer Tools Console, if any:
    
    Websocket not open. Queueing this event: {"action":"get","data":{}} serverBus.js:1:3461
    This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. studioBundle.js:29:179235
    Studio version 0.198.0 studioBundle.js:73:365890
    Socket connection established studioBundle.js:73:365890
    Replaying queued events studioBundle.js:73:365890
    Error in PersistenceStore.queuedOperation DOMException: "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." studioBundle.js:73:365890
    Error in PersistenceStore.queuedOperation DOMException: "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." studioBundle.js:73:365890
    Error in PersistenceStore.queuedOperation DOMException: "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." studioBundle.js:73:365890
    Error in PersistenceStore.queuedOperation DOMException: "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." studioBundle.js:73:365890
    Error in PersistenceStore.queuedOperation DOMException: "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." studioBundle.js:73:365890
    Error in PersistenceStore.queuedOperation DOMException: "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." studioBundle.js:73:365890
    Error in PersistenceStore.queuedOperation DOMException: "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." studioBundle.js:73:365890
    NotFoundError: The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened. 7 studioBundle.js:87
    Error during PersistenceItem.create DOMException: "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." fields studioBundle.js:73:365890
    Error during PersistenceItem.create DOMException: "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." fields studioBundle.js:73:365890
    Error during PersistenceItem.create DOMException: "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." models studioBundle.js:73:365890
    Error during PersistenceItem.create DOMException: "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." scripts studioBundle.js:73:365890
    Project load failed:  DOMException: "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." studioBundle.js:73:365890
    Source map error: Error: request failed with status 404
    Resource URL: http://localhost:5555/studioBundle.7d8aebe69ba745cdadc1.css
    Source Map URL: studioBundle.7d8aebe69ba745cdadc1.css.map

Source map error: Error: request failed with status 404 Resource URL: http://localhost:5555/studioBundle.js Source Map URL: studioBundle.js.map

Source map error: Error: request failed with status 404 Resource URL: http://localhost:5555/serverBus.js Source Map URL: serverBus.js.map


3. Does the issue persist even after updating to the latest `prisma2` alpha (`npm i -g prisma2@alpha`)?

Yep

4. Prisma2 schema (if relevant):

/// The underlying table does not contain a unique identifier and can therefore currently not be handled. // model cites { // cited_paper_id String? // citing_paper_id String?

// @@index([cited_paper_id], name: "cited_paper_id") // @@index([citing_paper_id], name: "citing_paper_id") // }

/// The underlying table does not contain a unique identifier and can therefore currently not be handled. // model content { // class_label String? // word_cited_id String? // paper_id paper?

// @@index([paper_id], name: "paper_id") // }

model paper { class_label String? paper_id String @id }



But is happens when you switch schemas
sdnts commented 4 years ago

Thanks for this, @pantharshit00!

sdnts commented 4 years ago

@pantharshit00 I've pushed out alpha. that I think addresses the underlying issue of IndexedDB not being cleared properly in Firefox. I'm unable to make Firefox crash this way now, at least. Let me know if you still see this!