{"record":{"id":"b52999fdfaaf3a7d","repo":"quasarframework/quasar","slug":"failed-to-open-default-browser-b52999","errorCode":null,"errorMessage":"Failed to open default browser","messagePattern":"Failed to open default browser","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/lib/cmd/serve.js","lineNumber":317,"sourceCode":"\nconsole.log('\\n' + info.join('\\n') + '\\n')\n\nif (\n  argv.open &&\n  process.stdout.isTTY &&\n  process.env.NODE_ENV !== 'test' &&\n  (await import('ci-info').then(({ isCI }) => !isCI))\n) {\n  const url = getListeningUrl(\n    argv.hostname === '0.0.0.0' ? 'localhost' : argv.hostname\n  )\n\n  log('Opening default browser at ' + url + '\\n')\n  const { default: open } = await import('open')\n\n  // oxlint-disable-next-line unicorn/prefer-top-level-await\n  open(url).catch(() => {\n    warn('Failed to open default browser')\n    warn()\n  })\n}\n","sourceCodeStart":299,"sourceCodeEnd":321,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/cli/lib/cmd/serve.js#L299-L321","documentation":"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.","triggerScenarios":"Running `quasar serve` (or the openBrowser path) in an environment with no default browser or no GUI (SSH/headless/CI), where `open(url)` rejects.","commonSituations":"Serving on a remote headless machine; WSL without browser integration; containers/CI; desktop environment without a registered xdg-open handler.","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 ...)."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// On headless/CI machines, detect absence of a display/browser before serving:\nif (!process.env.DISPLAY && process.platform === 'linux') console.log('Headless: open the URL manually');","typeGuard":null,"tryCatchPattern":"// The library already catches; in your own code:\nopen(url).catch(() => console.log(`Open manually: ${url}`));","preventionTips":["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."],"tags":["browser","serve","headless"],"backgroundTag":"browser-open-failed","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}