Skip to content

Custom firefox image doesn't work anymore #1339

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

Closed
SamTV12345 opened this issue May 5, 2025 · 5 comments
Closed

Custom firefox image doesn't work anymore #1339

SamTV12345 opened this issue May 5, 2025 · 5 comments
Assignees

Comments

@SamTV12345
Copy link

I have checked out your repository and adapted some of the values to our own configuration.

CYPRESS_VERSION='13.6.5'
`FIREFOX_VERSION='128.10.0esr'`

After that I rebuilt the images with docker compose build and only pushed the included image.
In the pipeline the first two test runs succesfully and then I just get

Timed out waiting for the browser to connect. Retrying...
Timed out waiting for the browser to connect. Retrying again...
The browser never connected. Something is wrong. The tests cannot run. Aborting...
The browser never connected. Something is wrong. The tests cannot run. Aborting...

This only happens for Firefox. The electron build just runs through without an issue. Of course this doesn't really help because the frontends should be tested with this exact ESR version. In another pipeline I got the error that XDG_RUNTIME_DIR is not defined. I defined them manually to /tmp but this resulted in the warning going away but the above errors were still printed and the test was hanging and failed eventually.

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented May 5, 2025

@SamTV12345

There were several fixes for Cypress 13.x working with Firefox after the version you are using.

Please check the Cypress release notes for later versions of Cypress and update your version of Cypress. Cypress 13.17.0 is the last Cypress 13.x version before the release of Cypress 14.

Cypress 13.6.5 is an older Cypress version released in February 2024, so it is missing some Firefox fixes.

Firefox 128 was released in July 2024. Although the ESR versions have monthly patch updates, they are still based on the original release.

(Note: to get full Firefox compatibility for later versions, you would need to migrate to Cypress 14.x. This may be relevant when the ESR version is refreshed later this year.)

@MikeMcC399 MikeMcC399 self-assigned this May 5, 2025
@MikeMcC399
Copy link
Collaborator

The XDG_RUNTIME_DIR message is a so-called "garbage error" and can be ignored.

It was suppressed in Cypress 14.0.1

@MikeMcC399
Copy link
Collaborator

To test Firefox ESR you can also use examples/firefox-esr which takes the Debian Firefox ESR package instead of downloading from the Firefox location.

@SamTV12345
Copy link
Author

Thanks for the answer. So I will try to bump to 13.17.0 and hope that test will then run smoothly. The issue with our own fork was that the original 13.6.5 uses Node 20.11.0 and it's very dated. Because we then had a version clash of the npm version old vs latest Node version we decided to create our own image. I'll report back what the solution was. :)

@MikeMcC399
Copy link
Collaborator

@SamTV12345

The issue is reproducible by downgrading the example to your older Cypress version 13.6.5:

git clone https://github.com/cypress-io/cypress-docker-images
cd cypress-docker-images
cd examples/firefox-esr             # Use a pre-configured simple Cypress E2E project
npm install [email protected] -D
npm ci                              # Install all dependencies
cp cypress/e2e/spec.cy.js cypress/e2e/spec-copy.cy.js
docker build . -t test-firefox-esr  # Build a new image
docker run -it --rm --entrypoint bash test-firefox-esr -c "npx cypress run --browser firefox" # Run Cypress test using Firefox ESR
# the above fails
# now update Cypress
npm install [email protected] -D
docker run -it --rm --entrypoint bash test-firefox-esr -c "npx cypress run --browser firefox" # Run Cypress test using Firefox ESR
# the later version of Cypress is successful

The issue is resolved by updating to a minimum Cypress 13.7 (this pulls in 13.7.3).

Since this is a known issue that can be resolved by updating Cypress and there is no action to take in this Docker repo, I am going to close the issue.

You are however welcome to report back your progress if you wish.

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

2 participants