cypress: Dependencies missing while using your docker image
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
up to date in 1.239s
It looks like this is your first time using Cypress: 2.1.0
[21:26:18] Verifying Cypress can run /usr/src/app/node_modules/cypress/dist/Cypress [started]
[21:26:19] Verifying Cypress can run /usr/src/app/node_modules/cypress/dist/Cypress [failed]
[21:26:19] → Cypress failed to start.
This is usually caused by a missing library or dependency.
The error below should indicate which dependency is missing.
https://on.cypress.io/required-dependencies
If you are using Docker, we provide containers with all required dependencies installed.
----------
----------
Platform: linux (Debian - 8.10)
Cypress Version: 2.1.0
Cypress failed to start.
This is usually caused by a missing library or dependency.
The error below should indicate which dependency is missing.
https://on.cypress.io/required-dependencies
If you are using Docker, we provide containers with all required dependencies installed.
----------
----------
Platform: linux (Debian - 8.10)
Cypress Version: 2.1.0
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
- Operating System: ubuntu 14.04
- Cypress Version: 2.1.0
- Browser Version: headless
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 33 (9 by maintainers)
I’m finally able to resolve my issue and now Cypress is working fine for me.
Following environment variable was being set DISPLAY=:1.5
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:
echo $DISPLAYPlease try unsetting the
NODE_OPTIONSenvironment variable if you have this set - as this causes Cypress to crash. This is due to an Electron bug prior to version 2.0.3, where havingNODE_OPTIONSset causes either a failure or arguments to be ignored. https://github.com/electron/electron/issues/12695#issuecomment-385826834To see all environment variables currently set
MacOS / Linux
Windows
To unset
NODE_OPTIONSenvironment variableMacOS / Linux
Windows
We have open issues for this being fixed that you can follow here:
NODE_OPTIONSshould not exit0: https://github.com/cypress-io/cypress/issues/1676We’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
openandrundon’t work either. I’ve tried uninstalling/reinstalling, doingyarn cache clean, deleting node_modules and doing a fresh install altogether, even tried installing previous version 3.0.3, but nothing has seemed to get this running again. Is there any workaround or solution for this?Thank you!
I’m also facing the same issue:
Could you please provide a solution to this ?
The problem is with how I placed the images for docker. The cypress image needs to be first
Not docker related but I fixed this error by unsetting the
NODE_OPTIONSvar. https://github.com/cypress-io/cypress/issues/2431#issuecomment-418524647