{"record":{"id":"3cf3c168fdba5d03","repo":"quasarframework/quasar","slug":"failed-to-open-default-browser","errorCode":null,"errorMessage":"Failed to open default browser","messagePattern":"Failed to open default browser","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"app-vite/lib/utils/open-browser.js","lineNumber":13,"sourceCode":"import open from 'open'\n\nimport { log, warn } from './logger.js'\n\nexport function openBrowser({ url, opts, wait = true }) {\n  const openDefault = () => {\n    log('Opening default browser at ' + url + '\\n')\n\n    open(url, {\n      wait\n    }).catch(err => {\n      console.error(err)\n      warn('Failed to open default browser')\n      warn()\n    })\n  }\n\n  if (opts) {\n    log('Opening browser at ' + url + ' with options: ' + JSON.stringify(opts))\n    log()\n    open(url, {\n      ...opts,\n      wait\n    }).catch(err => {\n      console.error(err)\n      warn('Failed to open specific browser')\n      warn()\n      openDefault()\n    })\n  } else {\n    openDefault()","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/utils/open-browser.js#L1-L31","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","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"],"exampleFix":"// before (quasar.config.js) on a headless CI\ndevServer: { server: { open: true } }\n// after\ndevServer: { server: { open: false } }","handlingStrategy":"fallback","validationCode":"// headless environments: detect before enabling auto-open\nconst isHeadless = !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY && process.platform === 'linux'\nconst shouldOpen = !isHeadless && !process.env.CI","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["browser","dev-server","open","environment"],"backgroundTag":"browser-launch-failed","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}