Chrome for Testing - we can't run your tests
Current behavior
npx cypress run --browser ~/chrome120/chrome --headed --no-exit
Chrome for Testing version: 120.0.6099.109 from https://alexsch01.github.io/chromefortesting/
- I am using https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/120.0.6099.109/linux64/chrome-linux64.zip
Test code to reproduce
cypress/e2e/spec.cy.js
$ mkdir cypress
$ mkdir cypress/e2e
$ touch cypress/e2e/spec.cy.js
cypress.config.js
const { defineConfig } = require('cypress')
module.exports = defineConfig({
e2e: {
supportFile: false,
},
})
Cypress Version
13.6.1 **See Other
Node version
v20.10.0
Operating System
Linux 6.1.60 x86_64 GNU/Linux
Other
Same result testing with Cypress Version=10.0.0
Related: https://github.com/cypress-io/cypress/issues/28123
Definitely caused by the browser.majorVersion being equal to "for"
{
name: 'chrome',
family: 'chromium',
channel: 'stable',
displayName: 'Custom Chrome',
version: 'for',
path: 'PATH TO Chrome for Testing',
minSupportedVersion: 64,
majorVersion: 'for'
}
This allows user to launch browser with cypress open
const { defineConfig } = require("cypress");
module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
config.browsers.push({
name: 'chrome',
family: 'chromium',
channel: 'stable',
displayName: 'Custom Chrome',
version: 'for',
path: 'PATH TO Chrome for Testing',
minSupportedVersion: 64,
majorVersion: '120',
})
return config
},
},
});
@alexsch01
I was able to reproduce your issue on Ubuntu 22.04.
Cypress running under Windows 11 does not have a problem to test using Chrome for Testing, and the name of the browser is parsed differently:
So it seems you have put your finger on the cause of the issue on Linux when you note that the browser name and version is incorrectly parsed.
Compare to Ubuntu where the version number is missing
- PR https://github.com/cypress-io/cypress/pull/28243 would resolve this issue. Using this branch I was able to successfully run Cypress tests under Ubuntu 22.04 using Chrome for Testing
r120.0.6099.109installed withnpx @puppeteer/browsers install chrome@stable
const { defineConfig } = require("cypress");
module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
config.browsers.push({
name: 'cft',
family: 'chromium',
channel: 'stable',
displayName: 'Custom Chrome',
version: 'for',
path: 'PATH TO Chrome for Testing',
minSupportedVersion: 64,
majorVersion: '120',
})
return config
},
},
});
With the above, you can use npx cypress run --browser cft and it will launch correctly
- so it's not just for cypress open
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
Still happening
- The related PR https://github.com/cypress-io/cypress/pull/28243 has made no progress for many months
Pitty, I am now running into the same issue.