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 for Testing - we can't run your tests #28554

Open
alexsch01 opened this issue Dec 19, 2023 · 10 comments
Open

Chrome for Testing - we can't run your tests #28554

alexsch01 opened this issue Dec 19, 2023 · 10 comments

Comments

@alexsch01
Copy link
Contributor

alexsch01 commented Dec 19, 2023

Current behavior

npx cypress run --browser ~/chrome120/chrome --headed --no-exit

image
image

Chrome for Testing version: 120.0.6099.109 from https://alexsch01.github.io/chromefortesting/

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

@alexsch01 alexsch01 changed the title ChromeForTesting - This browser was not launched through Cypress. ChromeForTesting - we can't run your tests Dec 19, 2023
@alexsch01 alexsch01 changed the title ChromeForTesting - we can't run your tests Chrome For Testing - we can't run your tests Dec 19, 2023
@alexsch01
Copy link
Contributor Author

alexsch01 commented Dec 20, 2023

Related: #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 alexsch01 changed the title Chrome For Testing - we can't run your tests Chrome for Testing - we can't run your tests Dec 20, 2023
@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Dec 21, 2023

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

image

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

image

@MikeMcC399
Copy link
Contributor

@alexsch01
Copy link
Contributor Author

alexsch01 commented Jan 23, 2024

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

@cypress-app-bot
Copy link
Collaborator

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.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Jul 22, 2024
@alexsch01
Copy link
Contributor Author

Still happening

@MikeMcC399
Copy link
Contributor

@cypress-app-bot cypress-app-bot removed the stale no activity on this issue for a long period label Jul 23, 2024
@Roemer
Copy link
Contributor

Roemer commented Jul 24, 2024

Pitty, I am now running into the same issue.

@lancefaler
Copy link

I am running into this issue as well.

@MikeMcC399
Copy link
Contributor

This issue prevents using browser-actions/setup-chrome in GitHub Actions to install an alternate version of Chrome, since the action installs Chrome for Testing, which fails to run with Cypress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants