Summary
The DuckDB UI fails to initialize when api.motherduck.com and auth.motherduck.com
are unreachable (e.g., blocked by a corporate firewall), even though the documentation
states that MotherDuck is opt-in and queries run fully locally by default.
Environment
- DuckDB version: v1.4.4 (Andium)
- OS: Ubuntu / Linux (Azure VM, corporate environment)
- Browser: Chrome
- ui.duckdb.org: accessible ✓
- api.motherduck.com: unreachable (TCP timeout on port 443) ✗
- auth.motherduck.com: unreachable (TCP timeout on port 443) ✗
Steps to reproduce
- Run
duckdb src/dev.duckdb -ui in an environment where
api.motherduck.com and auth.motherduck.com are blocked by a firewall.
- Open http://localhost:4213 in a browser.
Actual behavior
The UI shows an initialization error immediately:
Initialization Error
Please reload, if the problem persists, reach out on Slack or support@motherduck.com
Error Details: Failed to resolve app state with user - TypeError: Failed to fetch
Username: unknown
User E-mail: unknown
The error occurs because the JavaScript app makes a fetch() call to
api.motherduck.com on startup. When the request times out (~10s), the
uncaught network error crashes the initialization flow entirely.
Expected behavior
Since MotherDuck is opt-in and the UI is documented as running fully locally
by default, the app should gracefully handle the case where MotherDuck's API
is unreachable — for example, by catching the fetch error and continuing in
local-only mode instead of blocking initialization.
Suggested fix
Wrap the MotherDuck session check in a try/catch (or use Promise.race with
a short timeout), and fall back to anonymous local mode if the request fails
or times out.
Summary
The DuckDB UI fails to initialize when
api.motherduck.comandauth.motherduck.comare unreachable (e.g., blocked by a corporate firewall), even though the documentation
states that MotherDuck is opt-in and queries run fully locally by default.
Environment
Steps to reproduce
duckdb src/dev.duckdb -uiin an environment whereapi.motherduck.comandauth.motherduck.comare blocked by a firewall.Actual behavior
The UI shows an initialization error immediately:
The error occurs because the JavaScript app makes a
fetch()call toapi.motherduck.comon startup. When the request times out (~10s), theuncaught network error crashes the initialization flow entirely.
Expected behavior
Since MotherDuck is opt-in and the UI is documented as running fully locally
by default, the app should gracefully handle the case where MotherDuck's API
is unreachable — for example, by catching the fetch error and continuing in
local-only mode instead of blocking initialization.
Suggested fix
Wrap the MotherDuck session check in a try/catch (or use
Promise.racewitha short timeout), and fall back to anonymous local mode if the request fails
or times out.