- Notifications
You must be signed in to change notification settings - Fork68
Closed
Description
Hi, we are getting this error intermittently and we are having a really hard time recreating it and diagnosing what's happening. Does anyone here have an idea what's going on or have a suggestion of how we can debug it.
When the error occurs it prevents our app from initializing.
- This is being called inside a Web Worker.
- We use the Web Locks API to ensure that only an instance of this Web Worker exists.
importsqlite3InitModulefrom"@sqlite.org/sqlite-wasm";// The sqlite3 wasm module needs to be initialized by the browser before// it can be used. This must only be done once. We eagerly start this// initialization process when this module is imported.constmodulePromise=sqlite3InitModule({print:console.log,printErr:console.error,});exportasyncfunctioncreatePersistedClientDatabaseAdapter(props:{logger:Logger;/** Resets the database on init, clearing all existing data. */clearOnInit?:boolean;}){constsqlite3=awaitmodulePromise;constpoolUtil=awaitsqlite3.installOpfsSAHPoolVfs({clearOnInit:props.clearOnInit,directory:"/sqlite3",});props.logger.info({ poolUtil});constsqliteDB=newpoolUtil.OpfsSAHPoolDb(`/comms.db`);// intermittent error}
Metadata
Metadata
Assignees
Labels
No labels