3

I am getting this error logs in public environment, quite consistently for around 0.1% of the sessions.

I am using Dexie. https://dexie.org/

class DexieDB extends Dexie {
    cacheData!: Table<CacheData>;

    private static instance: DexieDB;
    private constructor() {
        super('DexieDB');

        const store = { ...cacheDataSchema };
        this.version(2).stores(store);
    }

    public static get Instance(): DexieDB {
        if (!this.instance) {
            this.instance = new this();

            // Open the database
**          this.instance.open().catch((e) => {**
                logOpenDBFailed(e);
            });
        }

        return this.instance;
    }
}

export const dexieDB = DexieDB.Instance;

The line in bold is throwing this exception. I dont find any satisfactory repro steps or reasons of this exception on Google search. If anyone has any info or pointers please let me know. I dont know how to reproduce this issue. Thanks in advance!

Trying to find the repro steps but without any luck. As per google search, I saw this post https://jasonsavard.com/forum/discussion/4233/unknownerror-internal-error-opening-backing-store-for-indexeddb-open but none of the reasons mentioned here are sounding plausible in my scenario. most of the crashes are on windows machine

Anurag
  • 56
  • 1
  • 6
  • Is this by any chance happening mostly on iOS devices with versions 14.5 or later? Total guess but maybe this involves Apple ITP. – Josh Oct 27 '22 at 16:06

2 Answers2

1

The call to Dexie open() will fail when running Firefox in private mode because it does not support indexedDB in private mode. All other browsers except support IndexedDB in their private modes and treats the data as temporary for the private session only. Could this be the reason?

David Fahlander
  • 5,058
  • 1
  • 20
  • 19
0

Happened to me in chrome (on Mac). Force quit to chrome or restart the Mac solved to problem

Nati Kamusher
  • 533
  • 5
  • 9