Closed bearjaws closed 4 months ago
I recently migrated my usage of sqlite-wasm from a localhost project to a https hosted domain...
My guess is that you are not emitting the COOP/COEP headers from your remote server. Without those, the OPFS VFS will not be available because it requires the SharedArrayBuffer class (which is only available if the COOP/COEP headers are emitted):
https://sqlite.org/wasm/doc/trunk/persistence.md#coop-coep
Additionally, I ran this test to see if OPFS was supported:
That particular VFS requires more than OPFS. See the above-linked page for a separate OPFS VFS which does not have the same requirements, but also has other trade-offs.
Closing ticket, as this is a config-related error, not a library-level bug.
Hey all,
I recently migrated my usage of sqlite-wasm from a localhost project to a https hosted domain and it no longer seems to be working. This is using a web worker, Running SQLite3 version 3.46.0
I tried in both Chrome + Firefox and both are broken the same way.
Here is some sample code where I initialize the connection
It errors on the openResource promise.
Additionally, I ran this test to see if OPFS was supported:
Giving me "OPFS is supported".
I tried clearing cache but localhost still seems to work, but no other domain does.
Any help appreciated!