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

Cypress hangs when run on Apple Silicon using linux/amd64 and Resetta amd64 emulation #1249

Closed
cgraham-rs opened this issue Nov 14, 2024 · 2 comments
Assignees
Labels

Comments

@cgraham-rs
Copy link

Cypress fails to run when executed on Apple M-series Mac using amd64 emulation.

Setup

  • On any M-series Macb
  • Open Docker Desktop Settings > Virtual Machine Options and enable Use Rosetta for x86_64/amd64 emulation on Apple Silicon
  • export DOCKER_DEFAULT_PLATFORM=linux/amd64
  • Delete any existing Cypress images using docker rmi {imageId} to ensure you pull fresh ones for the defined platform
  • Clone cypress-example-kitchensink

Follow the cypress-example-kitchensink instructions linked below.

  • cypress/base tests seem to start running but hang Running: 1-getting-started/todo.cy.js (1 of 20)
  • cypress/browsers hangs at DevTools listening on ws://127.0.0.1:42305/devtools/browser/8a4057a7-6b88-41f1-bde6-0907871b57fb
  • cypress/included hangs at DevTools listening on ws://127.0.0.1:41755/devtools/browser/d36620a0-a3ea-4387-a48b-b3e9e38cc911

Run unset DOCKER_DEFAULT_PLATFORM so we use the arm64 images "Architecture": "arm64", and delete all of the Cypress images to ensure you pull fresh ones for the defined platform

@cgraham-rs cgraham-rs changed the title Cypress hangs when run on Apple Silicon using linux/amd64 Cypress hangs when run on Apple Silicon using linux/amd64 and Resetta amd64 emulation Nov 14, 2024
@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Nov 15, 2024

@cgraham-rs

Thanks for reporting your experience with emulation!

You describe an issue where Cypress Linux/amd64 Docker images do not run correctly under Rosetta 2 emulation.

Docker Desktop known issues For Mac with Apple silicon describes some related issues and states:

In summary, running Intel-based containers on Arm-based machines should be regarded as "best effort" only.

image

Since the Cypress Linux/amd64 Docker images are generally working correctly in a native x86_64 / amd64 environment, it is difficult to imagine that there is any scope for the Cypress Docker images to influence how the emulation in an arm64 environment runs.

You may be able to get some assistance in the Docker Desktop for Mac repo or from Docker support if you are eligible. Do however consider the "best effort" statement from Docker above.

@MikeMcC399 MikeMcC399 added the bug label Nov 15, 2024
@MikeMcC399 MikeMcC399 self-assigned this Nov 15, 2024
@MikeMcC399
Copy link
Collaborator

The repo has no scope to resolve the emulation issue reported here.

@MikeMcC399 MikeMcC399 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants