question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InvalidStateError: A mutation operation was attempted on a database that did not allow mutations.

See original GitHub issue

Hi, I am struggling with an error trying to create the database It works only on Chrome, Firefox gives the error: InvalidStateError: A mutation operation was attempted on a database that did not allow mutations. MS Edge does not work at all.

My code is something like this:

STORE = "storeName";
VERSION = 1;

  dbPromise = openDb("dbName", this.VERSION, upgradeDB =>
      upgradeDB
        .createObjectStore(this.STORE, { keyPath: "name" })
        .createIndex("name", "name", { unique: true })
    );

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
nico-martincommented, May 17, 2019

Unfortunately this is not solved yet. I think the problem is that FF in private mode does not support IndexedDB at all. Is there a way to create a workaround or to detect that IndexedDB is no available? https://bugzilla.mozilla.org/show_bug.cgi?id=781982

0reactions
codinronancommented, May 8, 2020

@jakearchibald sorry you’re right, I didn’t read enough code. The catch on this line catches the sub-promise, not the outer one. The exception will escape as intended.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firefox: OpenError: A mutation operation was attempted on a ...
Firefox: OpenError: A mutation operation was attempted on a database that did not allow mutations. #1388.
Read more >
A mutation operation was attempted on a database that did ...
InvalidStateError: A mutation operation was attempted on a database that did not allow mutations.
Read more >
Error "A mutation operation was attempted on a database that ...
Error "A mutation operation was attempted on a database that did not allow mutations." when retrieving data in indexedDB · Ask Question. Asked ......
Read more >
I get a "A mutation operation was attempted on ... - Hacker News
I get a "A mutation operation was attempted on a database that did not allow mutations." when I try to start any match....
Read more >
Error: A mutation operation was attempted on a database that ...
Error: A mutation operation was attempted on a database that did not allow mutations. ... This means you are using an adblocker, Brave...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found