Overview: I've created a very simple test spec that I wanted to get running in a CI-enabled Heroku pipeline. However, it seems to fail due to some xvfb configuration issues.
I tried different flavors of buildpacks and chrome and electron both.
When missing a dependency I would get an error message on the heroku dyno about the missing dependency (e.g. xvfb, etc). However, once all the dependencies were installed, I then got this message;
~ $ ./node_modules/.bin/cypress run
It looks like this is your first time using Cypress: 1.1.0
[04:28:22] Verifying Cypress can run /app/node_modules/cypress/dist/Cypress [started]
[04:28:22] Verifying Cypress can run /app/node_modules/cypress/dist/Cypress [failed]
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 using Docker, we provide containers with all required dependencies installed.
----------
----------
Platform: linux (Ubuntu Linux - 14.04)
Cypress Version: 1.1.0
on the advice of @brian-mann via your Gitter chat, I tried this command:
./node_modules/cypress/dist/Cypress/Cypress
However that produced no console output whatsoever.
Here's the heroku configuration I wound up with (after trying various buildpacks):
stack: cedar-14 (per heroku xvfb doesn't work with the new stack)
buildpack: https://github.com/heroku/heroku-buildpack-apt
Then I configured the Aptfile with these dependencies
xvfb
libgtk2.0-0
libnotify-dev
libgconf-2-4
libnss3
libxss1
libasound2
(copied out of your instructions).
I'm giving up on getting this running on heroku, but if you're having trouble recreating the situation, I could probably get something set up for you pretty quickly (the code part is trivial-- basically a hello world test.)
Hmm, can Heroku run based on a Docker image? We have cypress/base with dependencies, and it is very weird that Cypress running by itself produces no error output at all.
Resurrecting this because I just ran into this issue.
Here's my failed output:
-----> Running Node.js buildpack tests...
> [email protected] test /app
> cypress run --record --key [SNARF!]
It looks like this is your first time using Cypress: 1.4.1
[?25l[01:33:08] Verifying Cypress can run /app/node_modules/cypress/dist/Cypress [started]
[01:33:08] Verifying Cypress can run /app/node_modules/cypress/dist/Cypress [failed]
[?25hYour system is missing the dependency: XVFB
Install XVFB and run Cypress again.
Read our documentation on dependencies for more information:
https://on.cypress.io/required-dependencies
If you using Docker, we provide containers with all required dependencies installed.
----------
Caught error trying to run XVFB: "Your system is missing the dependency: XVFB
Install XVFB and run Cypress again.
Read our documentation on dependencies for more information:
https://on.cypress.io/required-dependencies
If you using Docker, we provide containers with all required dependencies installed.
----------
Error: spawn Xvfb ENOENT
----------
Platform: linux (Ubuntu Linux - 16.04)
Cypress Version: 1.4.1"
----------
Platform: linux (Ubuntu Linux - 16.04)
Cypress Version: 1.4.1
[?25hnpm ERR! Test failed. See above for more details.
-----> Node.js buildpack tests failed with exit status 1
@bahumtov I think Heroku supports Docker, not sure how to set it up though.
I'm not wed to Heroku though, is there a CI that Cypress recommends?
We are extensively using Circle, cannot recommend it high enough.
Sent from my iPhone
On Jan 17, 2018, at 20:35, Jon Abrams notifications@github.com wrote:
Resurrecting this because I just ran into this issue.
Here's my failed output:
-----> Running Node.js buildpack tests...
[email protected] test /app
cypress run --record --key [SNARF!]
It looks like this is your first time using Cypress: 1.4.1
�[?25l[01:33:08] Verifying Cypress can run /app/node_modules/cypress/dist/Cypress [started]
[01:33:08] Verifying Cypress can run /app/node_modules/cypress/dist/Cypress [failed]
�[?25hYour system is missing the dependency: XVFB
Install XVFB and run Cypress again.
Read our documentation on dependencies for more information:
https://on.cypress.io/required-dependenciesIf you using Docker, we provide containers with all required dependencies installed.
Caught error trying to run XVFB: "Your system is missing the dependency: XVFB
Install XVFB and run Cypress again.
Read our documentation on dependencies for more information:
https://on.cypress.io/required-dependenciesIf you using Docker, we provide containers with all required dependencies installed.
Error: spawn Xvfb ENOENT
Platform: linux (Ubuntu Linux - 16.04)
Cypress Version: 1.4.1"
Platform: linux (Ubuntu Linux - 16.04)
Cypress Version: 1.4.1
�[?25hnpm ERR! Test failed. See above for more details.
-----> Node.js buildpack tests failed with exit status 1
@bahumtov I think Heroku supports Docker, not sure how to set it up though.I'm not wed to Heroku though, is there a CI that Cypress recommends?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.
Our Drone CI threw the same error.
Any updates here?
I have not tried yet but I feel like these Nightmare set up instructions might actually help: https://github.com/oscarmorrison/nightmare-heroku. I'll give it a go soon if I can find a little bit of time. The problem, it is still relying on Cedar-14 that is deprecated and going away in early 2019, and using deprecated or unsupported build packs so not a good long-term solution.
I ended up using Codeship Basic, happy to share the details of the setup if needed. In the meantime I contacted Heroku supports to get their feedback on this.
EDIT: thx to Heroku support I found this: https://github.com/chap/cypress-heroku-ci
We have example project tested on Heroku CI, here is the app.json file https://github.com/cypress-io/cypress-example-kitchensink/blob/master/basic/app.json (Cypress v3.1.2)
Any plan of updating cypress to work with heroku-18 as cedar-14 will go away in april
@arshdeeptinna please open a new issue, since this seems unrelated to the original issue
@arshdeeptinna I have looked around in https://github.com/cypress-io/cypress-example-kitchensink/issues/213 and could not find any modern Heroku buildpack with heroku-18 XVFB install. I don't want to write one, and suggest using "real" CI instead - something that can use our cypress-docker-images Docker image to have all OS dependencies.