-
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
Dependencies missing while using your docker image #1556
Comments
Hi, Can you paste your Dockerfile, please? How can it run locally in Docker but fail to run in Docker on CI? |
the cypress code is linked with a volume along with the node_modules
I was thinking maybe because it'sa remote server i mean with like no gui or anything gjusta server that our website is hosted on |
Alright i figured it out turns out i cant run cypress as an entrypoint but need to run it as part of the image but i was wondering why i couldn't run it as an entrypoint? |
I don't know why it would not work, but your Dockerfile does not specify it as entrypoint, no? |
my docker file is copying the shell file and ansible (as part of the deployment) is running the container with the shell file as an entrypoint
|
@bahmutov an alternative solution would be to use containers again but apparently there is a dependency that is missing from our remote host if there is a way to know which dependency that would solve everything |
any news about this? |
It is weird that it is not printing the required dependency, here is what happens in Debian 8.9
I should make an image based on Debian 8.10 to investigate |
So I verified that this image based on Debian 8.10 is working
and what you are showing
Please provide the Docker image that is causing the problem so I can recreate the problem in my Docker engine. |
i think the problem is the fact that i am running it on a server not on local machine i.e the server might have less dependencies sense it doesn't have any user interface it's just a terminal at the end if you can try it on something similar to this maybe? |
well, I see on CI you are using
? Can you make a repo with ALL arguments (replace environment variables with actual values), please, that I could run in my Docker container - because I have no way to say if anything is wrong by looking at this right now. |
@bahmutov i will do that tonight or tomorrow morning max :) thank you! |
@bahmutov sorry I couldnt get back to you on this because it was taking too logn and we had other tickets
I have ipc_mode set to host and network_mode as well also I upgraded the docker image i am usign to |
I'm also facing the same issue:
Could you please provide a solution to this ? |
We're having this issue as well. It was working fine on v3.1.0 for a while, but it's randomly stopped working both locally and on our CI env. Here's the log from me trying to run cypress locally:
Running Thank you! |
I'm finally able to resolve my issue and now Cypress is working fine for me. Following environment variable was being set Unsetting this variable solved my problem. I hope this help someone else as well. You can verify if you have value set in DISPLAY, by running the following command: |
Not docker related but I fixed this error by unsetting the |
This workaround did not help for me I added
gitlab-ci.yml fragment: e2e-tests:
image: cypress/base:10
scripts:
- export DISPLAY=:1.5
- DISPLAY=:1.5 CYPRESS_INSTALL_BINARY=http://prx01.infra.rkt/Cypress.zip $(npm bin)/cypress install
- npm run ci:mocks # faked backend background process
- npm run ci:start # dev static server background process
- npm ci && DISPLAY=:1.5 cypress verify && DISPLAY=:1.5 cypress run versions
|
having the same issue as well...
|
docker:
# specify the version you desire here
- image: circleci/node:10.8.0
- image: circleci/postgres:9.6
environment:
POSTGRES_USER: postgres
POSTGRES_DB: foodnome_dev
- image: redis
- image: cypress/base:10
environment:
TERM: xterm
DISPLAY: 1.5 steps:
- checkout
- restore_cache:
keys:
- v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
- v1-deps-{{ .Branch }}
- v1-deps
- run:
name: Install Dependencies
command: npm install
- save_cache:
key: v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
# cache NPM modules and the folder with the Cypress binary
paths:
- ~/.npm
- ~/.cache
- run: npm run cypress:run |
@leogoesger can you try omitting |
@flotwig I tried that before, and didn't work, and trying something new |
Please try unsetting the To see all environment variables currently setMacOS / Linuxprintenv WindowsSET To unset
|
The problem is with how I placed the images for docker. The cypress image needs to be first |
Can you help me? I am getting error when I build in bitbucket. This is my bitbucket-pipelines.yml image: atlassian/default-image:2
clone:
depth: 1 # include the last commit only
options:
max-time: 5
definitions:
caches:
yarncash-circleci: /home/circleci/.cache/yarn/v4/
#yarncash: /usr/local/share/.cache/yarn/
steps:
- step: &futureCode
name: Test potential future code
image: "circleci/node:8-browsers"
script:
- yarn cache dir
- '[ -z "$BITBUCKET_PR_DESTINATION_BRANCH" ] || (git fetch && git checkout $BITBUCKET_PR_DESTINATION_BRANCH && git merge $BITBUCKET_BRANCH && yarn install && yarn test-ci)'
artifacts:
- test-output/**
- step: &buildAndTest
name: Build and test code
image: "circleci/node:8-browsers"
caches:
- yarncash-circleci
script:
- yarn install
- yarn test-ci
artifacts:
- test-output/**
- build/**
pipelines:
pull-requests:
Qfeature/*:
- step:
name: Test potential future code
caches:
- yarncash-circleci
script:
- echo Testing the potential future code created if merging pull request \#$BITBUCKET_PR_ID from $BITBUCKET_BRANCH into $BITBUCKET_PR_DESTINATION_BRANCH
- git fetch && git checkout $BITBUCKET_PR_DESTINATION_BRANCH && git merge $BITBUCKET_BRANCH
- yarn install
- yarn test-ci
artifacts:
- ./test-output/*
branches:
develop:
- parallel:
- step: *buildAndTest
#- step: *futureCode
- step:
name: Deploy to demo.winenode.com
deployment: staging
script:
- apt-get update && apt-get install -y sshpass
- (echo "develop" && git --no-pager log -n 40 --pretty=format:'%cr [%h] %s' --abbrev-commit) > ./build/build.version
- sshpass -p $WINENODE_KEY ssh -t [email protected] "rm -fr ./demo ; exit"
- sshpass -p $WINENODE_KEY scp -r ./build/ [email protected]:/var/www/winenode.com/demo/
artifacts:
- ./test-output/*
feature/*:
- parallel:
- step: *buildAndTest
#- step: *futureCode
- step:
name: Deploy to testdemo.winenode.com
deployment: test
script:
- apt-get update && apt-get install -y sshpass
- (echo $BITBUCKET_BRANCH && git --no-pager log -n 40 --pretty=format:'%cr [%h] %s' --abbrev-commit) > ./build/build.version
- sshpass -p $WINENODE_KEY ssh -t [email protected] "rm -fr ./testdemo ; exit"
- sshpass -p $WINENODE_KEY scp -r ./build/ [email protected]:/var/www/winenode.com/testdemo/ I am not sure where shall I code related cypress installing. Please let me know solution. Thanks |
Hi. I am getting same issue - cypress start is failed Can you recreate my bitbucket-pipeline.yml? image: atlassian/default-image:2
clone:
depth: 1 # include the last commit only
options:
max-time: 5
definitions:
caches:
yarncash-circleci: /home/circleci/.cache/yarn/v4/
#yarncash: /usr/local/share/.cache/yarn/
steps:
- step: &futureCode
name: Test potential future code
image: "circleci/node:8-browsers"
script:
- yarn cache dir
- '[ -z "$BITBUCKET_PR_DESTINATION_BRANCH" ] || (git fetch && git checkout $BITBUCKET_PR_DESTINATION_BRANCH && git merge $BITBUCKET_BRANCH && yarn install && yarn test-ci)'
artifacts:
- test-output/**
- step: &buildAndTest
name: Build and test code
image: "circleci/node:8-browsers"
caches:
- yarncash-circleci
script:
- yarn install
- yarn test-ci
artifacts:
- test-output/**
- build/**
pipelines:
pull-requests:
Qfeature/*:
- step:
name: Test potential future code
caches:
- yarncash-circleci
script:
- echo Testing the potential future code created if merging pull request \#$BITBUCKET_PR_ID from $BITBUCKET_BRANCH into $BITBUCKET_PR_DESTINATION_BRANCH
- git fetch && git checkout $BITBUCKET_PR_DESTINATION_BRANCH && git merge $BITBUCKET_BRANCH
- yarn install
- yarn test-ci
artifacts:
- ./test-output/*
branches:
develop:
- parallel:
- step: *buildAndTest
#- step: *futureCode
- step:
name: Deploy to demo.winenode.com
deployment: staging
script:
- apt-get update && apt-get install -y sshpass
- (echo "develop" && git --no-pager log -n 40 --pretty=format:'%cr [%h] %s' --abbrev-commit) > ./build/build.version
- sshpass -p $WINENODE_KEY ssh -t [email protected] "rm -fr ./demo ; exit"
- sshpass -p $WINENODE_KEY scp -r ./build/ [email protected]:/var/www/winenode.com/demo/
artifacts:
- ./test-output/*
feature/*:
- parallel:
- step: *buildAndTest
#- step: *futureCode
- step:
name: Deploy to testdemo.winenode.com
deployment: test
script:
- apt-get update && apt-get install -y sshpass
- (echo $BITBUCKET_BRANCH && git --no-pager log -n 40 --pretty=format:'%cr [%h] %s' --abbrev-commit) > ./build/build.version
- sshpass -p $WINENODE_KEY ssh -t [email protected] "rm -fr ./testdemo ; exit"
- sshpass -p $WINENODE_KEY scp -r ./build/ [email protected]:/var/www/winenode.com/testdemo/ |
unsetting NODE_OPTIONS has no effect setting DISPLAY=:1.5 has no effect, too |
Currently the whole cypress is useless w/o ability to runing in CI |
Running into the same issue as of today, anyone has any workarounds? |
In order to better debug the failure to start on Linux, please follow this debugging section https://docs.cypress.io/guides/guides/debugging.html#Run-the-Cypress-app-by-itself Mostly we want to see if you have any missing dependencies or misconfigured XServer and running the application directly might reveal this. |
We will be closing this issue in favor of #4624 in order to direct better focus on the overall problem that is being described in several issues - please add any information about how we can reproduce this bug there. 🙏 |
Current behavior:
I am trying to integrate cypress into our deployment process and I am using one of the your docker images for that (base:8 also tried a chrome one) It runs perfectly on my laptop but when i am deploying to the server it gives this error
Desired behavior:
I want it to not fail
How to reproduce:
I am not sure maybe try to run it in a container on a remote server
The text was updated successfully, but these errors were encountered: