Skip to content

docusaurus start - Failed to open browser #11482

@cehenriques

Description

@cehenriques

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

When running docusaurus start I get the following console errors:

$ docusaurus start
[INFO] Starting the development server...
[SUCCESS] Docusaurus website is running at: http://localhost:3000/
● Client ██████████████████████████████████████████████████ (10%) building /Users/chenriques/Documents/navigator-docs/node_modules/webpack/hot/dev-server.js                                                         Failed to open browser Microsoft Edge with AppleScript  995 |   if (!isURLInstance(fileURLOrPath))
 996 |     return fileURLOrPath;
 997 |   return Bun.fileURLToPath(fileURLOrPath);
 998 | }
 999 | var { Error, TypeError } = globalThis;
1000 |   let err = new Error(message);
                   ^
error: Command failed: osascript openChrome.applescript "http://localhost:3000/" "Microsoft Edge"
openChrome.applescript:848:858: script error: A property can’t go after this identifier. (-2740)

   code: 1,
 killed: false,
 signal: null,
    cmd: "osascript openChrome.applescript \"http://localhost:3000/\" \"Microsoft Edge\"",
 stdout: "",
 stderr: "openChrome.applescript:848:858: script error: A property can’t go after this identifier. (-2740)\n",

      at genericNodeError (node:child_process:1000:13)
      at exitHandler (node:child_process:103:28)
      at emit (node:events:98:22)
      at #maybeClose (node:child_process:768:16)
      at #handleOnExit (node:child_process:520:72)

● Client ██████████████████████████████████████████████████ (58%) building /Users/chenriques/Documents/navigator-docs/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[7].use[1]!/Users/chenriques/Documents/navFailed to open browser Brave Browser with AppleScript  995 |   if (!isURLInstance(fileURLOrPath))
 996 |     return fileURLOrPath;
 997 |   return Bun.fileURLToPath(fileURLOrPath);
 998 | }
 999 | var { Error, TypeError } = globalThis;
1000 |   let err = new Error(message);
                   ^
error: Command failed: osascript openChrome.applescript "http://localhost:3000/" "Brave Browser"
openChrome.applescript:848:858: script error: A property can’t go after this identifier. (-2740)

   code: 1,
 killed: false,
 signal: null,
    cmd: "osascript openChrome.applescript \"http://localhost:3000/\" \"Brave Browser\"",
 stdout: "",
 stderr: "openChrome.applescript:848:858: script error: A property can’t go after this identifier. (-2740)\n",

      at genericNodeError (node:child_process:1000:13)
      at exitHandler (node:child_process:103:28)
      at emit (node:events:98:22)
      at #maybeClose (node:child_process:768:16)
      at #handleOnExit (node:child_process:520:72)

● Client ██████████████████████████████████████████████████ (100%) emitting after emit                                                                                                                               client (Rspack 1.5.8) compiled successfully

Even though it throws these errors, it still manages to open the application on Microsoft Edge.

Reproducible demo

No response

Steps to reproduce

  1. Run docusaurus start on macOS 26 with Microsoft Edge as the default browser.

Expected behavior

The app should start without errors.

Actual behavior

The app starts with errors.

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used: 3.9.1
  • Environment name and version: Microsoft Edge 141.0.3537.71, Bun 1.3.0
  • Operating system and version: macOS Tahoe 26.0

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionstatus: needs triageThis issue has not been triaged by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions