Bug
connection_factory_web.dart:41 loads the WASM binary with a relative URI:
_sqlite3 ??= await WasmSqlite3.loadFromUrl(Uri.parse('sqlite3.wasm'));
When using usePathUrlStrategy() (routing config url_strategy: path), the browser resolves this relative to the current page path. For example, navigating to /projects/abc/chats/ causes the request:
GET /projects/abc/chats/sqlite3.wasm → 404
Instead of the correct:
Fix
Use an absolute path:
_sqlite3 ??= await WasmSqlite3.loadFromUrl(Uri.parse('/sqlite3.wasm'));
File
lib/src/database/connectors/connection_factory_web.dart:41
Bug
connection_factory_web.dart:41loads the WASM binary with a relative URI:When using
usePathUrlStrategy()(routing configurl_strategy: path), the browser resolves this relative to the current page path. For example, navigating to/projects/abc/chats/causes the request:Instead of the correct:
Fix
Use an absolute path:
File
lib/src/database/connectors/connection_factory_web.dart:41