Skip to content

Dev server fails on v3.8 because of failed browser detection #11206

Closed as duplicate

Description

@antonkvm

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

After upgrding to v3.8, attempting to run the dev server with npm run start results in an error and the server not starting.

It seems that the detection of the browser is broken, because adding the --no-open flag works as a workaround.

Note: I did not attach a reproducible demo link, as the issue can be reproduced by just creating a new site with the classic presets.

I am on MacOS Sequioa 15.5 and use Firefox 138.0.4 (aarch64) on an M4 MacBook Pro.

Reproducible demo

(reproducible with fresh scaffolded project using classic presets.)

Steps to reproduce

  1. run npx create-docusaurus@latest my-website classic
  2. select JavaScript when prompted (does not matter)
  3. run cd my-website
  4. run npm run start

Expected behavior

The dev server starts and the browser opens with the site preview.

Actual behavior

The command exits with the following error:

[ERROR] Error: Command failed: ps cax -o command | grep -E "^(Google Chrome Canary|Google Chrome Dev|Google Chrome Beta|Google Chrome|Microsoft Edge|Brave Browser|Vivaldi|Chromium)$"

    at genericNodeError (node:internal/errors:983:15)
    at wrappedFn (node:internal/errors:537:14)
    at ChildProcess.exithandler (node:child_process:414:12)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1101:16)
    at Socket.<anonymous> (node:internal/child_process:456:11)
    at Socket.emit (node:events:518:28)
    at Pipe.<anonymous> (node:net:351:12) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'ps cax -o command | grep -E "^(Google Chrome Canary|Google Chrome Dev|Google Chrome Beta|Google Chrome|Microsoft Edge|Brave Browser|Vivaldi|Chromium)$"',
  stdout: '',
  stderr: ''
}
Image

Your environment

  • Docusaurus version used: 3.8
  • Environment name and version: Firefox 138.0.4 (aarch64), Node v22.15.1, npm 10.9.2,
  • Operating system and version: MacOS Sequoia 15.5

Self-service

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

Activity

  1. added
    bug
    status: needs triage
    on May 27, 2025
  2. wellwelwel commented on May 28, 2025

    @wellwelwel
    Contributor

    I've temporarily added the --no-open flag to the start command and opening manually the URL (e.g., localhost:3000).

  3. Josh-Cena commented on May 28, 2025

    @Josh-Cena
    Collaborator

    Thanks for the report. Unfortunately I can't repro on my system (macOS Sequoia 15.1, Chrome 136). What happens when you run ps cax -o command | grep -E "^(Google Chrome Canary|Google Chrome Dev|Google Chrome Beta|Google Chrome|Microsoft Edge|Brave Browser|Vivaldi|Chromium)$" directly in your terminal? @wellwelwel @antonkvm

  4. wellwelwel commented on May 28, 2025

    @wellwelwel
    Contributor

    What happens when you run ps cax -o command | grep -E "^(Google Chrome Canary|Google Chrome Dev|Google Chrome Beta|Google Chrome|Microsoft Edge|Brave Browser|Vivaldi|Chromium)$" directly in your terminal?

    @Josh-Cena, in my case, no action is performed and no output is returned to the terminal, which just ends with code 1:

    Image

    The ps cax -o command command works normally, but has none of the grep results:

    Image

    If I open some of them before performing the command (Brave, for example), then no error occurs and it works normally:

    Image
  5. slorber commented on May 28, 2025

    @slorber
    Collaborator

    This is already fixed in #11205

    I'll do a patch release soon once all the little 3.8.0 issues are fixed

    In the meantime, you can use docusaurus start --no-open

  6. cchepelov commented on May 28, 2025

    @cchepelov

    Same issue here, using Firefox exclusively

    ❯ ps cax -o command | grep -E "^(Google Chrome Canary|Google Chrome Dev|Google Chrome Beta|Google Chrome|Microsoft Edge|Brave Browser|Vivaldi|Chromium)$" ; echo $?  
    1
    

    ... edit: and seeing now that things are being fixed whilst I was typing this. Thanks!

  7. antonkvm commented on May 28, 2025

    @antonkvm
    Author

    What happens when you run ps cax -o command | grep -E "^(Google Chrome Canary|Google Chrome Dev|Google Chrome Beta|Google Chrome|Microsoft Edge|Brave Browser|Vivaldi|Chromium)$" directly in your terminal? @wellwelwel @antonkvm

    @Josh-Cena I have the same behavior as @wellwelwel:

    What happens when you run ps cax -o command | grep -E "^(Google Chrome Canary|Google Chrome Dev|Google Chrome Beta|Google Chrome|Microsoft Edge|Brave Browser|Vivaldi|Chromium)$" directly in your terminal?

    @Josh-Cena, in my case, no action is performed and no output is returned to the terminal, which just ends with code 1:

    Image

    The ps cax -o command command works normally, but has none of the grep results:

    Image

    If I open some of them before performing the command (Brave, for example), then no error occurs:

    Image

    @slorber awesome, thanks!

    This is already fixed in #11205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugstatus: needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions