"Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing." – what?

Wiping the dynamic import cache on the client’s device seems to be the solution. With react-loadable there is this “loading” component that also get an error property. Normally a component should be rendered that informs the user that something went wrong and offer a button to retry. It is quite questionable if a retry can solve a situation when the cache becomes corrupt. Adding a [ RESTART APPLICATION ] button seems like a good idea. The deletion of the cache requires as much as this:

window.indexedDB.deleteDatabase("MeteorDynamicImportCache");
window.location.reload();

The mere invoking deleteDatabase() is not enough, the app needs to be reloaded, or the tab or window closed, for the browser to actually execute the deletion. But I guess this is ok as a last resort, as long as the decision is made by the user. That’s still pretty bad, all transient data will be lost in the app, but there is at least a chance to resume using it, after all.

P.S. indexedDB’s API is sheer horror.