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.
The tests should kick off successfully without the chrome browser error
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
}
});
}
Cypress: 5.0.0 as well as 5.2.0
Browser: Chrome 83
OS: Windows 10
Not only in Jenkins. I experience this issue frequently on my laptop
How to deal with that if this is so that way
I still have this issue in my CircleCI pipeline using 5.2.0. '--disable-gpu' makes no difference.
I have exactly the same issue, no known resolution yet.
'--disable-gpu' not help. The error still occurs. Checked in travis-ci. Cypress version 5.3.0, 6.0.0.
Most helpful comment
I still have this issue in my CircleCI pipeline using 5.2.0. '--disable-gpu' makes no difference.