-
Notifications
You must be signed in to change notification settings - Fork 388
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 tests fail in air-gapped network on Firefox #1298
Comments
Thanks for opening a new issue specifically for Docker! Here are the results of my analysis with a recommendation for you: SituationFirefox testing with Cypress fails in an air-gapped network environment. BackgroundThe npm package geckodriver by default dynamically downloads and caches an architecture-dependent geckodriver from GitHub. This default behavior requires an Internet connection, meaning that these images cannot be used in an air-gapped environment. AssessmentNone of the published Cypress Docker images, nor ones generated using To cover this situation in a general way would require making geckodriver into a parameter for The environment variable RecommendationIn order to reach a workable solution quickly, I suggest using a customized Docker image similar to Example Docker imageFirst in an environment with Internet connectivity: git clone https://github.com/cypress-io/cypress-docker-images
cd cypress-docker-images
cd examples/basic-mini Create a ARG FIREFOX_VERSION='135.0'
ARG CYPRESS_VERSION='14.0.2'
FROM cypress/factory
COPY . /opt/app
WORKDIR /opt/app
ENTRYPOINT ["cypress", "run"]
RUN GECKODRIVER_AUTO_INSTALL=1 npm install geckodriver --no-package-lock
RUN npm uninstall geckodriver Then execute: docker build -f Dockerfile.geckodriver -t test-firefox-included . Disconnect network and execute: docker run -it --rm -v .:/app -w /app --entrypoint cypress test-firefox-included run -b firefox |
Please give feedback if this suggestion is helpful to you. |
A workaround has been provided as an incident resolution. It does not however resolve the underlying problem that Cypress and Cypress Docker images testing Firefox require an Internet connection at some point in their setup stage. If you want to suggest any changes to regular Cypress Docker images or the factory build process for instance, please open a new issue as there would be additional topics that would need consideration. |
Current behavior
In an air gapped network, running a component or e2e tests using cypress on Firefox using the
cypress/included
docker image fails with the following error:This is likely a regression introduced in release
13.15.1
which started usinggeckodriver
.Desired behavior
I expect the test to run in an air gapped network. It should not send any request to the internet.
Test code to reproduce
Any test in Firefox in an air-gapped network.
Cypress Docker Image
cypress/included:14.0.2
Other
I also attempted to override the environment variables supported by geckodriver to use a local path
But it failed
node-fetch
does not supportfile:
.Related issue
cypress-io/cypress#31036
The text was updated successfully, but these errors were encountered: