Closed Bug 1768205 Opened 4 years ago Closed 3 years ago

IndexedDB.open() API fails

Categories

(Core :: Storage: IndexedDB, defect, P3)

Firefox 91
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: luufrederic, Unassigned)

Details

Steps to reproduce:

In the console execute a short code to create an IndexedDB.
Example:

var DB_NAME = 'dbName';
var DB_VERSION = 1;
var DB_STORE_NAME = 'dbStore';

var db;
try {
var req = indexedDB.open(DB_NAME, DB_VERSION);
req.onsuccess = function (evt) {
db = this.result;
console.log('success', evt.target.result);
};
req.onerror = function (evt) {
console.error("error", evt);
};
req.onblocked = function (evt) {
console.log('blocked', evt);
};
} catch (err) {
console.error(err.name, err.message);
}

Actual results:

IndexedDB cannot be created for unclear reason to me.
Below the returned error object:

error { target: IDBOpenDBRequest, isTrusted: true, srcElement: IDBOpenDBRequest, currentTarget: IDBOpenDBRequest, eventPhase: 2, bubbles: true, cancelable: true, returnValue: true, defaultPrevented: false, composed: false, … }

bubbles: true

cancelBubble: false

cancelable: true

composed: false

currentTarget: null

defaultPrevented: false

eventPhase: 0

explicitOriginalTarget: IDBOpenDBRequest { onblocked: onblocked(evt), onupgradeneeded: null, readyState: "done", … }

isTrusted: true

originalTarget: IDBOpenDBRequest { onblocked: onblocked(evt), onupgradeneeded: null, readyState: "done", … }

returnValue: true

srcElement: IDBOpenDBRequest { onblocked: onblocked(evt), onupgradeneeded: null, readyState: "done", … }

target: IDBOpenDBRequest { onblocked: onblocked(evt), onupgradeneeded: null, readyState: "done", … }

timeStamp: 1942541

type: "error"

<get isTrusted()>: function isTrusted()

<prototype>: EventPrototype { composedPath: composedPath(), stopPropagation: stopPropagation(), stopImmediatePropagation: stopImmediatePropagation(), … }
debugger eval code:13:17
onerror debugger eval code:13
(Async: EventHandlerNonNull)
<anonymous> debugger eval code:12

Expected results:

Database should be created with success.
The same code was run on:

  • Firefox 91.9.0esr (32-bit) => KO
  • Firefox 91.7.1esr (32-bit) => OK

The Bugbug bot thinks this bug should belong to the 'Core::Storage: IndexedDB' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Storage: IndexedDB
Product: Firefox → Core

I don't see the actual error message that the example code is intending to log. The most likely explanation would be that quota manager initialization is failing, in which case we would expect an UnknownError. If you browse to https://firefox-storage-test.glitch.me/ and run it, the site should be able to diagnose if QuotaManager appears to be broken and IndexedDB. In particular, the 4 checks for me return:

LocalStorage
    Good: Totally Working. (fullyOperational)
QuotaManager
    Good: Totally Working. (fullyOperational)
IndexedDB
    Good: Totally Working. (fullyOperational)
Cache API
    Good: Totally Working. (fullyOperational) 

Can you go to the site and see what it returns?

Severity: -- → S3
Flags: needinfo?(luufrederic)
Priority: -- → P3

Redirect a needinfo that is pending on an inactive user to the triage owner.
:hsingh, since the bug has recent activity, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(luufrederic) → needinfo?(hsingh)
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(hsingh)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.