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

docs: adding in information on running firefox in a container in the README #938

Closed

Conversation

alexjyong
Copy link

Ran into an issue with running tests in a container with firefox.

Googling around led me to this:

cypress-io/cypress-docker-images#85 (comment)

Firefox cannot be ran as root, and the images are ran as root, so folks will need to specify a non-root user to make this work properly.

Ran into an issue with running tests in a container with firefox. 

Googling around led me to this:

cypress-io/cypress-docker-images#85 (comment)

Firefox cannot be ran as root, and the images are ran as root, so folks will need to specify a non-root user to make this work properly.
@CLAassistant
Copy link

CLAassistant commented Jun 7, 2023

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link

@MikeMcC399
Copy link
Collaborator

During staged rollout of a new GitHub-hosted runner version, GitHub may provide a mixture of current and new image versions used by the container matrix. It is recommended to use a Docker image in the parallel job run which avoids any Cypress Cloud errors due to browser major version mismatch from the two different image versions. A Docker image is not necessary if testing against the default built-in Electron browser because this browser version is fixed by the Cypress version in use and it is unaffected by any GitHub runner image rollout

@MikeMcC399
Copy link
Collaborator

@alexjyong

Please refer also to CONTRIBUTING. The commit message and PR subject should start with:

docs:

@alexjyong alexjyong changed the title Adding in information on running firefox in a container in the README docs: adding in information on running firefox in a container in the README Jun 8, 2023
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@MikeMcC399 MikeMcC399 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown syntax and grammar should be corrected.

There are some other suggestions I added in-line.

I'm wondering if this can be better covered directly in the Cypress Docker repo with a link from here into the main Cypress Docker repo (cypress-docker-images).

Also since --user 1001 seems to work not only for Firefox, but also for Chrome and Edge, could this just be documented as the standard way to use a Cypress Docker image in GitHub Actions? Or are there some negative side-effects to doing this? If --user 1001 can be used for all browsers then it wouldn't need a special example for Firefox. You could just say --user 1001 is required for Firefox and optional for other browsers.

@alexjyong
Copy link
Author

Markdown syntax and grammar should be corrected.

There are some other suggestions I added in-line.

I'm wondering if this can be better covered directly in the Cypress Docker repo with a link from here into the main Cypress Docker repo (cypress-docker-images).

Also since --user 1001 seems to work not only for Firefox, but also for Chrome and Edge, could this just be documented as the standard way to use a Cypress Docker image in GitHub Actions? Or are there some negative side-effects to doing this? If --user 1001 can be used for all browsers then it wouldn't need a special example for Firefox. You could just say --user 1001 is required for Firefox and optional for other browsers.

I'm currently using 1001 for all browsers since I found it wasn't needed to add in an if statement of sorts to only allow it for Firefox; it doesn't appear to break anything on the project I'm using it for.

However, my project is just one use-case, and there may be other use cases where passing in that --user 1001 may break things that I'm not aware of. It may be best just to specify it for Firefox, since Chrome and Edge work just fine without it.

@mschile
Copy link

mschile commented Jun 13, 2023

Hi @alexjyong 👋, thanks for taking the time to open this PR. I agree with @MikeMcC399 above and think that this documentation should probably be in the cypress-docker-images repo. Would you be willing to open a PR over there to resolve cypress-io/cypress-docker-images#871?

@alexjyong
Copy link
Author

alexjyong commented Jun 14, 2023 via email

@alexjyong
Copy link
Author

@mschile and @MikeMcC399 , I have created a PR here for your review. 😀

@MikeMcC399
Copy link
Collaborator

Hi @alexjyong

Thank you so much for your contributions in this area! In the meantime I've had some other interactions with users having difficulties with the Docker images and I have now suggested to make some changes to the README > Docker image example which don't involve adding an extra example for Firefox. You also confirmed that --user 1001 can be used with all browsers and I went back and retested so that I could confirm this. So my new PR #992 would replace this PR if it gets accepted.

I still have some questions about self-hosted runners, where users have reported issues. That is up in the air because the users who reported the issues did not follow through in detail and I don't have a self-hosted runner to test on.

@MikeMcC399
Copy link
Collaborator

@alexjyong

@alexjyong
Copy link
Author

@alexjyong

* Would you like to close this PR now? 

This PR in particular? If nothing else, I can close this out unless we want to poke at something else?

@MikeMcC399
Copy link
Collaborator

@alexjyong

https://github.com/cypress-io/github-action#docker-image is now updated. It does not specifically refer to Firefox, instead it recommends always using options: --user 1001 and it links to your detailed description in https://github.com/cypress-io/cypress-docker-images#firefox-not-found which talks about the Firefox issues and how to resolve them.

Thanks once again!

@alexjyong alexjyong closed this Aug 18, 2023
@alexjyong
Copy link
Author

Resolved in cypress-io/cypress-docker-images#900

@MikeMcC399 MikeMcC399 added the documentation Improvements or additions to documentation label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants