cypress-io / testing-workshop-cypress

End-to-end testing workshop with Cypress
https://testing-workshop-cypress.netlify.app/
479 stars 190 forks source link

Getting error on open cypress test runner in centos 7 #249

Open senthiltr opened 3 years ago

senthiltr commented 3 years ago

HI Team, I followed the below steps to install cypress and to run cypress. Getting the below error, Steps:

  1. mkdir mycpress
  2. cd mycypress
  3. npm init
  4. npm install cypress --save-dev
  5. ./node_modules/.bin/cypress open

now the test runner is opening but i can see this error messages in cli and not running example testcase . Here below is the output. But after login vncviewer session there is executing the test without any error. kindly suggest how to resolve this?

Output: mycypress]$ ./node_modules/.bin/cypress open It looks like this is your first time using Cypress: 6.6.0

✔ Verified Cypress! /home/skrajan/.cache/Cypress/6.6.0/Cypress

Opening Cypress... [7080:0302/003009.789465:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") [7080:0302/003016.536141:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

Error msg in test runner for firefox: Title: Error launching browser

Message: Cypress failed to make a connection to Firefox.

This usually indicates there was a problem opening the Firefox browser.

Error details:

Error: connect ECONNREFUSED 127.0.0.1:41735 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)

Stack trace:

Error: Cypress failed to make a connection to Firefox.

This usually indicates there was a problem opening the Firefox browser.

Error details:

Error: connect ECONNREFUSED 127.0.0.1:41735
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)

    at get (/home/skrajan/.cache/Cypress/6.6.0/Cypress/resources/app/packages/server/lib/errors.js:966:15)
    at Object.throwErr [as throw] (/home/skrajan/.cache/Cypress/6.6.0/Cypress/resources/app/packages/server/lib/errors.js:984:9)
    at /home/skrajan/.cache/Cypress/6.6.0/Cypress/resources/app/packages/server/lib/browsers/firefox.js:387:25
    at tryCatcher (/home/skrajan/.cache/Cypress/6.6.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/skrajan/.cache/Cypress/6.6.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/skrajan/.cache/Cypress/6.6.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/skrajan/.cache/Cypress/6.6.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/skrajan/.cache/Cypress/6.6.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/promise.js:725:18)
    at _drainQueueStep (/home/skrajan/.cache/Cypress/6.6.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/home/skrajan/.cache/Cypress/6.6.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/home/skrajan/.cache/Cypress/6.6.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/skrajan/.cache/Cypress/6.6.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:456:21)

In Chrome(88): Browser is opening and running example testcase but with initial error msg. [7080:0302/003838.893348:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") [7080:0302/003838.896959:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") [7080:0302/003844.274522:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") Failed to connect to Chrome, retrying in 1 second (attempt 18/62) Failed to connect to Chrome, retrying in 1 second (attempt 19/62) Failed to connect to Chrome, retrying in 1 second (attempt 20/62) Failed to connect to Chrome, retrying in 1 second (attempt 21/62) Failed to connect to Chrome, retrying in 1 second (attempt 22/62) Failed to connect to Chrome, retrying in 1 second (attempt 23/62) Failed to connect to Chrome, retrying in 1 second (attempt 24/62) Failed to connect to Chrome, retrying in 1 second (attempt 25/62) Failed to connect to Chrome, retrying in 1 second (attempt 26/62) Failed to connect to Chrome, retrying in 1 second (attempt 27/62) Failed to connect to Chrome, retrying in 1 second (attempt 28/62) Failed to connect to Chrome, retrying in 1 second (attempt 29/62) Failed to connect to Chrome, retrying in 1 second (attempt 30/62) Failed to connect to Chrome, retrying in 1 second (attempt 31/62) HEAD / - - ms - - HEAD / - - ms - - HEAD / - - ms - - POST /ListAccounts?gpsia=1&source=ChromiumBrowser&json=standard 200 79.545 ms - - GET /chrome-variations/seed?osname=linux&channel=stable&milestone=88 200 86.919 ms - - GET // 200 13.589 ms - - GET /cypress/runner/cypress_runner.css 200 5.278 ms - - GET /__cypress/runner/cypress_runner.js 200 4.795 ms - - GET /cypress/runner/fonts/fa-solid-900.woff2 200 4.186 ms - 76120 GET /cypress/iframes/integration/examples/actions.spec.js 200 10.141 ms - 914 GET /__cypress/static/favicon.ico 200 9.322 ms - -

senthiltr commented 3 years ago

Installed the below versioned dependencies, rpm -qa|egrep xorg-x11-server-Xvfb xorg-x11-server-Xvfb-1.20.4-15.el7_9.x86_6 rpm -qa|egrep gtk2-deve gtk2-devel-2.24.31-1.el7.x86_6 rpm -qa|egrep gtk3-deve gtk3-devel-3.22.30-6.el7.x86_6 rpm -qa|egrep libnotify-deve libnotify-devel-0.7.7-1.el7.x86_6 rpm -qa|egrep GConf2 GConf2-3.2.6-8.el7.x86_6 rpm -qa|egrep n nss-3.53.1-3.el7_9.i686 rpm -qa|egrep alsa-lib alsa-lib-1.1.8-1.el7.x86_6 alsa-lib-1.1.8-1.el7.i686 Thanks Senthilkumar TR