Karma cannot launch Chrome for Jenkins in Ubuntu 12.04 -
i trying run karma grunt task on ubuntu 12.04 machine in jenkins ci. issue running karma not open chrome , gives following error:
started github push spencerapplegate [envinject] - loading node environment variables. building in workspace /var/lib/jenkins/jobs/rescour-roomba master/workspace checkout:workspace / /var/lib/jenkins/jobs/rescour-roomba master/workspace - hudson.remoting.localchannel@7b41ce14 using strategy: default last built revision: revision ee61ceea1b8728e90b01db04a1813284a524caed (origin/master) fetching changes 1 remote git repository fetching upstream changes origin commencing build of revision d3ed5ffd7c7b7a707bd9310c5bce09242e1faced (origin/master) checking out revision d3ed5ffd7c7b7a707bd9310c5bce09242e1faced (origin/master) [envinject] - executing scripts , injecting environment variables after scm step. [envinject] - injecting environment variables properties content chrome_bin=/opt/google/chrome/ [envinject] - variables injected successfully. [workspace] $ /bin/sh -xe /tmp/hudson5570746814297674358.sh + sudo npm install + sudo grunt buildprod loading "express.js" tasks... [31merror[39m[31m>> [39merror: cannot find module 'temp' [4mrunning "clean:build" (clean) task[24m cleaning ".tmp"...[32mok[39m cleaning "build/app"...[32mok[39m cleaning "build/app-config"...[32mok[39m cleaning "build/components"...[32mok[39m cleaning "build/img"...[32mok[39m cleaning "build/index.html"...[32mok[39m cleaning "build/scripts"...[32mok[39m cleaning "build/src"...[32mok[39m cleaning "build/styles"...[32mok[39m [4mrunning "copy:local" (copy) task[24m created [36m370[39m directories, copied [36m2260[39m files [4mrunning "compass:prod" (compass) task[24m [31m[0m[32mdirectory[0m .tmp/styles/ [31m[0m[32m create[0m .tmp/styles/main.css (1.732s) compilation took 1.784s [4mrunning "template:prod" (template) task[24m [4mrunning "clean:template" (clean) task[24m cleaning ".tmp/index.html.template"...[32mok[39m [4mrunning "karma:unit" (karma) task[24m [36m[2013-10-07 10:07:51.709] [debug] config - [39mautowatch set false, because of singlerun [32minfo [karma]: [39mkarma server started @ http://localhost:8079/ [32minfo [launcher]: [39mstarting browser chrome [31merror [launcher]: [39mcannot start chrome [32minfo [launcher]: [39mtrying start chrome again. [31merror [launcher]: [39mcannot start chrome [32minfo [launcher]: [39mtrying start chrome again. [31merror [launcher]: [39mcannot start chrome [33mwarning: task "karma:unit" failed. use --force continue.[39m [31maborted due warnings.[39m build step 'execute shell' marked build failure ssh: current build result [failure], not going run. finished: failure i have set chrome_bin=/opt/google/chrome , seems has no issue finding executable.
other approaches have taken (all unsuccessful) are: -> create shell script open chrome root flag --user-data-dir -> copy chrome files jenkins subdirectory /home/jenkins/opt/google/chrome -> change ownership of chrome files in /opt/google/chrome jenkins
the other oddity when log machine jenkins user, chrome runs tests fine.
please let me know if there more info need provide. thanks
i had same problem. after install xvnc plugin jenkins (https://wiki.jenkins-ci.org/display/jenkins/xvnc+plugin), problem disappeared.
Comments
Post a Comment