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.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:20
  • Comments:41 (20 by maintainers)

github_iconTop GitHub Comments

6reactions
erezrokahcommented, Jan 10, 2020

@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.

6reactions
limontecommented, Jan 7, 2020

<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>

Read more comments on GitHub >

github_iconTop Results From Across the Web

cypress-io/cypress - Gitter
Is anyone else hitting errors with Cypress and Chrome 79? Our tests have started failing after ... The error is Can't start server...
Read more >
Unable to run Cypress 9.7.0 tests in Firefox - Stack Overflow
This usually indicates there was a problem opening the Firefox browser. Error: could not find CRI target at lazyAssLogic. I am using Cypress ......
Read more >
kind – Known Issues - Kubernetes
Having problems with kind? This guide covers some known problems and solutions / workarounds. It may additionally be helpful to: check our issue...
Read more >
Docker Engine 18.09 release notes
Fixed an error where --network-rm would fail to remove a network. moby/moby# ... fails, resulting in curl/chrome unable to connect (connection refused):.
Read more >
How to File the FBAR Electronically - BSA E-Filing System
Our site requires use of the free Adobe Reader product to properly display our ... “Please wait, If this message is not eventually...
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