learningequality / learningequality/studio

Deleting IndexedDB can result in inability to connect to the database until you restart Chrome

Open
#2,094 3 comments 0 reactions 1 assignee View on GitHub

@rtibbles is already working on this.

Since Aug 17, 2020.

DEV: frontend TAG: tech update / debt
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

Summary

Wiping out the IndexedDB can lead to this error happening whenever it is then accessed, even after a page refresh:
Uncaught (in promise) Error: InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.

This seems to be an issue in Chrome specifically, and is widely reported on many libraries using IndexedDB:
tutao/tutanota#452
localForage/localForage#581
localForage/localForage#694
https://github.com/firebase/firebase-js-sdk/issues/1926
https://github.com/pouchdb/pouchdb/issues/3415
https://github.com/jensarps/IDBWrapper/issues/80

And twice in Dexie.js:
https://github.com/dfahlander/Dexie.js/issues/613
https://github.com/dfahlander/Dexie.js/issues/934

Category

BUG

Usage Details

This seems to be somewhat difficult to reproduce, but once it does, the only way to get rid of it is to restart Chrome.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.