cypress: Error: could not find CRI target / Failed to connect to Chrome

Current behavior:

cypress run --headless --browser chrome is failing in GitHub Actions with this error:

Failed to connect to Chrome, retrying in 1 second (attempt 18/32)
could not find CRI target
Error: could not find CRI target
    at lazyAssLogic (/home/runner/.cache/Cypress/3.8.1/Cypress/resources/app/packages/server/node_modules/lazy-ass/index.js:110:14)
    at lazyAss (/home/runner/.cache/Cypress/3.8.1/Cypress/resources/app/packages/server/node_modules/lazy-ass/index.js:115:28)
    at /home/runner/.cache/Cypress/3.8.1/Cypress/resources/app/packages/server/lib/browsers/protocol.js:81:5
    at tryCatcher (/home/runner/.cache/Cypress/3.8.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/runner/.cache/Cypress/3.8.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/runner/.cache/Cypress/3.8.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/runner/.cache/Cypress/3.8.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/runner/.cache/Cypress/3.8.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/home/runner/.cache/Cypress/3.8.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/home/runner/.cache/Cypress/3.8.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/home/runner/.cache/Cypress/3.8.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/runner/.cache/Cypress/3.8.1/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:439:21)

Link to the failing build: https://github.com/sweetalert2/sweetalert2/runs/365206238

Steps to reproduce: (app code and test code)

Here’s the GitHub Actions configuration: https://github.com/sweetalert2/sweetalert2/blob/master/.github/workflows/coverage.yml

The cy:run command is defined here: https://github.com/sweetalert2/sweetalert2/blob/master/package.json#L98

Versions

Cypress: 3.8.1 Operating System: Ubuntu 18.04

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 20
  • Comments: 41 (22 by maintainers)

Commits related to this issue

Most upvoted comments

@bahmutov Since you’ve narrowed it down to Mac Canary, thought you may revisit the theory of this being caused by this Mac Chrome bug https://bugs.chromium.org/p/chromium/issues/detail?id=994085 which was initially suspected as the cause of this error in NeuraLegion/cypress-har-generator#17 (comment)

Hi @jennifer-shehane this has been happening for me on GitHub Actions on Ubuntu latest (and on also on my local Mac) so I’m not sure it is Mac specific. Also - only happening in Chrome headless mode and only when changing specs (never when running a single spec). I’ve noticed the Chrome instance stays up and I have to kill all instances to get the tests to work again at all.

<offtopic>

making a post so I can follow and see if this will be resolved

@hunghau there’s the “Subscribe” button for that purpose:

image

</offtopic>

@xdumaine We release every 2 weeks - so this should be released today (1/24/20) barring no complications with the release.

With above in mind, I found a way to recreate the problem as follows:

  1. open Chrome Canary and run the test by clicking on the spec name
  2. from Cypress click “Stop” button
  3. Chrome Canary shuts down, but you quickly click on the spec name to start it again

