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

Add Arm browsers to linux/arm64 Docker images #695

Closed
flotwig opened this issue Jun 30, 2022 · 29 comments
Closed

Add Arm browsers to linux/arm64 Docker images #695

flotwig opened this issue Jun 30, 2022 · 29 comments

Comments

@flotwig
Copy link
Contributor

flotwig commented Jun 30, 2022

Currently, the browsers and included image series do not ship with any browsers except --browser electron. The blocker is the lack of official support from browser vendors.

Users must manually find and install other Arm builds in order to use non-Electron browsers with the linux/arm64 images.

As browser vendors make official Arm builds available, Cypress should update existing linux/arm64 images to include them.

Upstream tracking issues:

@Elwazer007
Copy link

does cypress/base:14.7.0 support arm/64 arch ? if not is any of the base images does ? I always see the warning that IMAGE MAY HAVE POOR PERFORMANCE, OR FAIL, IF RUN VIA EMULATION when trying to run a container which has base image from cypress

@flotwig
Copy link
Contributor Author

flotwig commented Jul 13, 2022

@Elwazer007 none of the cypress images do yet. but look out for #700 to merge soon and close #431

@FarhanShoukat
Copy link

Why not include chromium? Chromium has a package for ARM on linux.

@flotwig
Copy link
Contributor Author

flotwig commented Nov 2, 2022

@FarhanShoukat I recommend building a Docker image off of our images that includes Chromium. We chose not to ship an Arm image with Chromium for a few reasons:

a. It would require users to use a different invocation on Arm vs. on non-Arm (--browser chromium vs --browser chrome).
b. This issue is a temporary condition, that will be resolved once upstream browser vendors build for Arm, at which point we will re-issue the browsers images on Arm.
c. It's not difficult for users to build their own images that include Chromium if they really need to test on a non-Electron browser on M1/other Arm environments.

@FarhanShoukat
Copy link

@flotwig thank you for your response. I have already built my based on node. It made sense because I don't really extra stuff like electron.
It was just a suggestion that maybe have an image with Chromium as well. We already have images with Chrome, Firefox and Edge. Chromium would a good addition in my opinion.

@kedare
Copy link

kedare commented Feb 24, 2023

But why not use Chromium instead of Google Chrome everywhere ?

@mjhenkes
Copy link
Member

mjhenkes commented Mar 1, 2023

With our new cypress/factory pattern we could add a chromium install script but not install it by default in the browsers image to avoid making the cypress/browsers or cypress/included images larger.

I'd definitely be open to a contribution on this.

@deser
Copy link

deser commented Mar 13, 2023

Seems running with --platform linux/amd64 helps. Read more there: https://docs.docker.com/build/building/multi-platform/

@nejch
Copy link

nejch commented Mar 30, 2023

@deser could you elaborate on how you got that to work with --plaftorm linux/amd64? Do you mean you were able to run cypress/included x64 containers on an ARM host/workstation?

I have a few colleagues who'd like to run this on an M1 mac and get a segfault.

@hongdeyuan
Copy link

I also need chrome for arm architecture, any progress?

@agrauch
Copy link

agrauch commented May 16, 2023

@nejch I got Chrome to run on an M1 Mac by enabling Rosetta 2 emulation and using --platform linux/amd64.

Install Rosetta 2 with softwareupdate --install-rosetta
Enable Rosetta emulation by following these instructions
Start a container docker run --rm --platform linux/amd64 cypress/included:latest --e2e --browser chrome

@danepowell
Copy link

But why not use Chromium instead of Google Chrome everywhere ?

I don't think this question has been adequately answered. I would understand the argument that Chromium is too much of a burden if it's only going to be a stopgap, but why shouldn't it replace Chrome permanently?

Google themselves say that you shouldn't use Chrome for testing. (ignore the fact that they recommend their new tool, Chrome for Testing, instead of Chromium 😄 )

@re-thc
Copy link

re-thc commented Aug 15, 2023

b. This issue is a temporary condition

@flotwig how temporary is temporary when this issue has already been opened for a year with no fix in sight?

@t-ashraf
Copy link

Any update on this issue?

@SunStupic
Copy link

SunStupic commented Jan 2, 2024

It's YEAR 4202 now! Any workaround here?

