我在公共环境中收到此错误日志,在大约 0.1% 的会话中非常一致。
我正在使用德克西。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;
Run Code Online (Sandbox Code Playgroud)
粗体行抛出此异常。我在 Google 搜索上没有找到任何令人满意的重现步骤或此异常的原因。如果有人有任何信息或指示,请告诉我。我不知道如何重现这个问题。提前致谢!
试图找到重现步骤但没有任何运气。根据谷歌搜索,我看到这篇文章https://jasonsavard.com/forum/discussion/4233/unknownerror-internal-error-opening-backing-store-for-indexeddb-open ,但这里提到的原因听起来都不合理在我的场景中。大多数崩溃发生在 Windows 机器上