-
Notifications
You must be signed in to change notification settings - Fork 177
Description
What happens?
I deploy duckdb-wasm in my VMWare( Host only ). the json extension is default to load from https://extensions.duckdb.org
I want to load from localhost, and checked the document: https://duckdb.org/docs/stable/clients/wasm/extensions#serving-extensions-from-a-third-party-repository
I place this query:
await conn.query("SET custom_extension_repository = localhost" );But that didn't work compare to the default settings: No XMLHttpRequest Send.
The debug shows query is to the 'localhost/v1.3.2/wasm_eh/json.duckdb_extension.wasm' and throws Exception: SyntaxError: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL
and I try the following querys, but It didn't support:
await conn.query("SET custom_extension_repository = http://localhost" );Error: Parser Error: syntax error at or near ":"
LINE 1: SET custom_extension_repository = http://localhost
^
at ha.runQuery (duckdb-browser-eh.worker.ts:33:16)
at xo.onMessage (duckdb-browser-eh.worker.ts:33:16)
at globalThis.onmessage (duckdb-browser-eh.worker.ts:33:16)
await conn.query("SET custom_extension_repository = localhost:8080" );Error: Parser Error: syntax error at or near ":"
LINE 1: SET custom_extension_repository = localhost:8080
^
at ha.runQuery (duckdb-browser-eh.worker.ts:33:16)
at xo.onMessage (duckdb-browser-eh.worker.ts:33:16)
at globalThis.onmessage (duckdb-browser-eh.worker.ts:33:16)
Until I tried to place them into quote string:
await conn.query("SET custom_extension_repository = 'http://localhost:8080/path/to/extension'" );So i think the following document should be more detail OR fix the custom_extension_repository for DOMAIN String: https://duckdb.org/docs/stable/clients/wasm/extensions#serving-extensions-from-a-third-party-repository
To Reproduce
await conn.query("SET custom_extension_repository = localhost" ); -> fail
await conn.query("SET custom_extension_repository = example.org.cn" ); -> fail
Browser/Environment:
Browser
Device:
Windows 10
DuckDB-Wasm Version:
Any Version
DuckDB-Wasm Deployment:
Full Name:
whj
Affiliation:
CTFer.org