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

Cypress 5.2.0 : Unable to make a connection to chrome browser #8674

Closed
nids2307 opened this issue Sep 25, 2020 · 9 comments · Fixed by #14348
Closed

Cypress 5.2.0 : Unable to make a connection to chrome browser #8674

nids2307 opened this issue Sep 25, 2020 · 9 comments · Fixed by #14348
Labels
topic: CDP connection Issue with connection to Chrome DevTools Protocol type: bug

Comments

@nids2307
Copy link

nids2307 commented Sep 25, 2020

Current behavior

cypress run fails in jenkins pipeline with the following error on Chrome:

Failed to connect to Chrome, retrying in 1 second (attempt 60/62)
Failed to connect to Chrome, retrying in 1 second (attempt 61/62)
Failed to connect to Chrome, retrying in 1 second (attempt 62/62)
Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds.

This usually indicates there was a problem opening the Chrome browser.
The CDP port requested was 41142.
Error details:
error Command failed with exit code 1.

Note that this doesn't appear to be 100% consistent. I saw it in the past and now have been seeing it again for the last 4 days.

We had previously observed this before, and upgraded cypress version to 5.2.0. followed the steps given on issue #7450 but no luck. Seems like that issue is still open and I assume the fix is still outstanding.

Desired behavior

The tests should kick off successfully without the chrome browser error

Test code to reproduce

Tried the following based on the inputs from one of the users
@nids2307 try below code in Plugins/index.js its working

 module.exports = (on, config) => {
  on('before:browser:launch', (browser, launchOptions) => {
    if (browser.name === 'chrome' && browser.isHeadless) {
      launchOptions.args.push('--disable-gpu');
      return launchOptions
    }
  });
}

Versions

Cypress: 5.0.0 as well as 5.2.0
Browser: Chrome 83
OS: Windows 10

@gustawx
Copy link

gustawx commented Oct 2, 2020

Not only in Jenkins. I experience this issue frequently on my laptop

@muzahir-12
Copy link

How to deal with that if this is so that way

@imdoroshenko
Copy link

I still have this issue in my CircleCI pipeline using 5.2.0. '--disable-gpu' makes no difference.

@Supanovas
Copy link

I have exactly the same issue, no known resolution yet.

@jennifer-shehane jennifer-shehane added topic: CDP connection Issue with connection to Chrome DevTools Protocol type: bug labels Nov 3, 2020
@dvkruchinin
Copy link

'--disable-gpu' not help. The error still occurs. Checked in travis-ci. Cypress version 5.3.0, 6.0.0.

@suhong-kooboo
Copy link

I still get this issue with Cypress 6.1.0

@rocwong-cn
Copy link

Cypress 6.2.1 still has this issue, and '--disable-gpu' makes no difference.

@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: work in progress and removed stage: work in progress stage: needs review The PR code is done & tested, needs review labels Jan 11, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 19, 2021

The code for this is done in cypress-io/cypress#14348, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 20, 2021

Released in 6.3.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v6.3.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: CDP connection Issue with connection to Chrome DevTools Protocol type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants