打开indexedDB.open的后备存储时发生内部错误



我在公共环境中得到了这个错误日志,大约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;

粗体的行引发了此异常。我在谷歌搜索中找不到任何令人满意的重复步骤或这个例外的原因。如果有人有任何信息或建议,请告诉我。我不知道如何重现这个问题。提前感谢!

试图找到修复步骤,但没有任何运气。根据谷歌搜索,我看到了这篇帖子https://jasonsavard.com/forum/discussion/4233/unknownerror-internal-error-opening-backing-store-for-indexeddb-open但在我看来,这里提到的任何一个理由听起来都不合理。大多数崩溃都发生在windows机器上

在专用模式下运行Firefox时,对Dexie-open((的调用将失败,因为它在专用模式中不支持indexedDB。除此之外的所有其他浏览器都在其专用模式下支持IndexedDB,并将数据视为仅用于专用会话的临时数据。这可能是原因吗?

在chrome(Mac上(中发生过。强制退出铬或重新启动Mac解决问题

相关内容

最新更新