“Failed to open indexedDB” error in Firefox when trying to g

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Post Reply
johncogan
Posts: 1
Joined: February 20th, 2019, 9:27 am

“Failed to open indexedDB” error in Firefox when trying to g

Post by johncogan »

I've build a simple system that allows a person to add a note for a webpage. This works flawlessly for Chrome (Version 72.0.3626.109) but when in Firefox (Version 65.0.1) it is giving me an error in the developer console.

Code: Select all

    error: true
    ​message: "unknown"
    ​name: "indexed_db_went_bad"
    ​reason: "Failed to open indexedDB, are you in private browsing mode?"
    ​stack: ""
    ​status: 500
    ​<prototype>: {…}
Debugging this in the Firefox dev console the error is thrown when attempting the `get` call in this javascript function:

Code: Select all

   function pouchDbGetNote() {
            notesDb.get(notesData.noteDbEntryId)
                .then(function (response) {
                    returnNoteData(response);
                }).catch(function (err) {
                    console.log(err);
            });
        }
Please note that when the page is loaded, just prior to the `

Code: Select all

pouchDbGetNote()
` function is called I load the DB via the following:

Code: Select all

  // Create/get database
        try {
            notesDb = new PouchDB(notesData.db_name);
        } catch (e) {
            console.log(e);
        }
    
        pouchDbGetNote();
I've dug around in google and have found no real solution other than suggestions that its fixed with a Firefox upgrade and hints that this used to affect IE/Edge also.

The call above is held within a `

Code: Select all

jQuery(document).ready(function () {
` block.
User avatar
smsmith
Moderator
Posts: 19979
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Re: “Failed to open indexedDB” error in Firefox when trying

Post by smsmith »

This will be better in our Web Development forum, so I am moving it there.
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
User avatar
jscher2000
Posts: 11742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: “Failed to open indexedDB” error in Firefox when trying

Post by jscher2000 »

What about the question posed in the first quoted section:

​reason: "Failed to open indexedDB, are you in private browsing mode?"
Post Reply