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

Handle browser not found object better #4966

Open
bahmutov opened this issue Aug 9, 2019 · 3 comments

Comments

@bahmutov
Copy link
Collaborator

commented Aug 9, 2019

v3.4.1 - a browser not found error does not understand that it gets an object, not a name

Screen Shot 2019-08-09 at 4 15 31 PM

throwBrowserNotFound(nameOrPath, browsers)

throwBrowserNotFound = (browserName, browsers = []) ->
  names = _.map(browsers, "name").join(", ")
  debug("BROWSER_NOT_FOUND_BY_NAME %o available browser names %o", browserName, names)
  errors.throw("BROWSER_NOT_FOUND_BY_NAME", browserName, names)
  cypress:server:browsers selecting browser launcher for family electron-app +0ms
  cypress:server:browsers BROWSER_NOT_FOUND_BY_NAME { displayName: 'cypress-example-electron', family: 'electron-app', info: 'Electron.js app that supports the Cypress launcher', isChosen: true, majorVersion: '99', name: 'cypress-example-electron', path: '/Users/gleb/git/cypress-example-electron', version: '0.0.0', isHeaded: true, isHeadless: false } available browser names 'chrome, canary, cypress-example-electron'
@bahmutov

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 9, 2019

oh, it is actually called from a different place, and should pass browser name. Simple to fix

if not browserLauncher = getBrowserLauncherByFamily(browser.family)
  return throwBrowserNotFound(browser, options.browsers)

in packages/server/lib/browsers/index.coffee

@Aa88s

This comment has been minimized.

Copy link

commented Aug 10, 2019

packages/server/lib/browsers/index.coffee

@Aa88s

This comment has been minimized.

Copy link

commented Aug 10, 2019

Issue with the server,browser support, and packing

@rbrishabh rbrishabh referenced a pull request that will close this issue Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.