question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

3.7.0 - Cypress failed to make a connection to the Chrome DevTools Protocol

See original GitHub issue

Current behavior:

Basically, I’m having the same issue mentioned in the #5431. I installed cypress via yarn add --dev cypress, and just wanted to run tests that were initially provided.

image

Logs (an excerpt) received after running DEBUG=* cypress open

  cypress:network:connect received error on connect, retrying { iteration: 30, delay: 1000, err: { Error: connect ECONNREFUSED ::1:50516 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14) errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 50516 } } +1s
Failed to connect to Chrome, retrying in 1 second (attempt 31/32)
  cypress:network:connect received error on connect, retrying { iteration: 31, delay: 1000, err: { Error: connect ECONNREFUSED ::1:50516 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14) errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 50516 } } +1s
Failed to connect to Chrome, retrying in 1 second (attempt 32/32)
  cypress:network:connect received error on connect, retrying { iteration: 32, delay: 1000, err: { Error: connect ECONNREFUSED ::1:50516 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14) errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 50516 } } +1s
  cypress:network:connect retries exhausted, bubbling up error { iteration: 33, err: { Error: connect ECONNREFUSED ::1:50516 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14) errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 50516 } } +1s
  cypress:server:protocol failed to connect to CDP { port: 50516, err: { Error: Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 20 seconds. This usually indicates there was a problem opening the Chrome browser. The CDP port requested was 50516. Error details: Error: connect ECONNREFUSED ::1:50516 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14) at get (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/lib/errors.js:319:11) at Object.throwErr [as throw] (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/lib/errors.js:334:11) at /Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/protocol.js:38:17 at tryCatcher (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:725:18) at _drainQueueStep (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:443:21) isCypressErr: true, type: 'CDP_COULD_NOT_CONNECT', details: undefined } } +20s
  cypress:server:events send error: { Error: Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 20 seconds. This usually indicates there was a problem opening the Chrome browser. The CDP port requested was 50516. Error details: Error: connect ECONNREFUSED ::1:50516 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14) at get (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/lib/errors.js:319:11) at Object.throwErr [as throw] (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/lib/errors.js:334:11) at /Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/protocol.js:38:17 at tryCatcher (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:725:18) at _drainQueueStep (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:443:21) isCypressErr: true, type: 'CDP_COULD_NOT_CONNECT', details: undefined } +9s
  cypress:server:events sending ipc data { type: 'launch:browser', data: { id: 0.05457888759571827, __error: { type: 'CDP_COULD_NOT_CONNECT', name: 'Error', stack: 'Error: Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 20 seconds.\n\nThis usually indicates there was a problem opening the Chrome browser.\n\nThe CDP port requested was \u001b[33m50516\u001b[39m.\n\nError details:\n\nError: connect ECONNREFUSED ::1:50516\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)\n\n    at get (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/lib/errors.js:319:11)\n    at Object.throwErr [as throw] (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/lib/errors.js:334:11)\n    at /Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/protocol.js:38:17\n    at tryCatcher (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23)\n    at Promise._settlePromiseFromHandler (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:547:31)\n    at Promise._settlePromise (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:604:18)\n    at Promise._settlePromise0 (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:649:10)\n    at Promise._settlePromises (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:725:18)\n    at _drainQueueStep (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:93:12)\n    at _drainQueue (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:86:9)\n    at Async._drainQueues (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:102:5)\n    at Immediate.Async.drainQueues [as _onImmediate] (/Users/adrian/Library/Caches/Cypress/3.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:15:14)\n    at processImmediate (internal/timers.js:443:21)\n', message: 'Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 20 seconds.\n\nThis usually indicates there was a problem opening the Chrome browser.\n\nThe CDP port requested was <span class="ansi-yellow-fg">50516</span>.\n\nError details:\n\nError: connect ECONNREFUSED ::1:50516\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)\n', isCypressErr: true, details: undefined } } } +2ms
  cypress:server:events got request for event: get:project:status, { path: '/Users/adrian/dev/wby/examples' } +740ms
  cypress:server:project get project status for client id undefined at path /Users/adrian/dev/wby/examples +10s
  cypress:server:project no project id +0ms
  cypress:server:events sending ipc data { type: 'get:project:status', data: { id: 0.8992179444644883, data: { path: '/Users/adrian/dev/wby/examples', state: 'VALID' } } } +1ms
  cypress:server:events got request for event: get:project:status, { path: '/Users/adrian/dev/wby/examples' } +10s
  cypress:server:project get project status for client id undefined at path /Users/adrian/dev/wby/examples +10s
  cypress:server:project no project id 

Desired behavior:

Be able to run tests.

Versions

Cypress 3.7.0 Mac OS Mojave, 10.14.4 Node v8.16.2 Yarn v1.15.2

Sorry if I missed some of the details, please let me know if I did.

Thanks for making this awesome piece of software 😃

P.S. When I run cypress run, which should I guess run tests via Electron, I can also see the ECONNREFUSED issues.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:30 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
ray1618commented, Dec 13, 2019

@doitadrian I’ll try editing the hosts file tomorrow

1reaction
bahmutovcommented, Dec 13, 2019

Zach I am thinking right here at this error we can say “here is a link to debug this error”

Sent from my iPhone

On Dec 13, 2019, at 16:51, Adrian Smijulj notifications@github.com wrote:

On my end, the only thing I received was:

And of course, the ECONNREFUSED errors in the console, which wasn’t very helpful, hence this issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cypress failed to make a connection to the ... - Stack Overflow
I'm simply trying to run some of the tests in the example folder under Integration and it will not run on Chrome. Runs...
Read more >
Cypress Failed to Connect to Chrome: 5 Ways to Easily Fix it
1. Update the Chrome browser. On your computer and launch Chrome. · 2. Use Chrome-flavored browsers · 3. Debug the Chrome browser ·...
Read more >
Changelog - Cypress Documentation
Fixed an issue where the Cypress migration wizard would fail to run in global mode on newer versions of Cypress. Addressed in #25138....
Read more >
mongosh econnrefused | The AI Search Engine You Control
cypress-io/cypress3.7.0 - Cypress failed to make a connection to the Chrome DevTools Protocol#5912. Created about 3 years ago.
Read more >
cypress-io/cypress - Gitter
Message: Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds. This usually indicates there was a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found