Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opens Chrome stable if Chrome Canary is running #1213

Closed
kornelski opened this issue Dec 8, 2016 · 5 comments · Fixed by #1215
Closed

Opens Chrome stable if Chrome Canary is running #1213

kornelski opened this issue Dec 8, 2016 · 5 comments · Fixed by #1215
Milestone

Comments

@kornelski
Copy link

kornelski commented Dec 8, 2016

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.

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

@n3tr Could this be a regression after #1165? Can you check before and after?

@n3tr
Copy link
Contributor

n3tr commented Dec 9, 2016

created PR #1215

@n3tr
Copy link
Contributor

n3tr commented Dec 9, 2016

@pornel Can you help me verify by change "Google Chrome" to "Chrome" in node_modules/react-dev-utils/openChrome.applescript line 17 and 61, does it work as expected?

@kornelski
Copy link
Author

Yes, changing "Google Chrome" to "Chrome" in the applescript makes Canary reload the page as expected.

@gaearon gaearon added this to the 0.8.4 milestone Dec 11, 2016
@gaearon
Copy link
Contributor

gaearon commented Dec 11, 2016

Should be fixed in react-scripts@0.8.4. Please verify.
https://github.com/facebookincubator/create-react-app/releases/tag/v0.8.4

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants