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

Unable to run on Chrome: Chrome was not found on your system #714

Closed
MichaelRobsonSliide opened this issue Jul 26, 2022 · 9 comments
Closed

Comments

@MichaelRobsonSliide
Copy link

MichaelRobsonSliide commented Jul 26, 2022

I'm trying to run my Cypress tests locally using a docker image with this command:

docker run -it -v $PWD:/e2e -w /e2e cypress/included:10.3.1 --browser chrome

and I also tried

docker run -it -v $PWD:/e2e -w /e2e --entrypoint=cypress cypress/included:10.3.1 run --browser chrome

but it always fails saying Chrome was not found on my system, it then lists the supported browsers and says the only one it can find is Electron.

[406:0726/082851.866764:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[406:0726/082851.869468:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
Can't run because you've entered an invalid browser name.

Browser: chrome was not found on your system or is not supported by Cypress.

Cypress supports the following browsers:

  • electron
  • chrome
  • chromium
  • chrome:canary
  • edge
  • firefox

You can also use a custom browser: https://on.cypress.io/customize-browsers

Available browsers found on your system are:

  • electron

If I don't use Docker and just open the Cypress runner I can run my tests on Chrome, Firefox, Electron and Chromium without any issues.

If I'm reading it correctly should this 10.3.1 image come with FF Chrome and Edge? https://github.com/cypress-io/cypress-docker-images/tree/master/included

I tried some of the other version 10 images but keep getting the same issue.

I'm running on a MacBook iOS Monterey 12.4, I'm not doing anything different in my framework when it comes to the browser.

The version of Chrome I have installed on my laptop is
Version 103.0.5060.134 (Official Build) (arm64)

@krema
Copy link

krema commented Jul 29, 2022

Same for me

$ docker run -it --entrypoint=cypress cypress/included:10.3.1 info

[200:0729/090932.867635:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[200:0729/090932.880282:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
Displaying Cypress info...

Detected no known browsers installed


Proxy Settings: none detected
Environment Variables:
CYPRESS_CACHE_FOLDER: /root/.cache/Cypress

Application Data: /root/.config/cypress/cy/development
Browser Profiles: /root/.config/cypress/cy/development/browsers
Binary Caches: /root/.cache/Cypress

Cypress Version: 10.3.1 (stable)
System Platform: linux (Debian - 11.3)
System Memory: 8.23 GB free 7.29 GB

Found the reason:

https://github.com/cypress-io/cypress-docker-images/blob/master/browsers/node16.14.2-slim-chrome100-ff99-edge/Dockerfile#L48

RUN node -p "process.arch === 'arm64' ? 'Not downloading Chrome since we are on arm64: https://crbug.com/677140' : process.exit(1)" || 

@flotwig
Copy link
Contributor

flotwig commented Jul 29, 2022

Chrome is unfortunately not available on linux-arm64 yet: https://bugs.chromium.org/p/chromium/issues/detail?id=677140 It's just not built. You can try to use an unofficial build of Chromium, or just use --browser electron.

Closing as dupe of #695

@flotwig flotwig closed this as completed Jul 29, 2022
@giampaolo44
Copy link

giampaolo44 commented Dec 26, 2022

I'm sorry if this looks silly, but is this issue/solution (as far as this can be considered a solution) applicable only to arm64? I ask because I am running into the same error message on my Intel machine, having built a cypress/included:9.2.0 image with docker compose.

@rtgrrk
Copy link

rtgrrk commented Aug 8, 2023

@krema This got me on the right track, thank you

I got the same message with a docker build on a mac M1, 'Detected no known browsers installed'. However, building on a Linux distro gave an image with browsers installed

@sursseti
Copy link

@krema This got me on the right track, thank you

I got the same message with a docker build on a mac M1, 'Detected no known browsers installed'. However, building on a Linux distro gave an image with browsers installed

Please tell me how you finally launched the image on M1, what commands did you use?

@Kendru98
Copy link

Kendru98 commented Jan 5, 2024

Same for me, on Windows it works, but on Mac M1 nope. Is there a solution for this?

@todpale
Copy link

todpale commented Feb 22, 2024

Looks like there's no solution for M1. And nobody is really interested in it on the vendors side. The only way to start it is to use Rosetta which sounds meeeh.

UPD.:
At the same time, I can confirm that this solution works.

@rtgrrk
Copy link

rtgrrk commented Feb 23, 2024

@krema This got me on the right track, thank you
I got the same message with a docker build on a mac M1, 'Detected no known browsers installed'. However, building on a Linux distro gave an image with browsers installed

Please tell me how you finally launched the image on M1, what commands did you use?

M1 didn't work for me, but building on Linux worked fine. I used our server for this, but a VM will probably work.

@Yuri-Lima
Copy link

Yes, you all are right. I have just created a new VPS running Ubuntu and all Browsers were detected pretty much ok!!!!
I dont mind to use like that, but would be good to have support on Mac M1.... versions. Thank you!!
Screenshot 2024-03-13 at 22 47 03

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

No branches or pull requests

9 participants