Code Monkey home page Code Monkey logo

Comments (5)

sanbor avatar sanbor commented on July 20, 2024 2

Here is the list of dependencies in Debian (from segment-boneyard/nightmare#224 (comment)):

xvfb
libgtk2.0-0
libgconf-2-4
libasound2
libxtst6
libxss1
libnss3

Here is a Dockerfile with the dependencies for CentOS. I had to install the following dependencies in CentOS 7:

yum install -y \
  libX11-devel.x86_64 \
  pixman-devel.x86_64 \
  libdrm-devel.x86_64 \
  mesa-libGL-devel.x86_64 \
  openssl-devel.x86_64 \
  xorg-x11-xtrans-devel.noarch \
  libXfont-devel.x86_64 \
  libxkbfile-devel.x86_64 \
  libpciaccess-devel.x86_64 \
  xorg-x11-utils \
  libXtst-devel.x86_64 \
  libjpeg-turbo-devel.x86_64 \
  gtk2-2.24.28-8.el7.x86_64 \
  libXScrnSaver-1.2.2-6.1.el7.x86_64 \
  GConf2-3.2.6-8.el7.x86_64 \
  alsa-lib-1.1.1-1.el7.x86_64 \
  'gnu-free-sans-fonts'

from karma-electron.

track0x1 avatar track0x1 commented on July 20, 2024 1

Sweet! Found out that I needed to install libXss. Did that and it works! Thanks :)

from karma-electron.

twolfson avatar twolfson commented on July 20, 2024

Please make sure you are setting a DISPLAY environment variable that will be shared by Xvfb and karma. Here's the typical Travis CI setup:

https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI

and here it is working in this very repo with Travis CI (uses default npm test via Travis CI):

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

from karma-electron.

track0x1 avatar track0x1 commented on July 20, 2024

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.

from karma-electron.

twolfson avatar twolfson commented on July 20, 2024

from karma-electron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.