Closed viniciuscr closed 5 years ago
Ok i got the problem with Firefox. I was using Firefox with anonymous tab and it don´t let you store anything, but Edge still a issue.
Please reopen if you get the same issue with 4.0.0
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
I know this is an old issue but I'm building a layer for an app I'm working on and I want to be able to provide a fallback in-memory database on browsers that block IDB in private browsing (Firefox).
The problem is that Firefox exposes the indexedDb
object on window
but you can't use it, so simply using if (!window.indexedDb)
is not an option -- the only way to know is to attempt a database open operation.
However unfortunately since IDB's openDb
function swallows the exception, it's not possible -- I need a completely separate check against a different database name in order to validate support.
Any way we could allow that exception through, or include a supported
helper?
What do you mean by "swallows the error"? That error should carry through as a promise rejection.
@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!
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: