You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an attempt is made to run a Cypress Docker image using a non-root user that is not node (1000) then Cypress fails with:
Fontconfig error: No writable cache directories
The Test Runner unexpectedly exited via a exit event with signal SIGTRAP
This affects all Cypress Docker images (cypress/base, cypress/browsers, cypress/included & custom images generated from cypress/factory).
Note that GitHub Actions solves this issue exceptionally for user 1001 by mounting a separate writable /github/home directory and passing a HOME environment variable pointing to it.
In this example we use a customized Dockerfile which bases a new image on cypress/base, copies the complete Cypress project into the image, including installed dependencies, then installs the Cypress binary.
FROM cypress/base
COPY . /opt/app
WORKDIR /opt/app
RUN npx cypress install # Install Cypress binary into image
We build the new image, run the container from the image and execute the Cypress command npx cypress run to run the test:
cd examples/basic # Use a pre-configured simple Cypress E2E project
npm ci # Install Cypress
docker build . -f Dockerfile.base -t test-base # Build a new image
docker run -it --rm --entrypoint bash test-base -c "npx cypress run"# Run Cypress test in container
After confirming that the image can be run with the above docker run command, substitute the following command, which fails:
$ docker run -it --rm --entrypoint bash --env CYPRESS_SKIP_VERIFY=true --user 1001 test-base -c "npx cypress run" # Run Cypress test in container
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
The Test Runner unexpectedly exited via a exit event with signal SIGTRAP
Please search Cypress documentation for possible solutions:
https://on.cypress.io
Check if there is a GitHub issue describing this crash:
https://github.com/cypress-io/cypress/issues
Consider opening a new issue.
----------
Platform: linux-x64 (Debian - 12.8)
Cypress Version: 13.17.0
Issue
If an attempt is made to run a Cypress Docker image using a non-root user that is not
node
(1000
) then Cypress fails with:This affects all Cypress Docker images (
cypress/base
,cypress/browsers
,cypress/included
& custom images generated fromcypress/factory
).Note that GitHub Actions solves this issue exceptionally for user
1001
by mounting a separate writable/github/home
directory and passing aHOME
environment variable pointing to it.Steps to reproduce
Ubuntu
24.04.1
LTS, Node.js22.12.0
LTS, Docker Desktop4.37.1
,cypress/base
.Follow the instructions in Docker build and run for
cypress/base
as below:In this example we use a customized
Dockerfile
which bases a new image oncypress/base
, copies the complete Cypress project into the image, including installed dependencies, then installs the Cypress binary.The file is examples/basic/Dockerfile.base and it has the following contents:
We build the new image, run the container from the image and execute the Cypress command
npx cypress run
to run the test:After confirming that the image can be run with the above
docker run
command, substitute the following command, which fails:docker run -it --rm --env CYPRESS_SKIP_VERIFY=true --entrypoint bash --user 1001 test-base -c "npx cypress run"
Logs
Other
The text was updated successfully, but these errors were encountered: