InvalidStateError: A mutation operation was attempted on a database that did not allow mutations.
See original GitHub issueHi, 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:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
@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!