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
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
Cypress: 3.8.1
Operating System: Ubuntu 18.04
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 also run into this issue but not always
Same for me, the build for PR was passing, but when I merged a PR into the master
branch, the reported issue happened
Confirming the flakiness of the issue, just pushed another commit into master
branch and the build is passing.
Just to clarify that it's most probably not caching issue as I'm not using any caching of node_modules. GitHub actions isn't caching anything by default and https://github.com/actions/cache isn't used in the linked project.
Could you run Cypress in debug mode mode and print the entire set of logs here?
Just fixed this issue with the command below to run locally at least:
rm -rf ~/Library/Caches/Cypress ./node_modules && yarn cache clean && yarn
But it failed on a second run so it's necessary to clear and install dependencies again before each headless cypress run.
MacOS 10.15.2
Cypress 3.8.1
Chrome 79.0.3945.88
Could you run Cypress in debug mode mode and print the entire set of logs here?
I can't run Cypress in any mode, including the debugging mode. The failure is happening before Cypress is started because in order to start Cypress needs to connect to the browser and the connection stage is failing:
See the whole output here: https://github.com/sweetalert2/sweetalert2/runs/365206238
@limonte Cypress will print logs at the very beginning of cypress run
, there will be logs even though it crashes here. Please run Cypress in debug mode and print the logs here.
cypress:server:browsers:chrome launching in chrome with debugging port {
url: 'https://TESTURL:PORT/__/#/tests/integration/register.spec.js',
args: [
'--test-type',
'--ignore-certificate-errors',
'--start-maximized',
'--silent-debugger-extension-api',
'--no-default-browser-check',
'--no-first-run',
'--noerrdialogs',
'--enable-fixed-layout',
'--disable-popup-blocking',
'--disable-password-generation',
'--disable-save-password-bubble',
'--disable-single-click-autofill',
'--disable-prompt-on-repos',
'--disable-background-timer-throttling',
'--disable-renderer-backgrounding',
'--disable-renderer-throttling',
'--disable-restore-session-state',
'--disable-translate',
'--disable-new-profile-management',
'--disable-new-avatar-menu',
'--allow-insecure-localhost',
'--reduce-security-for-testing',
'--enable-automation',
'--disable-device-discovery-notifications',
'--disable-infobars',
'--autoplay-policy=no-user-gesture-required',
'--disable-site-isolation-trials',
'--metrics-recording-only',
'--disable-prompt-on-repost',
'--disable-hang-monitor',
'--disable-sync',
'--disable-web-resources',
'--safebrowsing-disable-auto-update',
'--safebrowsing-disable-download-protection',
'--disable-client-side-phishing-detection',
'--disable-component-update',
'--disable-default-apps',
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
'--disable-ipc-flooding-protection',
'--disable-backgrounding-occluded-window',
'--disable-breakpad',
'--password-store=basic',
'--use-mock-keychain',
'--proxy-server=http://localhost:57158',
'--disable-web-security',
'--allow-running-insecure-content',
'--proxy-bypass-list=<-loopback>',
'--headless',
'--remote-debugging-port=58278',
'--remote-debugging-address=127.0.0.1',
'--disable-dev-shm-usage',
'--user-data-dir=/Users/satsai/Library/Application Support/Cypress/cy/production/browsers/chrome/run-37207',
'--disk-cache-dir=/Users/satsai/Library/Application Support/Cypress/cy/production/browsers/chrome/run-37207/CypressCache'
],
port: 58278
} +2ms
cypress:launcher launching browser { name: 'chrome', family: 'chrome', displayName: 'Chrome', version: '79.0.3945.88', path: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', majorVersion: 79, isHeadless: true, isHeaded: false } to open about:blank +2m
cypress:launcher spawning browser { name: 'chrome', family: 'chrome', displayName: 'Chrome', version: '79.0.3945.88', path: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', majorVersion: 79, isHeadless: true, isHeaded: false } with args about:blank --test-type --ignore-certificate-errors --start-maximized --silent-debugger-extension-api --no-default-browser-check --no-first-run --noerrdialogs --enable-fixed-layout --disable-popup-blocking --disable-password-generation --disable-save-password-bubble --disable-single-click-autofill --disable-prompt-on-repos --disable-background-timer-throttling --disable-renderer-backgrounding --disable-renderer-throttling --disable-restore-session-state --disable-translate --disable-new-profile-management --disable-new-avatar-menu --allow-insecure-localhost --reduce-security-for-testing --enable-automation --disable-device-discovery-notifications --disable-infobars --autoplay-policy=no-user-gesture-required --disable-site-isolation-trials --metrics-recording-only --disable-prompt-on-repost --disable-hang-monitor --disable-sync --disable-web-resources --safebrowsing-disable-auto-update --safebrowsing-disable-download-protection --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --use-fake-ui-for-media-stream --use-fake-device-for-media-stream --disable-ipc-flooding-protection --disable-backgrounding-occluded-window --disable-breakpad --password-store=basic --use-mock-keychain --proxy-server=http://localhost:57158 --disable-web-security --allow-running-insecure-content --proxy-bypass-list=<-loopback> --headless --remote-debugging-port=58278 --remote-debugging-address=127.0.0.1 --disable-dev-shm-usage --user-data-dir=/Users/satsai/Library/Application Support/Cypress/cy/production/browsers/chrome/run-37207 --disk-cache-dir=/Users/satsai/Library/Application Support/Cypress/cy/production/browsers/chrome/run-37207/CypressCache +0ms
cypress:server:browsers:chrome connecting to Chrome remote interface at random port 58278 +15ms
cypress:server:protocol Getting WS connection to CRI on port 58278 +2m
cypress:network:connect received error on connect, retrying { iteration: 0, delay: 100, err: Error: connect ECONNREFUSED 127.0.0.1:58278 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14) { errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 58278 } } +5s
cypress:network:connect received error on connect, retrying { iteration: 1, delay: 100, err: Error: connect ECONNREFUSED 127.0.0.1:58278 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14) { errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 58278 } } +103ms
cypress:network:connect successfully connected { opts: { getDelayMsForRetry: [Function: _getDelayMsForRetry], host: '127.0.0.1', port: 58278 }, iteration: 2 } +101ms
cypress:server:protocol CRI.List on port 58278 +207ms
cypress:server:protocol CRI List { numTargets: 0, targets: [] } +10ms
cypress:server:cypress exiting with err Error: could not find CRI target
at lazyAssLogic (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/lazy-ass/index.js:110:14)
at lazyAss (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/lazy-ass/index.js:115:28)
at /Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/protocol.js:81:5
at tryCatcher (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebcould not find CRI target
Error: could not find CRI target
at lazyAssLogic (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/lazy-ass/index.js:110:14)
at lazyAss (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/lazy-ass/index.js:115:28)
at /Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/protocol.js:81:5
at tryCatcher (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:439:21)
ird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/satsai/Library/Caches/Cypress/3.8.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:439:21)
+3m
cypress:server:file get values from /Users/satsai/Library/Application Support/Cypress/cy/production/cache +0ms
cypress:server:file attempt to get lock on /Users/satsai/Library/Application Support/Cypress/cy/production/cache +2ms
cypress:server:file gettin lock succeeded or failed for /Users/satsai/Library/Application Support/Cypress/cy/production/cache +3ms
cypress:server:file read /Users/satsai/Library/Application Support/Cypress/cy/production/cache +0ms
cypress:server:file read succeeded or failed for /Users/satsai/Library/Application Support/Cypress/cy/production/cache +1ms
cypress:server:file attempt to unlock /Users/satsai/Library/Application Support/Cypress/cy/production/cache +1ms
cypress:server:file unlock succeeded or failed for /Users/satsai/Library/Application Support/Cypress/cy/production/cache +0ms
cypress:server:api request to url: POST https://api.cypress.io/exceptions with params: {"body":{"err":{"name":"Error","message":"could not find CRI target","stack":"Error: could not find CRI target\n at lazyAssLogic (<stripped-path>index.js:110:14)\n at lazyAss (<stripped-path>index.js:115:28)\n at <stripped-path>protocol.js:81:5\n at tryCatcher (<stripped-path>util.js:16:23)\n at Promise._settlePromiseFromHandler (<stripped-path>promise.js:547:31)\n at Promise._settlePromise (<stripped-path>promise.js:604:18)\n at Promise._settlePromise0 (<stripped-path>promise.js:649:10)\n at Promise._settlePromises (<stripped-path>promise.js:729:18)\n at _drainQueueStep (<stripped-path>async.js:93:12)\n at _drainQueue (<stripped-path>async.js:86:9)\n at Async._drainQueues (<stripped-path>async.js:102:5)\n at Immediate.Async.drainQueues [as _onImmediate] (<stripped-path>async.js:15:14)\n at processImmediate (internal<stripped-path>timers.js:439:21)\n"},"version":"3.8.1","osName":"darwin","osVersion":"18.7.0","osCpus":[{"model":"Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz","speed":2800,"times":{"user":2345640,"nice":0,"sys":1432990,"idle":7241720,"irq":0}},{"model":"Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz","speed":2800,"times":{"user":297000,"nice":0,"sys":200760,"idle":10522090,"irq":0}},{"model":"Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz","speed":2800,"times":{"user":2085650,"nice":0,"sys":1055880,"idle":7878330,"irq":0}},{"model":"Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz","speed":2800,"times":{"user":295360,"nice":0,"sys":182810,"idle":10541680,"irq":0}},{"model":"Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz","speed":2800,"times":{"user":1898740,"nice":0,"sys":905540,"idle":8215580,"irq":0}},{"model":"Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz","speed":2800,"times":{"user":296530,"nice":0,"sys":170750,"idle":10552570,"irq":0}},{"model":"Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz","speed":2800,"times":{"user":1686060,"nice":0,"sys":767000,"idle":8566800,"irq":0}},{"model":"Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz","speed":2800,"times":{"user":298300,"nice":0,"sys":161060,"idle":10560500,"irq":0}}],"osMemory":{"free":1325580288,"total":17179869184}},"headers":{"x-os-name":"darwin","x-cypress-version":"3.8.1"}} and token: undefined +0ms
cypress:network:agent addRequest called { isHttps: true, href: 'https://api.cypress.io/exceptions' } +3s
cypress:network:connect beginning getAddress { hostname: 'api.cypress.io', port: 443 } +36ms
cypress:server:cypress about to exit with code 1 +25ms
cypress:cli child event fired { event: 'exit', code: 1, signal: null } +3m
cypress:cli child event fired { event: 'close', code: 1, signal: null } +0ms
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Tail end of logs for me where I see the error.
Can confirm the error is flaky. After trying a few times it will eventually run.
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.
Possibly related to https://github.com/cypress-io/cypress/pull/5960
Downgrading to Cypress 3.8.0 solved the issue for me, look like this issue introduced in the latest version (3.8.1)
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.
Also having this issue... making a post so I can follow and see if this will be resolved. I am in the same boat where 1/2 of the tests fail with this error.
Not quite sure, but I have the impression that the issue appears when another Chrome session is active during the test run. When I close chrome and keep it closed during a 'cypress run', everything runs fine (Windows 10).
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.)
<offtopic>
making a post so I can follow and see if this will be resolved
@hunghau there's the "Subscribe" button for that purpose:
</offtopic>
You are right @sebinsua. I also got the issue in our OpenShift Jenkins pipeline (Linux)
I am having this issue after update to 3.8.1, any news?
I'm locally getting this error, randomly. Sometimes it runs fine, sometimes it doesn't.
It can happen at any given time, but always between switching spec files, never within a test (so it either boots or not, basically).
I am getting the same error while running headless tests (it happens randomly while spec file is switching to another one)
This line of code is ending up evaluating as not defined.
https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/browsers/protocol.js#L79:L79
Another relevant thread: https://github.com/cypress-io/cypress/issues/5966
@fr0 There are 2 flags for the same thing for convenience. You should never need to pass both.
This line of code is ending up evaluating as not defined.
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.
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
agree with @flotwig in #6053 (comment) - 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
I just tried to load CPU 100% (stress --cpu 8
on Ubuntu) and run cypress run --headless --browser chrome
to reproduce the issue. Unfortunately, no luck.
when I do the following
$ docker run -it -v $PWD:/e2e -w /e2e -e DEBUG=cypress:server:protocol --entrypoint=cypress --cpus=0.07 cypress/included:3.8.1 run --browser chrome
I get slightly confusing output
Running: spec.js (1 of 1)
cypress:server:protocol Getting WS connection to CRI on port 41799 +0ms
Failed to connect to Chrome, retrying in 1 second (attempt 18/32)
Failed to connect to Chrome, retrying in 1 second (attempt 19/32)
Failed to connect to Chrome, retrying in 1 second (attempt 20/32)
Failed to connect to Chrome, retrying in 1 second (attempt 21/32)
Failed to connect to Chrome, retrying in 1 second (attempt 22/32)
Failed to connect to Chrome, retrying in 1 second (attempt 23/32)
cypress:server:protocol CRI.List on port 41799 +13s
cypress:server:protocol CRI List { numTargets: 1, targets: [ { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:41799/devtools/page/314FB11F92321CD59AE09BE29723A445', id: '314FB11F92321CD59AE09BE29723A445', title: '', type: 'page', url: 'about:blank', webSocketDebuggerUrl: 'ws://localhost:41799/devtools/page/314FB11F92321CD59AE09BE29723A445' } ] } +3s
cypress:server:protocol found CRI target { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:41799/devtools/page/314FB11F92321CD59AE09BE29723A445', id: '314FB11F92321CD59AE09BE29723A445', title: '', type: 'page', url: 'about:blank', webSocketDebuggerUrl: 'ws://localhost:41799/devtools/page/314FB11F92321CD59AE09BE29723A445' } +3ms
Timed out waiting for the browser to connect. Retrying...
cypress:server:protocol Getting WS connection to CRI on port 34429 +41s
Timed out waiting for the browser to connect. Retrying again...
Failed to connect to Chrome, retrying in 1 second (attempt 18/32)
Failed to connect to Chrome, retrying in 1 second (attempt 19/32)
Failed to connect to Chrome, retrying in 1 second (attempt 20/32)
Failed to connect to Chrome, retrying in 1 second (attempt 21/32)
Failed to connect to Chrome, retrying in 1 second (attempt 22/32)
Failed to connect to Chrome, retrying in 1 second (attempt 23/32)
Failed to connect to Chrome, retrying in 1 second (attempt 24/32)
Failed to connect to Chrome, retrying in 1 second (attempt 25/32)
Failed to connect to Chrome, retrying in 1 second (attempt 26/32)
Failed to connect to Chrome, retrying in 1 second (attempt 27/32)
cypress:server:protocol Getting WS connection to CRI on port 36917 +18s
Failed to connect to Chrome, retrying in 1 second (attempt 28/32)
Failed to connect to Chrome, retrying in 1 second (attempt 29/32)
Failed to connect to Chrome, retrying in 1 second (attempt 30/32)
Failed to connect to Chrome, retrying in 1 second (attempt 31/32)
Failed to connect to Chrome, retrying in 1 second (attempt 32/32)
Failed to connect to Chrome, retrying in 1 second (attempt 18/32)
Failed to connect to Chrome, retrying in 1 second (attempt 19/32)
Failed to connect to Chrome, retrying in 1 second (attempt 20/32)
Failed to connect to Chrome, retrying in 1 second (attempt 21/32)
Failed to connect to Chrome, retrying in 1 second (attempt 22/32)
Failed to connect to Chrome, retrying in 1 second (attempt 23/32)
Failed to connect to Chrome, retrying in 1 second (attempt 24/32)
Failed to connect to Chrome, retrying in 1 second (attempt 25/32)
The browser never connected. Something is wrong. The tests cannot run. Aborting...
Failed to connect to Chrome, retrying in 1 second (attempt 26/32)
Another run with limited CPU
$ docker run -it -v $PWD:/e2e -w /e2e -e DEBUG=cypress:server:protocol,cypress:server:browsers,cypress:server:cypress --entrypoint=cypress --cpus=0.07 cypress/included:3.8.1 run --browser chrome
Notice in the log below how it connects to CRI, but then it opens Chrome again - and that fails ...
Running: spec.js (1 of 1)
cypress:server:browsers getBrowserLauncherByFamily { family: 'chrome' } +2s
cypress:server:browsers opening browser { name: 'chrome', family: 'chrome', displayName: 'Chrome', version: '77.0.3865.90', path: 'google-chrome', majorVersion: 77, isHeadless: false, isHeaded: true } +304ms
cypress:server:protocol Getting WS connection to CRI on port 33475 +0ms
Failed to connect to Chrome, retrying in 1 second (attempt 18/32)
Failed to connect to Chrome, retrying in 1 second (attempt 19/32)
Failed to connect to Chrome, retrying in 1 second (attempt 20/32)
Failed to connect to Chrome, retrying in 1 second (attempt 21/32)
Failed to connect to Chrome, retrying in 1 second (attempt 22/32)
cypress:server:protocol CRI.List on port 33475 +11s
cypress:server:protocol CRI List { numTargets: 1, targets: [ { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:33475/devtools/page/C2FEE94906DC51DD742922DA25B2B14C', id: 'C2FEE94906DC51DD742922DA25B2B14C', title: '', type: 'page', url: 'about:blank', webSocketDebuggerUrl: 'ws://localhost:33475/devtools/page/C2FEE94906DC51DD742922DA25B2B14C' } ] } +2s
cypress:server:protocol found CRI target { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:33475/devtools/page/C2FEE94906DC51DD742922DA25B2B14C', id: 'C2FEE94906DC51DD742922DA25B2B14C', title: '', type: 'page', url: 'about:blank', webSocketDebuggerUrl: 'ws://localhost:33475/devtools/page/C2FEE94906DC51DD742922DA25B2B14C' } +1ms
Timed out waiting for the browser to connect. Retrying...
cypress:server:browsers getBrowserLauncherByFamily { family: 'chrome' } +30s
cypress:server:browsers opening browser { name: 'chrome', family: 'chrome', displayName: 'Chrome', version: '77.0.3865.90', path: 'google-chrome', majorVersion: 77, isHeadless: false, isHeaded: true } +1ms
cypress:server:protocol Getting WS connection to CRI on port 39085 +39s
Failed to connect to Chrome, retrying in 1 second (attempt 18/32)
Timed out waiting for the browser to connect. Retrying again...
cypress:server:browsers getBrowserLauncherByFamily { family: 'chrome' } +31s
cypress:server:browsers opening browser { name: 'chrome', family: 'chrome', displayName: 'Chrome', version: '77.0.3865.90', path: 'google-chrome', majorVersion: 77, isHeadless: false, isHeaded: true } +0ms
Failed to connect to Chrome, retrying in 1 second (attempt 19/32)
Failed to connect to Chrome, retrying in 1 second (attempt 20/32)
Failed to connect to Chrome, retrying in 1 second (attempt 21/32)
Failed to connect to Chrome, retrying in 1 second (attempt 22/32)
Failed to connect to Chrome, retrying in 1 second (attempt 23/32)
Failed to connect to Chrome, retrying in 1 second (attempt 24/32)
Failed to connect to Chrome, retrying in 1 second (attempt 25/32)
Failed to connect to Chrome, retrying in 1 second (attempt 26/32)
Failed to connect to Chrome, retrying in 1 second (attempt 27/32)
Failed to connect to Chrome, retrying in 1 second (attempt 28/32)
Failed to connect to Chrome, retrying in 1 second (attempt 29/32)
Failed to connect to Chrome, retrying in 1 second (attempt 30/32)
Failed to connect to Chrome, retrying in 1 second (attempt 31/32)
cypress:server:protocol Getting WS connection to CRI on port 46121 +23s
Failed to connect to Chrome, retrying in 1 second (attempt 32/32)
Failed to connect to Chrome, retrying in 1 second (attempt 18/32)
Failed to connect to Chrome, retrying in 1 second (attempt 19/32)
Failed to connect to Chrome, retrying in 1 second (attempt 20/32)
Failed to connect to Chrome, retrying in 1 second (attempt 21/32)
Failed to connect to Chrome, retrying in 1 second (attempt 22/32)
Failed to connect to Chrome, retrying in 1 second (attempt 23/32)
Failed to connect to Chrome, retrying in 1 second (attempt 24/32)
The browser never connected. Something is wrong. The tests cannot run. Aborting...
Running and loading React DevTools extension did not change things
Tip:
When Chrome is running you can see all CRI targets by simply asking the remote debugging interface port, like this
$ curl http://localhost:<port>/json/list
[ {
"description": "",
"devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:53740/devtools/page/F944F9CFDCC5511EC2A16C76D89B98EB",
"faviconUrl": "https://example.cypress.io/__cypress/static/favicon.ico",
"id": "F944F9CFDCC5511EC2A16C76D89B98EB",
"title": "cypress-test-tiny",
"type": "page",
"url": "https://example.cypress.io/__/#/tests/integration/spec.js",
"webSocketDebuggerUrl": "ws://localhost:53740/devtools/page/F944F9CFDCC5511EC2A16C76D89B98EB"
}, {
"description": "",
"devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:53740/devtools/page/DE6DAEF599F7784003CD97BF1195FEF5",
"id": "DE6DAEF599F7784003CD97BF1195FEF5",
"title": "Cypress",
"type": "background_page",
"url": "chrome-extension://caljajdfkjjjdehjdoimjkkakekklcck/_generated_background_page.html",
"webSocketDebuggerUrl": "ws://localhost:53740/devtools/page/DE6DAEF599F7784003CD97BF1195FEF5"
} ]
Ok, got the error on Mac
Then it failed to connect
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
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 & 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 & 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:
With above in mind, I found a way to recreate the problem as follows:
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
I have added a retry to CRI.List
function and it just worked - notice at first a single target, then the full list of targets
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 55358 +23s
cypress:server:protocol CRI.List on port 55358 +307ms
cypress:server:protocol CRI List { numTargets: 1, targets: [ { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/F17ED93D59773E63F289058D201626AE', id: 'F17ED93D59773E63F289058D201626AE', title: 'Sortify', type: 'background_page', url: 'chrome-extension://aehmpfeibpcclkbjjkclhncmjncpebef/_generated_background_page.html', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/F17ED93D59773E63F289058D201626AE' } ] } +90ms
cypress:server:protocol CRI.List on port 55358 +1s
cypress:server:protocol CRI List { numTargets: 11, targets: [ { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/7A79443ABF9802D8D98349F5BB3C62D5', id: '7A79443ABF9802D8D98349F5BB3C62D5', title: 'about:blank', type: 'page', url: 'about:blank', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/7A79443ABF9802D8D98349F5BB3C62D5' }, { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/A2849D5CD61143AA40DB1DD2DEA203F1', id: 'A2849D5CD61143AA40DB1DD2DEA203F1', title: 'Tampermonkey', type: 'background_page', url: 'chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/background.html', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/A2849D5CD61143AA40DB1DD2DEA203F1' }, { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/D6D602AD35100720AA1078AED286C0E5', id: 'D6D602AD35100720AA1078AED286C0E5', title: 'Nimbus Screenshot & Screen Video Recorder', type: 'background_page', url: 'chrome-extension://bpconcjcammlapcogcnnelfmaeghhagj/background.html', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/D6D602AD35100720AA1078AED286C0E5' }, { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/7A340419A2188FA079681FD6233B4469', id: '7A340419A2188FA079681FD6233B4469', title: 'Honey', type: 'background_page', url: 'chrome-extension://bmnlcjabgnpnenekpadlanbbkooimhnj/_generated_background_page.html', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/7A340419A2188FA079681FD6233B4469' }, { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/5F03F9965DA48358A42DF90D82387923', id: '5F03F9965DA48358A42DF90D82387923', title: 'MEGA', type: 'background_page', url: 'chrome-extension://bigefpfhnfcobdlfbedofhhaibnlghod/_generated_background_page.html', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/5F03F9965DA48358A42DF90D82387923' }, { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/7A9D7645B6C162553B121F1BC70EADE7', id: '7A9D7645B6C162553B121F1BC70EADE7', title: 'ColorZilla', type: 'background_page', url: 'chrome-extension://bhlhnicpbhignbdhedgjhgdocnmhomnp/html/background.html', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/7A9D7645B6C162553B121F1BC70EADE7' }, { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/63D543F695666E9E4F23C3CFAFA0BAE0', id: '63D543F695666E9E4F23C3CFAFA0BAE0', title: 'Turn Off the Lights', type: 'background_page', url: 'chrome-extension://bfbmjmiodbnnpllbbbfblcplfjjepjdn/background.html', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/63D543F695666E9E4F23C3CFAFA0BAE0' }, { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/A725760B0BADC81635642277BDBCB66B', id: 'A725760B0BADC81635642277BDBCB66B', title: 'Destiny Item Manager Shortcut', type: 'background_page', url: 'chrome-extension://apghicjnekejhfancbkahkhdckhdagna/_generated_background_page.html', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/A725760B0BADC81635642277BDBCB66B' }, { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/2ACC2A5A10E7073F95918834063E884D', id: '2ACC2A5A10E7073F95918834063E884D', title: 'Workona', type: 'background_page', url: 'chrome-extension://ailcmbgekjpnablpdkmaaccecekgdhlh/_generated_background_page.html', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/2ACC2A5A10E7073F95918834063E884D' }, { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/58ED17DE9EA32B8E57EBAE966A3E80BA', id: '58ED17DE9EA32B8E57EBAE966A3E80BA', title: 'Talend API Tester - Free Edition', type: 'background_page', url: 'chrome-extension://aejoelaoggembcahagimdiliamlcdmfm/_generated_background_page.html', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/58ED17DE9EA32B8E57EBAE966A3E80BA' }, { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/F17ED93D59773E63F289058D201626AE', id: 'F17ED93D59773E63F289058D201626AE', title: 'Sortify', type: 'background_page', url: 'chrome-extension://aehmpfeibpcclkbjjkclhncmjncpebef/_generated_background_page.html', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/F17ED93D59773E63F289058D201626AE' } ] } +108ms
cypress:server:protocol found CRI target { description: '', devtoolsFrontendUrl: '/devtools/inspector.html?ws=localhost:55358/devtools/page/7A79443ABF9802D8D98349F5BB3C62D5', id: '7A79443ABF9802D8D98349F5BB3C62D5', title: 'about:blank', type: 'page', url: 'about:blank', webSocketDebuggerUrl: 'ws://localhost:55358/devtools/page/7A79443ABF9802D8D98349F5BB3C62D5' } +1ms
GET /__/ 200 0.849 ms - -
cypress:server:browsers browser opened +2s
@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 https://github.com/NeuraLegion/cypress-har-generator/issues/17#issuecomment-566208232
@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.
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
could not find CRI target
, so the good news is this is not just GitHub Action, but CircleCI as wellAlso added Chrome + Chrome headless test runs inside GitHub Actions in https://github.com/cypress-io/cypress-example-kitchensink/pull/346 to observe
The code for this is done in cypress-io/cypress#6133, but has yet to be released.
We'll update this issue and reference the changelog when it's released.
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.
@xdumaine We release every 2 weeks - so this should be released today (1/24/20) barring no complications with the release.
Friday releases. Classic :laughing:
Released in 3.8.3
.
This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v3.8.3, please open a new issue.
Most helpful 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.