-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Firefox not found with root user and non-root $HOME #27121
Comments
@MikeMcC399 Thanks as usual for all the hard work documenting issues and creating excellent reproductions. It always makes it so easy to see what is happening. |
I reviewed the logs from the Github actions in the sample repo from @MikeMcC399 and can see the different behaviors. Here are several related issues/PRs:
|
The Firefox detection issue by Cypress is reproducible without GitHub Actions in a local Docker container. Cypress fails to find the Firefox browser if the user is Firefox reports:
Cypress incorrectly reports:
Steps to reproduceEnvironment: Docker desktop git clone https://github.com/cypress-io/cypress-docker-images
cd cypress-docker-images/factory/test-project
docker run -it --rm -v .:/e2e -w /e2e --entrypoint bash cypress/included
firefox --version
cypress info
export HOME=/home/node
firefox --version
cypress run --browser firefox Logs
SuccessUser is
FailureUser is still
|
I originally submitted this as a feature request. Possibly it should be classed as a bug? |
What would you like?
If an attempt is made to run Cypress against the Mozilla Firefox browser in a Cypress Docker container runner under GitHub Actions when the user is
root
Cypress should log the error message from Firefox:"Running Firefox as root in a regular user's session is not supported. ($HOME is /github/home which is owned by uid 1001.)"
This is the error message which is produced when
firefox --version
is executed directly in a GitHub Actions workflow.
Cypress however outputs the message:
"Browser: firefox was not found on your system or is not supported by Cypress."
Why is this needed?
The message "firefox was not found on your system" is misleading. This message is output even though Firefox is installed.
The resolution necessary is to use the GitHub Actions
jobs.<job_id>.container.options
with--user 1001
to match the ownership of the$HOME
directory.Other
Repo https://github.com/MikeMcC399/cy-firefox-docker demonstrates this issue using
cypress/browsers:latest
See .github/workflows/firefox.yml
Debug logs
https://github.com/MikeMcC399/cy-firefox-docker/actions/workflows/firefox-debug.yml
The text was updated successfully, but these errors were encountered: