SQLite Forum

WASM: OPFS sahpool init failure doesn't throw
Login

WASM: OPFS sahpool init failure doesn't throw

(1) By franztesca on 2024-04-04 11:33:22 [source]

Hello, In our production code we are using the Sqlite/WASM with OPFS-sahpool VFS. We use the VFS utility OpfsSAHPoolUtil.getFileNames However we are getting

sahPoolUtil.getFileNames is not a function

By looking at the code, I maybe have spotted the bug: when the VFS initialization fails, the error is caught and returned, instead of being rethrown, which probably ends up assigning the error to our sahPoolUtil field and causing the is not a function error.

These are the involved lines.

(2) By Stephan Beal (stephan) on 2024-04-04 12:37:51 in reply to 1 [link] [source]

By looking at the code, I maybe have spotted the bug:

Indeed. That's now fixed in the trunk and the 3.45 branch. Thank you for the report and localizing the problem.