quasarframework/quasar · warning
Failed to open default browser
Error message
Failed to open default browser
What it means
openBrowser's openDefault calls the `open` npm package to launch the OS default browser at the dev-server URL. The rejection is only logged (console.error) and announced with this warning — it is non-fatal, so the dev server keeps running. It means the OS-level browser launch failed, not that the URL is wrong.
Source
Thrown at app-vite/lib/utils/open-browser.js:13
import open from 'open'
import { log, warn } from './logger.js'
export function openBrowser({ url, opts, wait = true }) {
const openDefault = () => {
log('Opening default browser at ' + url + '\n')
open(url, {
wait
}).catch(err => {
console.error(err)
warn('Failed to open default browser')
warn()
})
}
if (opts) {
log('Opening browser at ' + url + ' with options: ' + JSON.stringify(opts))
log()
open(url, {
...opts,
wait
}).catch(err => {
console.error(err)
warn('Failed to open specific browser')
warn()
openDefault()
})
} else {
openDefault()View on GitHub (pinned to 4841521b5f)
Solutions
- Read the console.error output under the warning — it names the OS-level cause (e.g. xdg-open not found)
- Install a browser / xdg-utils on Linux (`sudo apt install xdg-utils` or a browser package)
- Disable auto-open in headless environments: set `devServer.open: false` in quasar.config or omit the --open flag
- Open the printed URL manually in any browser on your network-accessible machine
Example fix
// before (quasar.config.js) on a headless CI
devServer: { server: { open: true } }
// after
devServer: { server: { open: false } } Defensive patterns
Strategy: fallback
Validate before calling
// headless environments: detect before enabling auto-open const isHeadless = !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY && process.platform === 'linux' const shouldOpen = !isHeadless && !process.env.CI
Prevention
- Set devServer.open: false (or omit --open) on CI, containers and SSH/headless machines
- On WSL, ensure a default Windows browser is associated before enabling open
- Treat this warning as non-fatal: the dev server keeps running — open the printed URL manually
- Install xdg-utils (Linux) if you want auto-open on minimal desktop installs
When it happens
Trigger: `quasar dev` with `devServer.open: true` (or the --open flag) on a system where the `open` package's platform helper (xdg-open on Linux, `open` on macOS, `start` on Windows/WSL) fails or is missing.
Common situations: Headless Linux servers/CI without any browser or xdg-utils installed; WSL without a Windows browser association; SSH sessions without DISPLAY; containers with no desktop environment.
Related errors
- Failed to open specific browser
- ERROR_NETWORK_PORT_NOT_AVAIL
- The queued task for "${task.diffName}" failed
- ERROR_NETWORK_PORT_NOT_AVAIL
- Unknown network error occurred
AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30).
Data as JSON: /api/errors/3cf3c168fdba5d03.
Report an issue: GitHub.