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

Closed
bahmutov opened this issue Aug 9, 2019 · 5 comments · Fixed by #4999
Closed

Handle browser not found object better #4966

bahmutov opened this issue Aug 9, 2019 · 5 comments · Fixed by #4999
Labels
good first issue Good for newcomers pkg/server This is due to an issue in the packages/server directory

Comments

@bahmutov
Copy link
Contributor

bahmutov 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
Copy link
Contributor Author

bahmutov 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

@bahmutov bahmutov added good first issue Good for newcomers pkg/server This is due to an issue in the packages/server directory labels Aug 9, 2019
@Aa88s
Copy link

Aa88s commented Aug 10, 2019

packages/server/lib/browsers/index.coffee

@Aa88s
Copy link

Aa88s commented Aug 10, 2019

Issue with the server,browser support, and packing

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 26, 2019

The code for this is done in cypress-io/cypress#4999, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 23, 2019

Released in 3.5.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers pkg/server This is due to an issue in the packages/server directory
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants