I'm using Dexie to store data in my frontend project,in a fortuitous situation?I found that the open function neither succeed nor failed.
const v = this.DBInstance.version(version)
.stores(tables)
.upgrade(trans => {
console.log('???????:', trans);
// ????????
});
console.log('!!!!!!!!!', v);
this.DBInstance.open()
.then(res => {
this.status = 'fullfilled';
console.log('db open succeed!'); // won't be output in the console
})
.catch(err => {
this.status = 'rejected';
console.log('db open failed!'); // won't be output in the console
console.error(err.stack || err);
});
I open the chorme console's 'application' tab.there is nothing in the 'indexedDB' panel,including my database.so i guess maybe there are some problem happend in chrome.but I don't know how it came about?and i wonder why the promise which the open method returns will never fullfilled or rejected.
what's more, when i calling the serch method like this:
queryAllFreshData = database
.table('RESOURCE_FRESH')
.where('projectId')
.equals(projectId)
.toArray();
queryAllFreshData.then(res=>{
// do sth
}).catch(err=>{
console.log(err)
})
it's also won't fullfilled or rejected