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

Unexpected token ... for cypress run #2516

Closed
srinivasrk opened this issue Sep 24, 2018 · 12 comments
Closed

Unexpected token ... for cypress run #2516

srinivasrk opened this issue Sep 24, 2018 · 12 comments
Labels
type: duplicate This issue or pull request already exists

Comments

@srinivasrk
Copy link

Current behavior:

When I run cypress run I get an error that says

 7) The QAReview page Custom list control buttons should create new custom list and add site:
     CypressError: Timed out retrying: Expected to find element: '#review-app', but never found it.
      at Object.cypressErr (http://localhost:3000/__cypress/runner/cypress_runner.js:67992:11)
      at Object.throwErr (http://localhost:3000/__cypress/runner/cypress_runner.js:67957:18)
      at Object.throwErrByPath (http://localhost:3000/__cypress/runner/cypress_runner.js:67984:17)
      at retry (http://localhost:3000/__cypress/runner/cypress_runner.js:61679:16)
      at http://localhost:3000/__cypress/runner/cypress_runner.js:53802:18
      at tryCatcher (http://localhost:3000/__cypress/runner/cypress_runner.js:7091:23)
      at Promise._settlePromiseFromHandler (http://localhost:3000/__cypress/runner/cypress_runner.js:5113:31)
      at Promise._settlePromise (http://localhost:3000/__cypress/runner/cypress_runner.js:5170:18)
      at Promise._settlePromise0 (http://localhost:3000/__cypress/runner/cypress_runner.js:5215:10)
      at Promise._settlePromises (http://localhost:3000/__cypress/runner/cypress_runner.js:5290:18)
      at Async._drainQueue (http://localhost:3000/__cypress/runner/cypress_runner.js:2023:16)
      at Async._drainQueues (http://localhost:3000/__cypress/runner/cypress_runner.js:2033:10)
      at Async.drainQueues (http://localhost:3000/__cypress/runner/cypress_runner.js:1907:14)
      at <anonymous>

 8) The QAReview page Left and Right arrow keys should handle switching sites on arrow press:
     Uncaught SyntaxError: Unexpected token ...

This error originated from your application code, not from Cypress.

When Cypress detects uncaught errors originating from your application it will automatically fail the current test.

This behavior is configurable, and you can choose to turn this off by listening to the 'uncaught:exception' event.

https://on.cypress.io/uncaught-exception-from-application

There are other test cases with similar structure which works fine

Import Page
    √ should successfully load the page (855ms)
    √ should successfully upload a csv for a given site (5223ms)


  2 passing (6s)


  (Results)

  ┌─────────────────────────────────────┐
  │ Tests:        2                     │
  │ Passing:      2                     │
  │ Failing:      0                     │
  │ Pending:      0                     │
  │ Skipped:      0                     │
  │ Screenshots:  0                     │
  │ Video:        true                  │
  │ Duration:     6 seconds             │
  │ Spec Ran:     Import\import_spec.js │
  └─────────────────────────────────────┘

Desired behavior:

All test cases to pass !

Steps to reproduce:

I have nested describe blocks and when I run npm run cy:open and run all specs from there there seems to be no problem.
When I run the command line utility the error appears.

Versions

"cypress": "^3.1.0"

Using nodejs

@s-herbert
Copy link

Same problem.

@kuceb
Copy link
Contributor

kuceb commented Sep 30, 2018

@srinivasrk the syntax error mentioned ... , which is the spread operation syntax, supported in chrome and not in electron

@srinivasrk
Copy link
Author

@bkucera how do I get around it though ?

@christian-fei
Copy link

christian-fei commented Oct 5, 2018

@bkucera @srinivasrk I am having the same issue here. Did you find a workaround?

I tried running the tests with the option --browser chrome, but sadly with no luck :(

I am trying to preprocess the plugins/index.js with babel and with a configured .babelrc, but always bumping into the same issue.

here are the contents of my .babelrc:

{
  "plugins": ["transform-es2015-modules-commonjs", "transform-object-rest-spread"]
}

I have also installed both plugins for babel, like so:

    "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
    "babel-plugin-transform-object-rest-spread": "^6.26.0",
    "babel-register": "^6.26.0",

@christian-fei
Copy link

nevermind, just rewrote the few ES6 syntaxes to ES5 and it worked out of the box with Cypress

@srinivasrk
Copy link
Author

@christian-fei ah okay I will try replacing my ES-6 features as well. Hope it works out. Thanks for letting me know.

@jennifer-shehane
Copy link
Member

Duplicate of #2069

@jennifer-shehane jennifer-shehane marked this as a duplicate of #2069 Nov 19, 2018
@edouard-lopez
Copy link

Same on Solus Linux

cypress run --browser chromium --spec placeholders.specs.js
Can't run because you've entered an invalid browser.

Browser: 'chromium' was not found on your system.

Available browsers found are: electron

Despite being avaiable on system

which chromium
/snap/bin/chromium

Debug

DEBUG=cypress:* cypress run --browser chromium --spec placeholders.specs.js
2018-11-24T10:26:40.602Z cypress:cli cli starts with arguments ["/home/ed8/.config/fnm/bin/node","/home/ed8/projects/lsf/node_modules/.bin/cypress","run","--browser","chromium","--spec","placeholders.specs.js"] 2018-11-24T10:26:40.604Z cypress:cli NODE_OPTIONS is not set 2018-11-24T10:26:40.604Z cypress:cli program parsing arguments 2018-11-24T10:26:40.605Z cypress:cli running Cypress 2018-11-24T10:26:40.646Z cypress:cli parsed cli options { spec: 'placeholders.specs.js', browser: 'chromium' } 2018-11-24T10:26:40.647Z cypress:cli verifying Cypress app 2018-11-24T10:26:40.648Z cypress:cli checking environment variables 2018-11-24T10:26:40.662Z cypress:cli checking if executable exists /home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress 2018-11-24T10:26:40.664Z cypress:cli Binary is executable? : true 2018-11-24T10:26:40.664Z cypress:cli binaryDir is /home/ed8/.cache/Cypress/3.1.2/Cypress 2018-11-24T10:26:40.665Z cypress:cli Reading binary package.json from: /home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/package.json 2018-11-24T10:26:40.667Z cypress:cli Found binary version 3.1.2 installed in: /home/ed8/.cache/Cypress/3.1.2/Cypress 2018-11-24T10:26:40.668Z cypress:cli { verified: true } 2018-11-24T10:26:40.668Z cypress:cli is Verified ? true 2018-11-24T10:26:40.668Z cypress:cli processing run options 2018-11-24T10:26:40.668Z cypress:cli --key is not set, looking up environment variable CYPRESS_RECORD_KEY 2018-11-24T10:26:40.668Z cypress:cli run to spawn.start args ["--run-project","/home/ed8/projects/lsf","--spec","placeholders.specs.js","--browser","chromium"] 2018-11-24T10:26:40.668Z cypress:cli needs XVFB? false 2018-11-24T10:26:40.672Z cypress:cli spawning Cypress with executable: /home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress 2018-11-24T10:26:40.672Z cypress:cli spawn forcing env overrides { FORCE_COLOR: '0', DEBUG_COLORS: '0', FORCE_STDIN_TTY: '1', FORCE_STDOUT_TTY: '0', FORCE_STDERR_TTY: '0' } 2018-11-24T10:26:40.672Z cypress:cli spawn args [ '--run-project', '/home/ed8/projects/lsf', '--spec', 'placeholders.specs.js', '--browser', 'chromium', '--cwd', '/home/ed8/projects/lsf' ] { dev: undefined, detached: false, stdio: 'inherit' } Sat, 24 Nov 2018 10:26:40 GMT cypress:ts Running without ts-node hook in environment "production" Sat, 24 Nov 2018 10:26:41 GMT cypress:server:cypress starting cypress with argv [ '/home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress', '--run-project', '/home/ed8/projects/lsf', '--spec', 'placeholders.specs.js', '--browser', 'chromium', '--cwd', '/home/ed8/projects/lsf' ] Sat, 24 Nov 2018 10:26:41 GMT cypress:server:args argv array: [ '/home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress', '--run-project', '/home/ed8/projects/lsf', '--spec', 'placeholders.specs.js', '--browser', 'chromium', '--cwd', '/home/ed8/projects/lsf' ] Sat, 24 Nov 2018 10:26:41 GMT cypress:server:args argv parsed: { _: [ '/home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress' ], runProject: '/home/ed8/projects/lsf', spec: 'placeholders.specs.js', browser: 'chromium', cwd: '/home/ed8/projects/lsf' } Sat, 24 Nov 2018 10:26:41 GMT cypress:server:args argv options: { _: [ '/home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress' ], runProject: '/home/ed8/projects/lsf', spec: [ '/home/ed8/projects/lsf/placeholders.specs.js' ], browser: 'chromium', cwd: '/home/ed8/projects/lsf', config: {}, projectRoot: '/home/ed8/projects/lsf', run: true } Sat, 24 Nov 2018 10:26:41 GMT cypress:server:appdata path: /home/ed8/.config/Cypress/cy/production Sat, 24 Nov 2018 10:26:41 GMT cypress:server:cypress starting in mode run Sat, 24 Nov 2018 10:26:42 GMT cypress:server:appdata path: /home/ed8/.config/Cypress/cy/production/browsers Sat, 24 Nov 2018 10:26:42 GMT cypress:server:appdata path: /home/ed8/.config/Cypress/cy/production Sat, 24 Nov 2018 10:26:42 GMT cypress:server:appdata path: /home/ed8/.config/Cypress/cy/production/cache Sat, 24 Nov 2018 10:26:44 GMT cypress:server:timers queuing timer id 1 after 500 ms Sat, 24 Nov 2018 10:26:44 GMT cypress:server:timers child received timer id 1 Sat, 24 Nov 2018 10:26:44 GMT cypress:server:timers child sending timer id 1 Sat, 24 Nov 2018 10:26:44 GMT cypress:server:timers clearing timer id 1 from queue { '1': { args: [], ms: 500, cb: [Function] } } Sat, 24 Nov 2018 10:26:44 GMT cypress:server:run run mode ready with options { _: [ '/home/ed8/.cache/Cypress/3.1.2/Cypress/Cypress' ], runProject: '/home/ed8/projects/lsf', spec: [ '/home/ed8/projects/lsf/placeholders.specs.js' ], browser: 'chromium', cwd: '/home/ed8/projects/lsf', config: {}, projectRoot: '/home/ed8/projects/lsf', run: true } Sat, 24 Nov 2018 10:26:44 GMT cypress:server:project Project created /home/ed8/projects/lsf Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher checking one browser chrome Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher looking up chrome on linux platform Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher looking using command "google-chrome --version" Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher Could not detect browser Command failed: /bin/sh -c google-chrome --version /bin/sh: google-chrome: command not found

Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher browser chrome not installed
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher checking one browser chromium
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher looking up chromium on linux platform
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher looking using command "chromium-browser --version"
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher Could not detect browser Command failed: /bin/sh -c chromium-browser --version
/bin/sh: chromium-browser: command not found

Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher browser chromium not installed
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher checking one browser canary
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher looking up canary on linux platform
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher looking using command "google-chrome-canary --version"
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher Could not detect browser Command failed: /bin/sh -c google-chrome-canary --version
/bin/sh: google-chrome-canary: command not found

Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher browser canary not installed
Sat, 24 Nov 2018 10:26:44 GMT cypress:server:openproject opening project /home/ed8/projects/lsf
Sat, 24 Nov 2018 10:26:44 GMT cypress:server:project opening project instance /home/ed8/projects/lsf
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:config setting support file /home/ed8/projects/lsf/cypress/support
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:config for project root /home/ed8/projects/lsf
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:config set support folder /home/ed8/projects/lsf/cypress/support
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:config setting plugins file /home/ed8/projects/lsf/cypress/plugins
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:config for project root /home/ed8/projects/lsf
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:config set pluginsFile to /home/ed8/projects/lsf/cypress/plugins/index.js
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:config set scaffold paths
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:scaffold scaffolded files ["cypress/integration/examples/actions.spec.js","cypress/integration/examples/aliasing.spec.js","cypress/integration/examples/assertions.spec.js","cypress/integration/examples/connectors.spec.js","cypress/integration/examples/cookies.spec.js","cypress/integration/examples/cypress_api.spec.js","cypress/integration/examples/files.spec.js","cypress/integration/examples/local_storage.spec.js","cypress/integration/examples/location.spec.js","cypress/integration/examples/misc.spec.js","cypress/integration/examples/navigation.spec.js","cypress/integration/examples/network_requests.spec.js","cypress/integration/examples/querying.spec.js","cypress/integration/examples/spies_stubs_clocks.spec.js","cypress/integration/examples/traversal.spec.js","cypress/integration/examples/utilities.spec.js","cypress/integration/examples/viewport.spec.js","cypress/integration/examples/waiting.spec.js","cypress/integration/examples/window.spec.js","cypress/fixtures/example.json","cypress/support/commands.js","cypress/support/index.js","cypress/plugins/index.js"]
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:config got file tree
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:project get saved state
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:saved_state noop saved state
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:scaffold plugins folder /home/ed8/projects/lsf/cypress/plugins
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:scaffold verify scaffolding in /home/ed8/projects/lsf/cypress/plugins
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:scaffold folder /home/ed8/projects/lsf/cypress/plugins already exists
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:plugins plugins.init /home/ed8/projects/lsf/cypress/plugins/index.js
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:plugins:child pluginsFile: /home/ed8/projects/lsf/cypress/plugins/index.js
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:plugins:child require pluginsFile
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:plugins:child run plugins function
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:plugins:child register event _get:task:body with id 0
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:plugins:child register event _get:task:keys with id 1
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:plugins register plugins process event _get:task:body with id 0
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:plugins register event '_get:task:body'
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:plugins register plugins process event _get:task:keys with id 1
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:plugins register event '_get:task:keys'
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:project plugin config yielded: null
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:buffers resetting buffers
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:server Server listening on port 34083
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:appdata path: /home/ed8/.config/Cypress/cy/production/proxy
Sat, 24 Nov 2018 10:26:45 GMT cypress:https-proxy Created SNI HTTPS Proxy on port 46109
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:server Setting remoteAuth undefined
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:cors Parsed URL { port: '3000', tld: 'localhost', domain: '' }
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:server Setting remoteOrigin http://localhost:3000
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:server Setting remoteHostAndPort { port: '3000', tld: 'localhost', domain: '' }
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:server Setting remoteDocDomain localhost
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:server Getting remote state: { auth: undefined, props: { port: '3000', tld: 'localhost', domain: '' }, origin: 'http://localhost:3000', strategy: 'http', visiting: undefined, domainName: 'localhost', fileServer: null }
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:project project config: { baseUrl: 'http://localhost:3000', projectRoot: '/home/ed8/projects/lsf', projectName: 'lsf', morgan: false, isTextTerminal: true, socketId: 'xakvm', report: true, browsers: [ { name: 'electron', displayName: 'Electron', version: '59.0.3071.115', path: '', majorVersion: '59', info: 'Electron is the default browser that comes with Cypress. This is the browser that runs in headless mode. Selecting this browser is useful when debugging. The version number indicates the underlying Chromium version that Electron uses.' } ], port: 34083, hosts: null, userAgent: null, reporter: 'spec', reporterOptions: null, blacklistHosts: null, clientRoute: '/__/', xhrRoute: '/xhrs/', socketIoRoute: '/__socket.io', socketIoCookie: '__socket.io', reporterRoute: '/__cypress/reporter', ignoreTestFiles: '.hot-update.js', testFiles: '**/.*', defaultCommandTimeout: 4000, requestTimeout: 5000, responseTimeout: 30000, pageLoadTimeout: 60000, execTimeout: 60000, taskTimeout: 60000, video: true, videoCompression: 32, videoUploadOnPasses: true, modifyObstructiveCode: true, chromeWebSecurity: true, waitForAnimations: true, animationDistanceThreshold: 5, numTestsKeptInMemory: 0, watchForFileChanges: false, trashAssetsBeforeRuns: true, autoOpen: false, viewportWidth: 1000, viewportHeight: 660, fileServerFolder: '/home/ed8/projects/lsf', videosFolder: '/home/ed8/projects/lsf/cypress/videos', supportFile: '/home/ed8/projects/lsf/cypress/support/index.js', fixturesFolder: '/home/ed8/projects/lsf/cypress/fixtures', integrationFolder: '/home/ed8/projects/lsf/cypress/integration', screenshotsFolder: '/home/ed8/projects/lsf/cypress/screenshots', namespace: '__cypress', pluginsFile: '/home/ed8/projects/lsf/cypress/plugins/index.js', javascripts: [], env: {}, cypressEnv: 'production', parentTestsFolder: '/home/ed8/projects/lsf/cypress', parentTestsFolderDisplay: 'lsf/cypress', supportFolder: '/home/ed8/projects/lsf/cypress/support', integrationExampleName: 'examples', integrationExamplePath: '/home/ed8/projects/lsf/cypress/integration/examples', scaffoldedFiles: [ { name: 'cypress', children: [Array] } ], state: {}, proxyUrl: 'http://localhost:34083', browserUrl: 'http://localhost:3000/__/', reporterUrl: 'http://localhost:3000/__cypress/reporter', xhrUrl: '__cypress/xhrs/' }
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:reporter trying to load reporter: spec
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:reporter spec is Mocha reporter
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:project scaffolding project /home/ed8/projects/lsf
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:scaffold support folder /home/ed8/projects/lsf/cypress/support, support file /home/ed8/projects/lsf/cypress/support/index.js
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:scaffold verify scaffolding in /home/ed8/projects/lsf/cypress/support
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:scaffold folder /home/ed8/projects/lsf/cypress/support already exists
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:project attempt watch plugins file: /home/ed8/projects/lsf/cypress/plugins/index.js
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:project plugins file found? true
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:project watch plugins file
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:timers queuing timer id 2 after 0 ms
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:timers child received timer id 2
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:timers child sending timer id 2
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:timers clearing timer id 2 from queue { '2': { args: [], ms: 0, cb: [Function: clear] } }
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:timers clearing timer id 2 from queue {}
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:specs looking for test specs in the folder: /home/ed8/projects/lsf/cypress/integration
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:profilecleaner found 0 root level profile matches: []
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:profilecleaner found 0 profile folders: []
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:profilecleaner found 0 profile folders: []
Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher checking one browser chrome
Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher looking up chrome on linux platform
Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher looking using command "google-chrome --version"
Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher Could not detect browser Command failed: /bin/sh -c google-chrome --version
/bin/sh: google-chrome: command not found

Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher browser chrome not installed
Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher checking one browser chromium
Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher looking up chromium on linux platform
Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher looking using command "chromium-browser --version"
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:specs found 0 spec files: []
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:run found '0' specs using spec pattern '/home/ed8/projects/lsf/placeholders.specs.js': []
Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher Could not detect browser Command failed: /bin/sh -c chromium-browser --version
/bin/sh: chromium-browser: command not found

Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher browser chromium not installed
Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher checking one browser canary
Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher looking up canary on linux platform
Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher looking using command "google-chrome-canary --version"
Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher Could not detect browser Command failed: /bin/sh -c google-chrome-canary --version
/bin/sh: google-chrome-canary: command not found

Sat, 24 Nov 2018 10:26:45 GMT cypress:launcher browser canary not installed
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:cypress exiting with err { Error: Can't run because you've entered an invalid browser.

Browser: 'chromium' was not found on your system.

Available browsers found are: electron
at get (/home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/server/lib/errors.js:236:11)
at Object.throwErr [as throw] (/home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/server/lib/errors.js:249:11)
at throwBrowserNotFound (/home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/server/lib/browsers/index.js:77:27)
at /home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/server/lib/browsers/index.js:67:38
at tryCatcher (/home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/launcher/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/launcher/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/launcher/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/launcher/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/launcher/node_modules/bluebird/js/release/promise.js:694:18)
at _drainQueueStep (/home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/launcher/node_modules/bluebird/js/release/async.js:138:12)
at _drainQueue (/home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/launcher/node_modules/bluebird/js/release/async.js:131:9)
at Async._drainQueues (/home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/launcher/node_modules/bluebird/js/release/async.js:147:5)
at Immediate.Async.drainQueues (/home/ed8/.cache/Cypress/3.1.2/Cypress/resources/app/packages/launcher/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
isCypressErr: true, type: 'BROWSER_NOT_FOUND' }
Can't run because you've entered an invalid browser.

Browser: 'chromium' was not found on your system.

Available browsers found are: electron
Sat, 24 Nov 2018 10:26:45 GMT cypress:server:cypress about to exit with code 1

He is looking for chromium-browser which is not the name of the snap package.

Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher looking using command "chromium-browser --version"
Sat, 24 Nov 2018 10:26:44 GMT cypress:launcher Could not detect browser Command failed: /bin/sh -c chromium-browser --version
/bin/sh: chromium-browser: command not found

Symlink fail

sudo ln -nfs /snap/bin/chromium /snap/bin/chromium-browser

I can't run chromium-browser, but that something else.

 chromium-browserinternal error, please report: running "chromium-browser" failed: cannot find current revision for snap chromium-browser: readlink /snap/chromium-browser/current: no such file or directory

@wdifruscio
Copy link

Hi, my application is written in typescript and I am getting this same error with the spread syntax.

I can't run cypress chrome at work because of some security policies, and now I can't run my test suite using electron without changing my syntax.

Is there any workaround for this yet?

@jennifer-shehane jennifer-shehane added the type: duplicate This issue or pull request already exists label Apr 17, 2019
@kg-currenxie
Copy link

Same here, a project in typescript

@malimccalla
Copy link

Same issue here with typescript project. The odd thing is that the first test fails with the error Uncaught SyntaxError: Unexpected token ... but all other tests pass. if I run my tests with cypress open then all pass

@kuceb
Copy link
Contributor

kuceb commented May 15, 2019

This is a known issue explained in #2069. Please check there for updates/workarounds

@cypress-io cypress-io locked as resolved and limited conversation to collaborators May 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

9 participants