Skip to content

Opens Chrome stable if Chrome Canary is running #1213

Closed
@kornelski

Description

@kornelski

Description

npm start opens wrong browser. I have both Chrome and Chrome Canary on my system, but I only use Canary (which is set as my default browser system-wide).

Expected behavior

npm start should open my default browser.

Actual behavior

Ignores my default browser setting, and opens Chrome (stable).

Reproducible Demo

  1. Start Google Chrome Canary.app
  2. run npm start

Cause of the bug

node_modules/react-dev-utils/openBrowser.js:

execSync('ps cax | grep "Google Chrome"');

grep incorrectly matches "Google Chrome Canary". Probably the same error would happen with Beta.

execSync('ps cax | grep "Google Chrome$"');

seems to fix the problem (tested on OS X 10.11). Alternatively, pgrep -x "Google Chrome" may give more precise result.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions