-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Unable to use karma-electron with Xvfb #17
Comments
Please make sure you are setting a and here it is working in this very repo with Travis CI (uses default https://github.com/twolfson/karma-electron/blob/5.1.1/.travis.yml#L16-L22 There's also a cleaner variant suggested by Electron's docs: https://github.com/electron/electron/blob/v1.4.10/docs/tutorial/testing-on-headless-ci.md |
I have $ ps -a
PID TTY TIME CMD
2511 tty1 00:00:00 bash
13232 pts/1 00:00:00 Xvfb
13336 pts/1 00:00:00 ps
$ echo $DISPLAY
:99.0
$ ./node_modules/.bin/karma start ./karma.config.js --single-run
05 12 2016 11:27:27.981:INFO [karma]: Karma v1.3.0 server started at http://localhost:9876/
05 12 2016 11:27:27.983:INFO [launcher]: Launching browser Electron with unlimited concurrency
05 12 2016 11:27:28.085:INFO [launcher]: Starting browser Electron
05 12 2016 11:27:28.201:ERROR [launcher]: Cannot start Electron
05 12 2016 11:27:28.849:INFO [launcher]: Trying to start Electron again (1/2).
05 12 2016 11:27:28.889:ERROR [launcher]: Cannot start Electron
05 12 2016 11:27:28.910:INFO [launcher]: Trying to start Electron again (2/2).
05 12 2016 11:27:28.947:ERROR [launcher]: Cannot start Electron
05 12 2016 11:27:28.952:ERROR [launcher]: Electron failed 2 times (cannot start). Giving up. |
Maybe try running the electron executable directly to see if there's a
better error message? It should be available at
`./node_modules/.bin/electron` iirc
…On Dec 5, 2016 8:30 AM, "Tom B" ***@***.***> wrote:
I have DISPLAY defined and I can tell the display is configured properly
because I can run firefox without an error. but this is what I see when I
try karma:
$ ps -a
PID TTY TIME CMD
2511 tty1 00:00:00 bash
13232 pts/1 00:00:00 Xvfb
13336 pts/1 00:00:00 ps
$ echo $DISPLAY
:99.0
$ ./node_modules/.bin/karma start ./karma.config.js --single-run
05 12 2016 11:27:27.981:INFO [karma]: Karma v1.3.0 server started at http://localhost:9876/
05 12 2016 11:27:27.983:INFO [launcher]: Launching browser Electron with unlimited concurrency
05 12 2016 11:27:28.085:INFO [launcher]: Starting browser Electron
05 12 2016 11:27:28.201:ERROR [launcher]: Cannot start Electron
05 12 2016 11:27:28.849:INFO [launcher]: Trying to start Electron again (1/2).
05 12 2016 11:27:28.889:ERROR [launcher]: Cannot start Electron
05 12 2016 11:27:28.910:INFO [launcher]: Trying to start Electron again (2/2).
05 12 2016 11:27:28.947:ERROR [launcher]: Cannot start Electron
05 12 2016 11:27:28.952:ERROR [launcher]: Electron failed 2 times (cannot start). Giving up.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA3FWLcBSbXMlFhg35iqaRT14nEOa16Lks5rFDwQgaJpZM4LC6lL>
.
|
Sweet! Found out that I needed to install libXss. Did that and it works! Thanks :) |
Here is the list of dependencies in Debian (from segment-boneyard/nightmare#224 (comment)):
Here is a Dockerfile with the dependencies for CentOS. I had to install the following dependencies in CentOS 7:
|
Trying to run my unit tests headless on a linux box with electron but this doesn't let electron launch in Xvfb. :(
The text was updated successfully, but these errors were encountered: