我在公共环境中得到了这个错误日志,大约0.1%的会话都是如此。
我正在使用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;
粗体行抛出此异常。我在Google搜索中找不到任何令人满意的重现步骤或此异常的原因。如果有人有任何信息或指针,请让我知道。我不知道如何重现此问题。提前感谢!
试图找到repro的步骤,但没有任何运气。根据谷歌搜索,我看到了这篇文章https://jasonsavard.com/forum/discussion/4233/unknownerror-internal-error-opening-backing-store-for-indexeddb-open,但没有一个原因在这里提到的听起来似乎在我的情况下。大多数崩溃是在windows机器上
1条答案
按热度按时间dxpyg8gm1#
在私有模式下运行Firefox时,对Dexie open()的调用将失败,因为它在私有模式下不支持indexedDB。除之外的所有其他浏览器在私有模式下都支持IndexedDB,并将数据视为仅用于私有会话的临时数据。这是否是原因?