Karma cannot start Firefox with Jenkins and Ubuntu 12.04

后端 未结 2 761
野性不改
野性不改 2021-02-10 07:37

I have set up a Jenkins job that should run Firefox. Signed in to Ubuntu with the Jenkins user, I can manually launch Firefox without any problem. However, when I run the job in

2条回答
  •  鱼传尺愫
    2021-02-10 08:19

    Got it. It turns out the problem originated from a misconception on how to run karma in the first place.

    The Jenkins task was doing karma start, with autowatch set to true. Instead, I fired up karma with autowatch false in rc.local (script ran on boot) and the Jenkins task executes karma run instead. This solved the problem entirely.

    Edit: Installing the xvnc plugin, and activating it for build works for karma start and karma run.

    Edit: The problem came back when I upgraded to 14.04. The fix was to make sure the environment variables injected in the build pointed to the X11 versions.

    FIREFOX_BIN=/usr/bin/X11/firefox
    CHROME_BIN=/usr/bin/X11/google-chrome
    

提交回复
热议问题