quasarframework/quasar · warning
Failed to open default browser
Error message
Failed to open default browser
What it means
The quasar serve command logs the served URL and tries to open it in the default browser with the `open` package. If the OS-level browser launch fails (no browser, headless server, unsupported desktop environment), the promise rejects and this warning is printed. The dev server keeps running; only the auto-open fails.
Source
Thrown at cli/lib/cmd/serve.js:317
console.log('\n' + info.join('\n') + '\n')
if (
argv.open &&
process.stdout.isTTY &&
process.env.NODE_ENV !== 'test' &&
(await import('ci-info').then(({ isCI }) => !isCI))
) {
const url = getListeningUrl(
argv.hostname === '0.0.0.0' ? 'localhost' : argv.hostname
)
log('Opening default browser at ' + url + '\n')
const { default: open } = await import('open')
// oxlint-disable-next-line unicorn/prefer-top-level-await
open(url).catch(() => {
warn('Failed to open default browser')
warn()
})
}
View on GitHub (pinned to 4841521b5f)
Solutions
- Ignore the warning and open the printed URL manually in any browser.
- Disable auto-open if the flag/option is available, or run with a GUI session.
- Install/register a default browser (e.g. xdg-utils on Linux: xdg-settings set default-web-browser ...).
Defensive patterns
Strategy: fallback
Validate before calling
// On headless/CI machines, detect absence of a display/browser before serving:
if (!process.env.DISPLAY && process.platform === 'linux') console.log('Headless: open the URL manually'); Try / catch
// The library already catches; in your own code:
open(url).catch(() => console.log(`Open manually: ${url}`)); Prevention
- On headless servers, don't rely on auto-open; copy the printed URL.
- Ensure a default browser is registered on desktop Linux (xdg-settings).
- In CI, treat this warning as informational noise, not a failure.
When it happens
Trigger: Running `quasar serve` (or the openBrowser path) in an environment with no default browser or no GUI (SSH/headless/CI), where `open(url)` rejects.
Common situations: Serving on a remote headless machine; WSL without browser integration; containers/CI; desktop environment without a registered xdg-open handler.
Related errors
AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30).
Data as JSON: /api/errors/b52999fdfaaf3a7d.
Report an issue: GitHub.