reyesoft / ngx-jsonapi

JSON API client library for Angular 5+ 👌 :: Production Ready 🚀
https://ngx-jsonapi.reyesoft.com/
MIT License
101 stars 52 forks source link

InvalidStateError: A mutation operation was attempted on a database that did not allow mutations. (Firefox Private mode) #275

Open DaanVanVugt opened 4 years ago

DaanVanVugt commented 4 years ago

We're hit with the following issue occurring in private mode firefox:

ERROR Error: "Uncaught (in promise): InvalidStateError: A mutation operation was attempted on a database that did not allow 
mutations.
InvalidStateError: A mutation operation was attempted on a database that did not allow mutations. 
From previous: 
Dexie/this.open@http://localhost:8100/vendor.js:120502:45
saveElements/<@http://localhost:8100/vendor.js:237256:41
./node_modules/ngx-jsonapi/__ivy_ngcc__/ngx-jsonapi/@ngx-jsonapi/ngx-jsonapi.js/__awaiter$2</<@http://localhost:8100/vendor.js:237163:71
ZoneAwarePromise@http://localhost:8100/polyfills.js:4066:33
./node_modules/ngx-jsonapi/__ivy_ngcc__/ngx-jsonapi/@ngx-jsonapi/ngx-jsonapi.js/__awaiter$2<@http://localhost:8100/vendor.js:237159:12
saveElements@http://localhost:8100/vendor.js:237248:16
saveCollection@http://localhost:8100/vendor.js:237394:27
getAllFromServer/<@http://localhost:8100/vendor.js:238829:25
__tryOrUnsub@http://localhost:8100/vendor.js:240671:16
next@http://localhost:8100/vendor.js:240610:22
_next@http://localhost:8100/vendor.js:240560:26
next@http://localhost:8100/vendor.js:240537:18
_next@http://localhost:8100/vendor.js:240560:26
next@http://localhost:8100/vendor.js:240537:18
_next@http://localhost:8100/vendor.js:247416:26
next@http://localhost:8100/vendor.js:240537:18
_next@http://localhost:8100/vendor.js:240560:26
next@http://localhost:8100/vendor.js:240537:18
next@http://localhost:8100/vendor.js:240323:25
_next@http://localhost:8100/vendor.js:240560:26
next@http://localhost:8100/vendor.js:240537:18
_next@http://localhost:8100/vendor.js:247416:26
next@http://localhost:8100/vendor.js:240537:18
_next@http://localhost:8100/vendor.js:245038:26
next@http://localhost:8100/vendor.js:240537:18
_next@http://localhost:8100/vendor.js:244551:30
next@http://localhost:8100/vendor.js:240537:18
notifyNext@http://localhost:8100/vendor.js:245277:26
_next@http://localhost:8100/vendor.js:239832:21
next@http://localhost:8100/vendor.js:240537:18
onLoad@http://localhost:8100/vendor.js:9036:30
invokeTask@http://localhost:8100/polyfills.js:3505:35
onInvokeTask@http://localhost:8100/vendor.js:75756:33
invokeTask@http://localhost:8100/polyfills.js:3504:40
runTask@http://localhost:8100/polyfills.js:3273:51
invokeTask@http://localhost:8100/polyfills.js:3586:38
invokeTask@http://localhost:8100/polyfills.js:4727:18
globalZoneAwareCallback@http://localhost:8100/polyfills.js:4764:35

This seems related to https://bugzilla.mozilla.org/show_bug.cgi?id=781982 and https://bugzilla.mozilla.org/show_bug.cgi?id=1639542 (found through https://github.com/ipfs/js-ipfs/issues/1388 and https://github.com/jakearchibald/idb/issues/81)

shivarajnaidu commented 3 years ago

Any workaround or temporary fix to handle this gracefully in firefox private mode ?