After 3-6 tries I get the “cannot find CRI target” message, the following terminal output in Cypress

  cypress:server:protocol Getting WS connection to CRI on port 52765 +6s
  cypress:server:protocol CRI.List on port 52765 +311ms
  cypress:server:protocol CRI List { numTargets: 1, targets: [ { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:52765/devtools/page/2C9AF635A11925CC8A321466E32C91A5', id: '2C9AF635A11925CC8A321466E32C91A5', title: 'Sortify', type: 'background_page', url: 'chrome-extension://aehmpfeibpcclkbjjkclhncmjncpebef/_generated_background_page.html', webSocketDebuggerUrl: 'ws://localhost:52765/devtools/page/2C9AF635A11925CC8A321466E32C91A5' } ] } +91ms

But then I can in another tab do the following (I am using same port that CRI.List on port 52765 reports

/packages/server
$ node
Welcome to Node.js v12.13.0.
Type ".help" for more information.
> var CRI = require('chrome-remote-interface')
> CRI.List({host: '127.0.0.1', port: 52765}).then(console.log)
[
  {
    description: '',
    devtoolsFrontendUrl: '/devtools/inspector.html?ws=127.0.0.1:52765/devtools/page/D9E761887F50AF1FD7F22C6565016729',
    id: 'D9E761887F50AF1FD7F22C6565016729',
    title: 'about:blank',
    type: 'page',
    url: 'about:blank',
    webSocketDebuggerUrl: 'ws://127.0.0.1:52765/devtools/page/D9E761887F50AF1FD7F22C6565016729'
  },
...

So it seems to me CRI.List can return “too early” and we should retry it until we do find about:blank

Friday releases. Classic 😆

image

Ok, got the error on Mac

  • using Chrome Canary
  • changed Canary settings to restore previous session tabs (lots of tabs!!!)
  • installed a lot of Chrome extensions

Then it failed to connect

Screen Shot 2020-01-09 at 2 55 28 PM

The terminal is showing

HEAD / - - ms - -
HEAD / - - ms - -
  cypress:server:browsers killing browser process +27s
  cypress:server:browsers browser process killed +130ms
  cypress:server:browsers getBrowserLauncherByFamily { family: 'chrome' } +909ms
  cypress:server:browsers opening browser { displayName: 'Canary', family: 'chrome', isChosen: true, majorVersion: 81, name: 'canary', path: '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary', version: '81.0.4022.0', isHeaded: true, isHeadless: false } +0ms
launching browser {
  displayName: 'Canary',
  family: 'chrome',
  isChosen: true,
  majorVersion: 81,
  name: 'canary',
  path: '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary',
  version: '81.0.4022.0',
  isHeaded: true,
  isHeadless: false
}
adding React DevTools extension from /Users/gleb/git/cypress-test-tiny/4.2.1_0
  cypress:server:protocol Getting WS connection to CRI on port 51298 +28s
  cypress:server:protocol CRI.List on port 51298 +308ms
  cypress:server:protocol CRI List { numTargets: 1, targets: [ { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:51298/devtools/page/52BB7BD3D24CBEB635CBED4881246A40', id: '52BB7BD3D24CBEB635CBED4881246A40', title: 'Sortify', type: 'background_page', url: 'chrome-extension://aehmpfeibpcclkbjjkclhncmjncpebef/_generated_background_page.html', webSocketDebuggerUrl: 'ws://localhost:51298/devtools/page/52BB7BD3D24CBEB635CBED4881246A40' } ] } +89ms
HEAD / - - ms - -
HEAD / - - ms - -
HEAD / - - ms - -

The Chrome Canary looks like this

Screen Shot 2020-01-09 at 2 56 15 PM

BUT I can query the list of connection targets on port 51298

$ curl http://localhost:51298/json/list
[ {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/ABD0D9E55AB47AA826F60DD59FC63186",
   "id": "ABD0D9E55AB47AA826F60DD59FC63186",
   "title": "about:blank",
   "type": "page",
   "url": "about:blank",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/ABD0D9E55AB47AA826F60DD59FC63186"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/4D36E3008E111908B543A6D8886B8BF0",
   "id": "4D36E3008E111908B543A6D8886B8BF0",
   "title": "#1 Web &amp; PDF Highlighter - LINER",
   "type": "background_page",
   "url": "chrome-extension://bmhcbmnbenmcecpmpepghooflbehcack/_generated_background_page.html",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/4D36E3008E111908B543A6D8886B8BF0"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/91ED5DF06E9583B5F119E63C282619BB",
   "id": "91ED5DF06E9583B5F119E63C282619BB",
   "title": "Page not found · GitHub Pages",
   "type": "page",
   "url": "https://example.cypress.io/__/#/tests/integration/spec.js",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/91ED5DF06E9583B5F119E63C282619BB"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/D5DD59801FC66D80DD0238CC8C0A5A22",
   "id": "D5DD59801FC66D80DD0238CC8C0A5A22",
   "title": "Google Input Tools",
   "type": "background_page",
   "url": "chrome-extension://mclkkofklkfljcocdinagocijmpgbhab/background.html",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/D5DD59801FC66D80DD0238CC8C0A5A22"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/A8105F950E9942957743D5E83AC0F109",
   "id": "A8105F950E9942957743D5E83AC0F109",
   "title": "Tampermonkey",
   "type": "background_page",
   "url": "chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/background.html",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/A8105F950E9942957743D5E83AC0F109"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/C7348ED4184DB388549B0C4239124A45",
   "id": "C7348ED4184DB388549B0C4239124A45",
   "title": "Nimbus Screenshot &amp; Screen Video Recorder",
   "type": "background_page",
   "url": "chrome-extension://bpconcjcammlapcogcnnelfmaeghhagj/background.html",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/C7348ED4184DB388549B0C4239124A45"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/7BA7E033C4954F49342F23CCCC0852C9",
   "id": "7BA7E033C4954F49342F23CCCC0852C9",
   "title": "Honey",
   "type": "background_page",
   "url": "chrome-extension://bmnlcjabgnpnenekpadlanbbkooimhnj/_generated_background_page.html",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/7BA7E033C4954F49342F23CCCC0852C9"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/BC5FA127D63765DB53FD568E3D26AD38",
   "id": "BC5FA127D63765DB53FD568E3D26AD38",
   "title": "MEGA",
   "type": "background_page",
   "url": "chrome-extension://bigefpfhnfcobdlfbedofhhaibnlghod/_generated_background_page.html",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/BC5FA127D63765DB53FD568E3D26AD38"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/5ECF032E8C18BB7ADB83F5E06985AE21",
   "id": "5ECF032E8C18BB7ADB83F5E06985AE21",
   "title": "ColorZilla",
   "type": "background_page",
   "url": "chrome-extension://bhlhnicpbhignbdhedgjhgdocnmhomnp/html/background.html",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/5ECF032E8C18BB7ADB83F5E06985AE21"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/369AE6DEC48452DED1973348DDB94F3A",
   "id": "369AE6DEC48452DED1973348DDB94F3A",
   "title": "Turn Off the Lights",
   "type": "background_page",
   "url": "chrome-extension://bfbmjmiodbnnpllbbbfblcplfjjepjdn/background.html",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/369AE6DEC48452DED1973348DDB94F3A"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/F490649DA51E8F5F2F46F46C01EC7BD7",
   "id": "F490649DA51E8F5F2F46F46C01EC7BD7",
   "title": "Destiny Item Manager Shortcut",
   "type": "background_page",
   "url": "chrome-extension://apghicjnekejhfancbkahkhdckhdagna/_generated_background_page.html",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/F490649DA51E8F5F2F46F46C01EC7BD7"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/0EDC6E35956B1396AC099251CB4561B3",
   "id": "0EDC6E35956B1396AC099251CB4561B3",
   "title": "Workona",
   "type": "background_page",
   "url": "chrome-extension://ailcmbgekjpnablpdkmaaccecekgdhlh/_generated_background_page.html",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/0EDC6E35956B1396AC099251CB4561B3"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/B300CEF27D5F7DD342C9EF06A9423FFC",
   "id": "B300CEF27D5F7DD342C9EF06A9423FFC",
   "title": "Talend API Tester - Free Edition",
   "type": "background_page",
   "url": "chrome-extension://aejoelaoggembcahagimdiliamlcdmfm/_generated_background_page.html",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/B300CEF27D5F7DD342C9EF06A9423FFC"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/52BB7BD3D24CBEB635CBED4881246A40",
   "id": "52BB7BD3D24CBEB635CBED4881246A40",
   "title": "Sortify",
   "type": "background_page",
   "url": "chrome-extension://aehmpfeibpcclkbjjkclhncmjncpebef/_generated_background_page.html",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/52BB7BD3D24CBEB635CBED4881246A40"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/9809DF795BC6DD447D3BCE2F4298675F",
   "id": "9809DF795BC6DD447D3BCE2F4298675F",
   "title": "Page not found · GitHub Pages",
   "type": "page",
   "url": "https://example.cypress.io/__/#/tests/integration/spec.js",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/9809DF795BC6DD447D3BCE2F4298675F"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/0EE49A87AB12953A0DB653DDDBF2B003",
   "faviconUrl": "https://www.google.com/images/icons/product/chrome_web_store-32.png",
   "id": "0EE49A87AB12953A0DB653DDDBF2B003",
   "title": "Web Store",
   "type": "page",
   "url": "https://chrome.google.com/webstore/search/blank%20tab?hl=en-US",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/0EE49A87AB12953A0DB653DDDBF2B003"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/A7C0BA1D396CFA7B0B8488ECDAE29A25",
   "id": "A7C0BA1D396CFA7B0B8488ECDAE29A25",
   "title": "Extensions",
   "type": "page",
   "url": "chrome://extensions/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/A7C0BA1D396CFA7B0B8488ECDAE29A25"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/A56AF85460A6547112197CC3D9A21A09",
   "faviconUrl": "https://example.cypress.io/__cypress/static/favicon.ico",
   "id": "A56AF85460A6547112197CC3D9A21A09",
   "title": "Page not found · GitHub Pages",
   "type": "page",
   "url": "https://example.cypress.io/__/#/tests/integration/spec.js",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/A56AF85460A6547112197CC3D9A21A09"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/903254383B1EFF416FCDFAC69ACE3260",
   "faviconUrl": "https://example.cypress.io/__cypress/static/favicon.ico",
   "id": "903254383B1EFF416FCDFAC69ACE3260",
   "title": "Page not found · GitHub Pages",
   "type": "page",
   "url": "https://example.cypress.io/__/#/tests/integration/spec.js",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/903254383B1EFF416FCDFAC69ACE3260"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/4629B3D0E2096BC1C64FCBDEE2A0049F",
   "id": "4629B3D0E2096BC1C64FCBDEE2A0049F",
   "title": "about:blank",
   "type": "page",
   "url": "about:blank",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/4629B3D0E2096BC1C64FCBDEE2A0049F"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/09580A4AD37F39AB62436B8915FEA5AB",
   "id": "09580A4AD37F39AB62436B8915FEA5AB",
   "title": "about:blank",
   "type": "page",
   "url": "about:blank",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/09580A4AD37F39AB62436B8915FEA5AB"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/A532B6E3478C876E1D48FC3D1C56DA40",
   "id": "A532B6E3478C876E1D48FC3D1C56DA40",
   "title": "New Tab",
   "type": "page",
   "url": "chrome://newtab/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/A532B6E3478C876E1D48FC3D1C56DA40"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/A10F7E36D69A568847FD83B5848F84A5",
   "id": "A10F7E36D69A568847FD83B5848F84A5",
   "title": "New Tab",
   "type": "page",
   "url": "chrome://newtab/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/A10F7E36D69A568847FD83B5848F84A5"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/82252D73C8FC5F408F810E7D9E063D8C",
   "id": "82252D73C8FC5F408F810E7D9E063D8C",
   "title": "New Tab",
   "type": "page",
   "url": "chrome://newtab/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/82252D73C8FC5F408F810E7D9E063D8C"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/03B4074658338C53C0496717DF701475",
   "id": "03B4074658338C53C0496717DF701475",
   "title": "New Tab",
   "type": "page",
   "url": "chrome://newtab/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/03B4074658338C53C0496717DF701475"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/B9035B503732EC7800450602C8764834",
   "id": "B9035B503732EC7800450602C8764834",
   "title": "New Tab",
   "type": "page",
   "url": "chrome://newtab/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/B9035B503732EC7800450602C8764834"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/E9FA2BE60E6FD86D5E8B40AB47EDFEAC",
   "id": "E9FA2BE60E6FD86D5E8B40AB47EDFEAC",
   "title": "New Tab",
   "type": "page",
   "url": "chrome://newtab/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/E9FA2BE60E6FD86D5E8B40AB47EDFEAC"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/D4CC2550CA3707093AA3A5E11B89E20A",
   "id": "D4CC2550CA3707093AA3A5E11B89E20A",
   "title": "New Tab",
   "type": "page",
   "url": "chrome://newtab/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/D4CC2550CA3707093AA3A5E11B89E20A"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/9F5A3FDF897387C232FD92458F5CCCE5",
   "id": "9F5A3FDF897387C232FD92458F5CCCE5",
   "title": "New Tab",
   "type": "page",
   "url": "chrome://newtab/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/9F5A3FDF897387C232FD92458F5CCCE5"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/6B33E202822DA5781BEBE4A4A2D5307C",
   "id": "6B33E202822DA5781BEBE4A4A2D5307C",
   "title": "New Tab",
   "type": "page",
   "url": "chrome://newtab/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/6B33E202822DA5781BEBE4A4A2D5307C"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/BD5E843B04E380AACE2133769B308097",
   "id": "BD5E843B04E380AACE2133769B308097",
   "title": "New Tab",
   "type": "page",
   "url": "chrome://newtab/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/BD5E843B04E380AACE2133769B308097"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/1072563A0B986B5EB2EA3B6409CE3DB8",
   "id": "1072563A0B986B5EB2EA3B6409CE3DB8",
   "title": "New Tab",
   "type": "page",
   "url": "chrome://newtab/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/1072563A0B986B5EB2EA3B6409CE3DB8"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:51298/devtools/page/511EA466B7F1FBD8756A9C0EF24C10C8",
   "id": "511EA466B7F1FBD8756A9C0EF24C10C8",
   "title": "New Tab",
   "type": "page",
   "url": "chrome://newtab/",
   "webSocketDebuggerUrl": "ws://localhost:51298/devtools/page/511EA466B7F1FBD8756A9C0EF24C10C8"
} ]

which does include about:blank target.

Then there was the following observation:

  • when I stopped the Canary by closing the window and pressing “Stop” in Cypress, it was still hanging around. I could again curl JSON list of targets and they were appearing
  • trying to start Chrome Canary from Cypress did not work - could not connect to RDP
  • I had to exit the Chrome Canary completely from Mac to be able to restart the Chrome Canary from Cypress and connect (the test ran successfully)

agree with @flotwig in https://github.com/cypress-io/cypress/issues/6053#issuecomment-572667915 - I am playing with Docker container, trying to restrict CPU usage to slow down Chrome start up to see if that “helps”. I am also thinking of installing a bunch of chrome extensions locally or loading them in Chrome to see this behavior

This line of code is ending up evaluating as not defined.

/packages/server/lib/browsers/protocol.js@develop#L79:L79

This is most likely because it gets hit while Chrome is still “starting up”. Maybe we need to include this line in the same retry loop that the TCP CDP connection uses.

I also run into this issue but not always. Mostly if I start “cypress run” twice in a row.The issur started since the update from 3.8.0 to the new patch release

I’m to the point that I cannot run cypress on my mac, because I get this error so constantly. Any idea when this will be released? downgrading cypress didn’t fix it.

I don’t see how disabling GPU affects it, but who knows? It could be a combination of headless Chrome and environment. Just to see if we can recreate this I have added headless Chrome test runs to our repos

I’m also getting this error occasionally. (Running within a Docker container, so I don’t think it’s due to multiple Chrome sessions being open, unless from a previous test suite.)

This happened for me in 3.8.1 when using the Cypress Module API (cypress.run) with {browser: 'chrome', headless: true, headed: false} (aside: why are there two flags for this?)

Downgrading to Cypress 3.8.0 solved the issue for me, look like this issue introduced in the latest version (3.8.1)

But 3.8.0 has https://github.com/cypress-io/cypress/issues/5949 so you still won’t be able to use Chrome headless if you downgrade.

Seeing this error after upgrading Node version to v12 and Chrome to v79 (Cypress version unchanged).

Update: this was a coincidence of timing. We are seeing this error in about 1/2 of our test runs.