Error appears when using `dropInstance` on logout of application (MacOS Chrome, defaults to IndexedDB)
Hi, I'm using a localForage instance with axios-cache-adapter, and trying to delete the localForage database on logout of my application. The function I'm using on logout to clear the localForage store is:
export const dropLocalForageCache = async function() {
await localforage.ready();
await localforage.dropInstance({
name: FORAGE_STORE_NAME,
});
};Even though the IndexedDB database is being dropped, I'm seeing an error appearing in the console:
Uncaught DOMException: Failed to read the 'result' property from 'IDBRequest': The request has not finished. at IDBOpenDBRequest.req.onerror.req.onblocked
Tracking down the stack trace looks like this is coming from https://github.com/localForage/localForage/blob/c1cc34fda0343c5e19224fc99c452dbe611c1736/dist/localforage.js#L1326-L1335
Any chance you can help me figure out how to fix this? I did initially think that by adding "localforage.ready" I might mitigate any lingering cache actions that could be happening on the database, but it doesn't seem to have helped. Thanks!
Potentially related to https://github.com/localForage/localForage/issues/800 too?
Source: localForage/localForage