@enjikaka
Copy link

FROM cypress/factory

ARG NODE_VERSION='20.9.0'

WORKDIR /e2e

RUN apt update && apt install -y chromium
RUN npm install --save-dev cypress

Works for me on M2 to run in Chromium.

@maximegheraille
Copy link

Hi,

I recently moved to a M3 Macbook pro and I also have these issues. We run all of our test on firefox, chrome and edge.
It is very annoying to not be able to test locally via docker just because we use an arm architecture.

@MikeMcC399
Copy link
Collaborator

Chrome for Testing would also be interesting for Linux/arm64

@juniormichieletto
Copy link

Hi,

I recently moved to a M3 Macbook pro and I also have these issues. We run all of our test on firefox, chrome and edge. It is very annoying to not be able to test locally via docker just because we use an arm architecture.

Similar here.. :(
in our case, we have the tests running on Linux machine, Mac Intel and Mac M2..

@TonyBrobston
Copy link

FROM cypress/factory

ARG NODE_VERSION='20.9.0'

WORKDIR /e2e

RUN apt update && apt install -y chromium
RUN npm install --save-dev cypress

Works for me on M2 to run in Chromium.

This worked for us.

Pretty crazy just how easy it is to install Chromium and Cypress does not provide support on ARM 🤯 .

Big oof...

@MikeMcC399
Copy link
Collaborator

It seems like there is some movement for Firefox

@cw-sarvesh
Copy link

I'm experiencing the same issue with ARM. I installed Chromium for Cypress included, but many test cases that passed on Chrome are failing. This issue is major when switching from Chrome to Chromium.

@MikeMcC399
Copy link
Collaborator

@cw-sarvesh

I'm experiencing the same issue with ARM. I installed Chromium for Cypress included, but many test cases that passed on Chrome are failing. This issue is major when switching from Chrome to Chromium.

Are you comparing testing with Cypress using

  • Chrome on a Cypress Docker image with Linux/amd64 compared to
  • Chromium on a Cypress Docker image with Linux/arm64?

If that is not correct, what are the different environments for your comparison?

@cw-sarvesh
Copy link

cw-sarvesh commented Aug 9, 2024

@cw-sarvesh

I'm experiencing the same issue with ARM. I installed Chromium for Cypress included, but many test cases that passed on Chrome are failing. This issue is major when switching from Chrome to Chromium.

Are you comparing testing with Cypress using

  • Chrome on a Cypress Docker image with Linux/amd64 compared to
  • Chromium on a Cypress Docker image with Linux/arm64?

If that is not correct, what are the different environments for your comparison?

Yes @MikeMcC399

  1. Cypress with Chrome Linux/amd64 with Chromium Linux/arm64 ( Both major version 120) ( For Chrome AMD test cases pass but for Chromium it failed)

@MikeMcC399
Copy link
Collaborator

@cw-sarvesh

Cypress with Chrome Linux/amd64 with Chromium Linux/arm64 ( Both major version 120) ( For Chrome AMD test cases pass but for Chromium it failed)

The request Chrome on Linux/arm64 is still open in the Chromium organization.

I don't think that this repository can help with compatibility issues of Cypress with Chromium on arm64, however if you think you have found a bug with Cypress, you can report this on https://github.com/cypress-io/cypress/issues.

@MikeMcC399
Copy link
Collaborator

Individual issues opened for better tracking and transparency:

@MikeMcC399
Copy link
Collaborator

examples/chromium is now available to demonstrate how to add the Debian Chromium package to Cypress Docker images.

Since this package is available for amd64 and arm64 for the bookworm (stable) version of Debian, which Cypress Docker images are currently based on, this allows building corresponding custom images.

image

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Aug 16, 2024

Similarly now for Firefox, examples/firefox-esr is available to demonstrate how to add the Debian Firefox ESR package to Cypress Docker images.

Since this package is available for amd64 and arm64 for the bookworm (stable) version of Debian, which Cypress Docker images are currently based on, this allows building corresponding custom images.

image

@MikeMcC399
Copy link
Collaborator

The generic request in this issue has been transferred to other issues (see above) for better tracking and visibility of the individual browsers, so to avoid duplication I'm closing this issue. Please follow now the other issues (#695 (comment)).

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