Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome headless fails with "Error: could not find CRI target" #5966

Closed
marmite22 opened this issue Dec 16, 2019 · 8 comments
Closed

Chrome headless fails with "Error: could not find CRI target" #5966

marmite22 opened this issue Dec 16, 2019 · 8 comments
Labels
type: duplicate This issue or pull request already exists

Comments

@marmite22
Copy link

Current behavior:

I'm running the command node_modules/.bin/cypress run -b chrome --headless -s './cypress/integration/003_website_settings/01_init.js' (the path to the test is not relevant)

I get the error Error: could not find CRI target

I have tried on my Macbook and also on our CI server (Ubuntu).

Running with debug env variable shows the following

image

I think the relevant part is:

  cypress:network:connect received error on connect, retrying { iteration: 0, delay: 100, err: Error: connect ECONNREFUSED 127.0.0.1:56319     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14) { errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 56319 } } +250ms
  cypress:network:connect successfully connected { opts: { getDelayMsForRetry: [Function: _getDelayMsForRetry], port: 56319 }, iteration: 1 } +104ms
  cypress:server:protocol CRI.List on port 56319 +106ms
  cypress:server:protocol CRI List { numTargets: 0, targets: [] } +37ms
  cypress:server:cypress exiting with err Error: could not find CRI target

Desired behavior:

I would like the test to run in a headless Chrome instance.

Steps to reproduce: (app code and test code)

Install and run cypress with a test (the contents of the test seem to be irrelevant as it fails before it starts running the test.

Versions

Chrome Version 79.0.3945.79
Cypress Version 3.8.0

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Dec 17, 2019

Possibly related: NeuraLegion/cypress-har-generator#17

From that issue, it may be related to a Chrome issue on macOS (https://bugs.chromium.org/p/chromium/issues/detail?id=994085).

Do you have any plugins or other setup? Maybe tapping into Chrome remote debugger?

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Dec 17, 2019
@marmite22
Copy link
Author

Thank you, removing my node modules folder and re-installing so that I got the up to date version of that dependency has fixed the issue.

@WinstonN
Copy link

I can confirm that I had to remove 3.8.1 cache folder, as well as my node_modules folder, and reinstall from scratch. After that the error went away

@jonsmithers
Copy link

jonsmithers commented Dec 26, 2019

I might be imagining things, but after fiddling with re-installing stuff, it seems to go away for a few runs, and then it comes back with the next yarn install. It seems very fickle. That might just be coming from yarn. I have no idea. I'm already playing around with yarn cache clean and yarn install --cache-folder=~/.custom-yarn-cache and not getting consistent behavior...

@erezrokah
Copy link

@jonsmithers I'm experiencing the same issue. yarn cache clean, removing node modules and cleaning Cypress cache didn't work. Very inconsistent.

@SharanyaRK
Copy link

I could experience the same while running in docker containers.

@jennifer-shehane jennifer-shehane removed the stage: needs information Not enough info to reproduce the issue label Dec 30, 2019
@jennifer-shehane
Copy link
Member

If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run since the original issue was resolved. There may be a specific edge case with the issue that we need more detail to fix.

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Dec 30, 2019
@jennifer-shehane
Copy link
Member

Duplicate of #6053

@jennifer-shehane jennifer-shehane marked this as a duplicate of #6053 Jan 9, 2020
@jennifer-shehane jennifer-shehane added the type: duplicate This issue or pull request already exists label Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

6 participants