Open wwilsman opened 6 years ago
For me, this is broken in a different scenario. I'm on Windows 10. Out of the box, I get this behavior:
❯ npx bigtest run
Cannot read property 'toString' of null
x-default-browser
seems fine:
❯ npx x-default-browser
chrome
I have installed node and related tools with Scoop, which apparently has created a .cmd
wrapper around npx. If I modify the implementation of getDefaultBrowser
to run npx.cmd
rather than npx
, then the function works fine.
So, a different problem, but I thought it might be useful to document in case others run across this scenario.
Thanks for the tip @jasonvasquez!
This hasn't been tested heavily on Windows yet so this is definitely helpful.
I'm having a similar issue but a different error being thrown. I'm seeing this after running bigtest run
yarn run v1.13.0
$ /Users/alafroscia/Code/netflix/os-workflows-ui/node_modules/.bin/bigtest run
/Users/alafroscia/Code/netflix/os-workflows-ui/node_modules/@bigtest/cli/node_modules/yargs/yargs.js:1148
else throw err
^
Error: Cannot find browser "unknown"
at resolveLocal (/Users/alafroscia/Code/netflix/os-workflows-ui/node_modules/@bigtest/cli/dist/run/util/resolve-local.js:35:22)
at requireBrowser (/Users/alafroscia/Code/netflix/os-workflows-ui/node_modules/@bigtest/cli/dist/run/browsers/index.js:35:44)
at BrowserManager.assign.browsers.browsers.map.browser (/Users/alafroscia/Code/netflix/os-workflows-ui/node_modules/@bigtest/cli/dist/run/browsers/index.js:66:23)
at Array.map (<anonymous>)
at new BrowserManager (/Users/alafroscia/Code/netflix/os-workflows-ui/node_modules/@bigtest/cli/dist/run/browsers/index.js:61:26)
at new Coordinator (/Users/alafroscia/Code/netflix/os-workflows-ui/node_modules/@bigtest/cli/dist/run/coordinator.js:63:20)
at Object.handler (/Users/alafroscia/Code/netflix/os-workflows-ui/node_modules/@bigtest/cli/dist/run/index.js:128:11)
at Object.runCommand (/Users/alafroscia/Code/netflix/os-workflows-ui/node_modules/@bigtest/cli/node_modules/yargs/lib/command.js:238:44)
at Object.parseArgs [as _parseArgs] (/Users/alafroscia/Code/netflix/os-workflows-ui/node_modules/@bigtest/cli/node_modules/yargs/yargs.js:1063:30)
at Object.parse (/Users/alafroscia/Code/netflix/os-workflows-ui/node_modules/@bigtest/cli/node_modules/yargs/yargs.js:542:19)
I'm on OSX, and have just been following the quick-start guide on the website
I've seen issues where the default browser, which may be a beta or dev version, is detected as the stable version of a browser and will fail to open the proper browser or not open the browser at all if not installed.
This issue also popped up in the example repo. Although the issue there seems to be with the default browser bin not being in the path when using
npm
instead ofyarn
.Not sure what the solution should be for detecting the default browser, but we'll probably also need launchers for the dev / beta versions of those browsers. Or refactor the launchers to account for this