I am trying to run karma as a grunt task on a Ubuntu 12.04 machine in Jenkins CI. The issue I am running into is that karma will not open Chrome and gives the following error:
Started by GitHub push by 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 from 1 remote Git repository
Fetching upstream changes from origin
Commencing build of Revision d3ed5ffd7c7b7a707bd9310c5bce09242e1faced (origin/master)
Checking out Revision d3ed5ffd7c7b7a707bd9310c5bce09242e1faced (origin/master)
[EnvInject] - Executing scripts and injecting environment variables after the SCM step.
[EnvInject] - Injecting as environment variables the 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 to false, because of singleRun
[32mINFO [karma]: [39mKarma server started at http://localhost:8079/
[32mINFO [launcher]: [39mStarting browser Chrome
[31mERROR [launcher]: [39mCannot start Chrome
[32mINFO [launcher]: [39mTrying to start Chrome again.
[31mERROR [launcher]: [39mCannot start Chrome
[32mINFO [launcher]: [39mTrying to start Chrome again.
[31mERROR [launcher]: [39mCannot start Chrome
[33mWarning: Task "karma:unit" failed. Use --force to continue.[39m
[31mAborted due to warnings.[39m
Build step 'Execute shell' marked build as failure
SSH: Current build result is [FAILURE], not going to run.
Finished: FAILURE
I have set CHROME_BIN=/opt/google/chrome and it seems like it has no issue finding the executable.
Other approaches I have taken (all unsuccessful) are:
-> Create shell script to open chrome as root with flag --user-data-dir
-> Copy all chrome files to a jenkins subdirectory /home/jenkins/opt/google/chrome
-> Change ownership of all chrome files in /opt/google/chrome to jenkins
The other oddity is that when I log into the machine as the jenkins user, chrome runs the tests fine.
Please let me know if there is any more info I need to provide. Thanks
I had the same problem. After install xvnc plugin for Jenkins (https://wiki.jenkins-ci.org/display/JENKINS/Xvnc+Plugin), problem disappeared.
For me, it was a misuse of karma start vs karma run. You need to have a karma server running, and use karma run in the jenkins job. See my question and answer here.
Edit: Lehu's answer works for both start/run.
Related
I attempt to load gnome-boxes from the terminal (I'm running Fedora 33) and get the following error
$ gnome-boxes
(gnome-boxes:3194): Gtk-WARNING **: 12:34:57.343: GtkFlowBox with a model will ignore sort and filter functions
(gnome-boxes:3194): Gtk-WARNING **: 12:34:57.344: GtkListBox with a model will ignore sort and filter functions
(gnome-boxes:3194): Boxes-WARNING **: 12:34:57.904: libvirt-machine.vala:83: Failed to disable 3D Acceleration
(gnome-boxes:3194): Boxes-WARNING **: 12:34:57.913: libvirt-broker.vala:70: Failed to update domain 'fedora33-wor-2': Failed to set domain configuration: XML error: Invalid PCI address 0000:04:00.0. slot must be >= 1
(gnome-boxes:3194): Boxes-CRITICAL **: 12:34:57.916: boxes_vm_importer_get_source_media: assertion 'self != NULL' failed
Segmentation fault (core dumped)
My system:
$uname -a
Linux localhost.localdomain 5.9.16-200.fc33.x86_64 #1 SMP Mon Dec 21 14:08:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
I don't whether it's related but I recently updated from kernel 5.9.11 directly to 5.9.16 (haven't used the PC in question for some weeks) and before gnome-boxes was working as normal.
Please advise how I can restore gnome-boxes - I have some virtual machines that I need to access...
I faced this issue when I force stopped Gnome-Boxes while cloning a VM.
Deleting the conflicting VM will resolve your issue(in your case 'fedora33-wor-2').
To delete the VM in fedora, install "libvirt-client" which provides "virsh" using the command
dnf install libvirt-client
then double check the available VM's using
virsh list --all
Delete the VM using command,
virsh undefine VM_Name
#channel-fun solved the problem of staring up gnome-boxes.
But the real problem is in cloning procedure. The XML describing the new machine is malformed.
virt-clone --original fedora33-ser --auto-clone
works properly.
I know this is an old thread, but I had the same problem recently.
I shut down gnome boxes whilst it was cloning a vm, and shutdown the machine.
I then couldn't open boxes, as it would just crash.
I was able to delete the VM itself, and then deleted the XML file associated with it.
To delete the VM itself, go to :
$HOME/.var/app/org.gnome.Boxes/data/gnome-boxes/images (which in my case is a symbolic link to a data drive)
and delete the VM with the name that you were cloning to (or safer, just move it somewhere).
To delete the XML file associated with it:
$HOME/.var/app/org.gnome.Boxes/config/libvirt/qemu/
and delete (or safer move) the file that is named VM_NAME.xml.
Then boxes should open ok, at least it worked for me.
Extending on Channel Fun's answer for Ubuntu repos the package is libvirt-clients (note the plural s):
sudo apt install libvirt-clients
Check the available VM's using:
virsh list --all
Delete the VM using:
virsh undefine VM_Name
If you receive the error:
error: Refusing to undefine while domain managed save image exists
Then you can explicitly remove that also using the --managed-save flag:
virsh undefine VM_Name --managed-save
I'm new to Redhat OpenShift and trying to deploy node application (with angularjs + mysql) and running into build issues.
Using openshift console created node application and in advanced options pointed to the private repository and linked configured secret (ssh key to private repository).
My build is failing with "Assemble script failed". Pasting the logs as below (from console - obfuscated private keys and values).
Not sure if I'm missing some configurations. Appreciate help on this.
Cloning "ssh://username#bitbucket.org/username/my-app.git" ...
Commit: xxxxxxxxxxxxxxxxx (Fixed readme)
Author: Name <email>
Date: Wed Sep 6 19:50:59 2017 -0700
Pulling image "docker-
registry.default.svc:5000/openshift/nodejs#sha256:0000000000000" ...
---> Installing application source
---> Building your Node application from source
Current git config
url.https://github.com.insteadof=git#github.com:
url.https://.insteadof=ssh://
url.https://github.com.insteadof=ssh://git#github.com
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=ssh://username#bitbucket.org/username/my-app.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
---> Installing dependencies
---> Using 'npm install -s --only=production'
error: build error: non-zero (13) exit code from docker-
registry.default.svc:5000/openshift/nodejs#sha256:0000000000000
Pls note that my source code is hosted on private repository and per log above it appears openshift is able to access the repository and download the source code.
Thanks Graham for the pointer. I recreated the application and this time in advanced options on the web console selected 1 GB (from default of 500 mb) after which my build worked fine.
I'm using Android Studio.
I want to run and deploy my application on HTML5.
I'm entering the command "gradlew.bat html:superDev" on the Terminal, but it gives me that error message:
Execution failed for task ':core:compileJava'. Could not find tools.jar
How can I solve this problem?
Here's the full error message:
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
Configuration on demand is an incubating feature.
:core:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':core:compileJava'.
> Could not find tools.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I had the same issue.
You need install jdk Download here
You need configure your variable environment: JAVA_HOME
Or you can copy tools.jar from %JAVA_HOME\lib to Android Studio\lib
I'm getting following warn when I ran grunt test and doesn't give me the expected result, which is writing the progress of unit tests.
error:-
Running "karma:unit" (karma) task
WARN [reporter]: Can not load "html", it is not registered!
Perhaps you are missing some plugin?
INFO [karma]: Karma v0.12.15 server started at http://localhost:8080/
INFO [launcher]: Starting browser Chrome
WARN [watcher]: Pattern "F:/AngularExamples/TestingAngular/test/mock/**/*.js" do
es not match any file.
INFO [Chrome 34.0.1847 (Windows 7)]: Connected on socket Mxn9RZeJcSW1gjL_e3d2 wi
th id 36948068
Chrome 34.0.1847 (Windows 7): Executed 1 of 1 SUCCESS (0.04 secs / 0.037 secs)
Done, without errors.
html report plugin integration in karma.config.js :-
reporters: ['progress', 'html'],
// the default configuration
htmlReporter: {
outputDir: 'karma_html',
templatePath: __dirname+'/jasmine_template.html'
},
can someone point me the cause?
First, make sure it has been installed - there should be a karma-html-reporter directory in node_modules in the directory from which you are running the tests. If not run:
npm install karma-html-reporter
Then confirm you have 'karma-html-reporter' in plugins in the conf, i.e:
plugins: [
'karma-teamcity-reporter',
'karma-jasmine',
'karma-coverage',
'karma-chrome-launcher',
'karma-phantomjs-launcher',
'karma-html-reporter'
]
I am getting following error mentioned below. Help is much needed for this...
kindly go through the errors.
Started by an SCM change
Updating https://suppliesguys.unfuddle.com/svn/suppliesguys_frontend2/Frontend-Texity/src
U sites\all\modules\print\print_pdf\print_pdf.pages.inc
At revision 1134
[workspace] $ sh -xe C:\WINDOWS\TEMP\hudson6292587174545072503.sh
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: Cannot run program "sh" (in directory "E:\Projects\Hudson\.hudson\jobs\TSG\workspace"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:149)
at hudson.Proc$LocalProc.<init>(Proc.java:121)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:636)
at hudson.Launcher$ProcStarter.start(Launcher.java:271)
at hudson.Launcher$ProcStarter.join(Launcher.java:278)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:83)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:584)
at hudson.model.Build$RunnerImpl.build(Build.java:174)
at hudson.model.Build$RunnerImpl.doRun(Build.java:138)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
at hudson.model.Run.run(Run.java:1244)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:122)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 17 more
Publishing Javadoc
Publishing Clover coverage report...
No Clover report will be published due to a Build Failure
[xUnit] Starting to record.
[xUnit] [PHPUnit] - Use the embedded style sheet.
[xUnit] [ERROR] - No test report file(s) were found with the pattern 'build/logs/phpunit.xml' relative to 'E:\Projects\Hudson\.hudson\jobs\TSG\workspace' for the testing framework 'PHPUnit'. Did you enter a pattern relative to the correct directory? Did you generate the result report(s) for 'PHPUnit'?
[xUnit] Stopping recording.
Finished: FAILURE
It looks like you are using the "Execute shell" build step on a windows system instead of the "Execute Windows batch command" build step. Windows doesn't normally have 'sh', so the former won't work.
Looks like you have a couple of problems:
FATAL: command execution failed java.io.IOException: Cannot run program "sh" (in directory "E:\Projects\Hudson.hudson\jobs\TSG\workspace"):
The user that's running the Hudson job doesn't have the "sh" command in its path, so it can't run shell scripts. Adding /bin to the $PATH of the Hudson user should fix this.
[xUnit] [ERROR] - No test report file(s) were found with the pattern 'build/logs/phpunit.xml' relative to 'E:\Projects\Hudson.hudson\jobs\TSG\workspace' for the testing framework 'PHPUnit'.
This is probably a result of the previous error; the build just didn't get far enough to run the PHPUnit tests.
'sh' is for linux implementations. Both '.exe' and 'bat' files are used in windows. Are you trying to setup and run Hudson on windows or linux?