RESOLVED CONFIGURATION CHANGED 252138
Sqlite wasm opfs support
https://bugs.webkit.org/show_bug.cgi?id=252138
Summary Sqlite wasm opfs support
Philip Wedemann
Reported 2023-02-12 12:54:58 PST
I tried to use Sqlite WASM with OPFS as described in https://developer.chrome.com/blog/sqlite-wasm-in-the-browser-backed-by-the-origin-private-file-system/. The release version of Safari 16.3 (18614.4.6.1.5) does not support nested webworkers (https://bugs.webkit.org/show_bug.cgi?id=22723), so I used 163 (Safari 16.4, WebKit 18615.1.18.100.1). Expected: A working persistence sqlite database using opfs, actually the same results like in Chrome (109.0.5414.119 (arm64)) ``` Loading and initializing sqlite3 module... Done initializing. Running demo... sqlite3 version 3.40.0 2022-10-25 16:04:44 ff4fc29c38b78dfd471e25942304cba352469d6018f1c09158172795dbdd438c The OPFS is available. transient db = /mydb.sqlite3 Create a table... Insert some data using exec()... Query data with exec() using rowMode 'array'... row 1 = 20 row 2 = 21 row 3 = 22 ``` Actual behaviour: 16.3 (18614.4.6.1.5): ``` Loading and initializing sqlite3 module... Done initializing. Running demo... sqlite3 version 3.40.0 2022-10-25 16:04:44 ff4fc29c38b78dfd471e25942304cba352469d6018f1c09158172795dbdd438c The OPFS is not available. transient db = /mydb.sqlite3 Create a table... Insert some data using exec()... Query data with exec() using rowMode 'array'... row 1 = 20 row 2 = 21 row 3 = 22 ``` 163 (Safari 16.4, WebKit 18615.1.18.100.1): ``` Loading and initializing sqlite3 module... ``` While 16.3 release does not support opfs, it is using the kvvs fallback. With the latest preview, opfs is supported, but there are no results/errors at all. To reproduce: Open https://sqlite-wasm-opfs.glitch.me I did open the issue in webkit and not in sqlite, because it works with chrome.
Attachments
Radar WebKit Bug Importer
Comment 1 2023-02-19 12:55:18 PST
Philip Wedemann
Comment 2 2023-07-13 04:21:53 PDT
With Version 17.0 (19616.1.20.11.3) I get this message: ``` Loading and initializing sqlite3 module... Done initializing. Running demo... sqlite3 version 3.40.0 2022-10-25 16:04:44 ff4fc29c38b78dfd471e25942304cba352469d6018f1c09158172795dbdd438c The OPFS is available. transient db = /mydb.sqlite3 Create a table... Insert some data using exec()... Query data with exec() using rowMode 'array'... row 1 = 20 row 2 = 20 row 3 = 20 ``` So OPFS is available.
Sihui Liu
Comment 3 2023-08-28 15:42:06 PDT
This issue is fixed based on my local testing in latest Safari, so I am going to close it. Please file a new bug if you still see issue related to sqlite wasm.
Note You need to log in before you can comment on or make changes to this bug.