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).
npm start should open my default browser.
Ignores my default browser setting, and opens Chrome (stable).
npm startnode_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.
@n3tr Could this be a regression after https://github.com/facebookincubator/create-react-app/pull/1165? Can you check before and after?
created PR #1215
@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?
Yes, changing "Google Chrome" to "Chrome" in the applescript makes Canary reload the page as expected.
Should be fixed in [email protected]. Please verify.
https://github.com/facebookincubator/create-react-app/releases/tag/v0.8.4
Most helpful comment
Yes, changing "Google Chrome" to "Chrome" in the applescript makes Canary reload the page as expected.