duckdb-wasm
duckdb-wasm copied to clipboard
Extension load fails in COI mode
What happens?
I'm trying to use the coi mode to enable multiple threads. While initialization and basic queries work, I'm seeing errors when attempting to ingest a Parquet file due to a failure of extension loading. The error does not occur in other modes (eh is fine).
I realize coi mode is still experimental, but it would be great to take advantage of parallelism and still have access to the core extensions.
To Reproduce
- Configure server to provide COI headers.
headers: { 'Cross-Origin-Embedder-Policy': 'require-corp', 'Cross-Origin-Opener-Policy': 'same-origin', } - Load DuckDB-WASM using
coibundle. - Initialize an AsyncDuckDB instance, create a new connection
conn. - Issue the following query:
conn.query(`CREATE TABLE flights AS SELECT * FROM 'https://idl.uw.edu/mosaic-datasets/data/flights-10m.parquet'`)
The query triggers automatic loading of the parquet extension, which fails with the following errors.
In Chrome:
Error: Extension Autoloading Error: An error occurred while trying to automatically install the required extension 'parquet':
Extension "https://extensions.duckdb.org/v1.3.0/wasm_threads/parquet.duckdb_extension.wasm" could not be loaded: Could not load dynamic lib: parquet
LinkError: WebAssembly.Instance(): Import #4582 "env" "memory": mismatch in shared state of memory, declared = 0, imported = 1
at AsyncDuckDB.onMessage (async_bindings.ts:160:23)
In Firefox:
Error: Extension Autoloading Error: An error occurred while trying to automatically install the required extension 'parquet':
Extension "https://extensions.duckdb.org/v1.3.0/wasm_threads/parquet.duckdb_extension.wasm" could not be loaded: Could not load dynamic lib: parquet
LinkError: imported shared memory but unshared required
Browser/Environment:
Chrome 136.0, Firefox 136.0.2
Device:
MacBook
DuckDB-Wasm Version:
1.29.1-dev207.0; 1.29.0
DuckDB-Wasm Deployment:
coi mode in browser
Full Name:
Jeffrey Heer
Affiliation:
University of Washington