Karma "not found" in NetBeans after upgrading to Yosemite - javascript

I have a WAR project in NetBeans which uses Karma with Jasmine to unit-test the JavaScript files. The platform is Mac OS X. Things worked as they should under Mavericks, but after I upgraded to Yosemite, it no longer works, with the error message :
Failed to execute goal com.kelveden:maven-karma-plugin:1.8:start (default) on project Insight-war: There was an error executing Karma. Cannot run program "karma" (in directory "/Users/thja/Documents/Projects/kpi2010_core/WebGIS/Insight-war"): error=2, No such file or directory -> [Help 1]
It tries to execute the following command, as printed in the log:
karma start /Users/thja/Documents/Projects/kpi2010_core/WebGIS/Insight-war/src/main/webapp/config/karma.conf.js --browsers PhantomJS --reporters dots,junit --single-run --no-auto-watch --colors true
I can run the exact same command in the Terminal without a problem - it executes and give the test results. which karma gives the result /usr/local/bin/karma, and /usr/local/bin is part of the global PATH.
Is there any fix one can do for this, or do I just have to post an issue at the Maven Karma Plugin page?
Platform:
Mac OS X 10.10 Yosemite.
NetBeans 8.0.1
maven-karma-plugin 1.8
Java 1.7.0_45

It seems to be related to Yosemite turning off /etc/launchd.conf, so NetBeans doesn't get the correct PATH variable - so not directly related to Karma.
I fixed it by setting PATH=${PATH}:/usr/local/bin in netbeans.conf (within the NetBeans app package). Then the karma part of the build script runs successfully within NetBeans.

Related

React native can't run in ios by command but it can run in Xcode?

I used two libraries: "native-base" and "react-native-elements" but when I used it, I could not use the command react-native run-ios. But when I open the Xcode project, it can run and work as well.
This is my error below when I try to use the command react-native run-ios:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening DesignComponents.xcodeproj
One more error:
The following build commands failed:
Analyze /Users/my_path_project/node_modules/react-native/React/Base/RCTAssert.m normal x86_64
(1 failure)
I try to resolve it by clean cache, clean folder node_modules and something that I can, but it's not working.

Protractor + xvfb + selenium test Hangs on Jenkins

I'm having this issue sometimes on my automated tests running remotely on Jenkins. About 30% of the times.
The error:
Tests hangs after this line:
"I/launcher - Running 1 instances of WebDriver"
It gets stuck at this step indefinitely and I have to stop execution (manually) or wait to timeout to take control of it.
I tried several known solutions that i found on this site but nothing changed on my results.
My config:
Ubuntu OS 14.04.5 on a headless cloud storage system.
xvfb
Jenkins 1.656
selenium-server-standalone-2.53.1
chromedriver_2.24linux64
geckodriver-v0.9.0
nodejs v0.10.37
node v6.3.1
npm 3.10.3
protractor Version 4.0.9
grunt-cli v1.2.0
grunt v0.4.5
jasmine v2.5.2
jasmine-core v2.5.2
Jenkins Job Config:
Jenkins downloads my test project from github and runs the following commands on Project's shell:
node node_modules/grunt-cli/bin/grunt testName:parameters
(I don't want to run grunt globally, thats why i execute it in this way.)
Is there anything i can try in order to solve this hang issue?
Thanks in advance!

FreeSwitch mod installation fails

I have installed FreeSwitch on mac (OS X Yosemite 10.10.5) and I have to use javascript (mod_v8) for IVR calls. I have followed the steps for mod_v8 activation here: https://freeswitch.org/confluence/display/FREESWITCH/mod_v8
1.Uncomment languages/mod_v8 in modules.conf in your src directory (make it always build and install mod_v8)
2.Run 'make mod_v8-install' to make and install just the v8 module
3.Edit conf/autoload_configs/modules.conf.xml in your FreeSWITCHâ„¢ install directory to load mod_v8
4.In fs_cli, run "load mod_v8"*
However, I get the following error while running make mod_v8-install (Step 2) :
error on terminal
Also should I disable LUA when activating mod_v8?
This seems to be a 'info' type error being generated by the compiler.. Report the issue as a bug to FreeSWITCH?
Or try using the -i flag when compiling - https://www.gnu.org/software/make/manual/html_node/Errors.html
"Also should I disable LUA when activating mod_v8?"
No :)
Uncomment the from modules.conf.xml after recompiling. Try "reload mod_v8" command in fs_cli. I had the same issue its missing in the freeswitch document.

Webstorm Karma Test Runner Not Working with Yeoman angular-fullstack

I created a web application using the Yeoman Angular-Fullstack generator. Everything runs correctly from the command line. I can use grunt to start the service and run tests.
I want to run the Karma unit tests inside the Webstorm user interface. I right clicked on karma.conf.js and had Webstorm create a Karma run configuration for me. When I try to run that configuration, it spins for a few seconds then fails.
The Karma Server window in Webstorm contains this:
/usr/local/bin/node /Applications/WebStorm.app/Contents/plugins/js-karma/js_reporter/karma-intellij/lib/intellijServer.js --karmaPackageDir=/Users/williammcneill/Documents/Work/LearnNode/gecko/node_modules/karma --configFile=/Users/williammcneill/Documents/Work/LearnNode/gecko/karma.conf.js
WARN [watcher]: Pattern "/Users/williammcneill/Documents/Work/LearnNode/gecko/client/bower_components/angular-route/angular-route.js" does not match any file.
WARN [watcher]: Pattern "/Users/williammcneill/Documents/Work/LearnNode/gecko/client/app/app.coffee" does not match any file.
WARN [watcher]: Pattern "/Users/williammcneill/Documents/Work/LearnNode/gecko/client/components/**/*.coffee" does not match any file.
WARN [watcher]: Pattern "/Users/williammcneill/Documents/Work/LearnNode/gecko/client/components/**/*.jade" does not match any file.
WARN [watcher]: Pattern "/Users/williammcneill/Documents/Work/LearnNode/gecko/client/app/**/*.coffee" does not match any file.
WARN [watcher]: Pattern "/Users/williammcneill/Documents/Work/LearnNode/gecko/client/app/**/*.jade" does not match any file.
INFO [karma]: Karma v0.12.37 server started at http://localhost:8080/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket 29_J57vgWL6mWwyV13tv with id 98142631
Which all looks correct to me. The Test Run window contains this:
/usr/local/bin/node /Applications/WebStorm.app/Contents/plugins/js-karma/js_reporter/karma-intellij/lib/intellijRunner.js --karmaPackageDir=/Users/williammcneill/Documents/Work/LearnNode/gecko/node_modules/karma --serverPort=8080 --urlRoot=/
/Applications/WebStorm.app/Contents/plugins/js-karma/js_reporter/karma-intellij/lib/intellijRunner.js:54
throw e;
^
Error: connect ETIMEDOUT 127.0.0.1:8080
at Object.exports._errnoException (util.js:837:11)
at exports._exceptionWithHostPort (util.js:860:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1060:14)
Process finished with exit code 1
I can't figure out what is timing out. If I open http://localhost:8080 I see a webpage that looks like this.
Which also looks correct to me.
I haven't actually written any code. I'm taking all the defaults that Yeoman and Webstorm give me. I think I have all the relevant Webstorm plugins (AngularJs, Karma).
Does anyone have insight into what might be happening or how I could debug it?
Webstorm 10.0.4, Yeoman 1.4.8, Karma 0.13.9, Node 4.1.0, OS X 10.10.5
The port value in karma.conf.js is set to 8080, even though the server runs on 9000. Change this value to 9000 and everything works.
Not sure exactly how the grunt configuration makes it all work, or why it's set up this way, but that's the workaround.

PhantomJS gives Segmentation fault when running any js using command line

I have installed Phantomjs 1.9.8 on my Centos 6.5 server.
From the command line if I type
phantomjs -v
I get the correct version number returned, so I presume that it is installed ok.
However if I create a simple javascript file, using the most basic example from the phantomjs example:
console.log('Hello, world!');
phantom.exit();
and save this to a file test.js, navigate to that folder via command line and run
phatomjs test.js
I get
PhatomJS has crashed... Segmentation fault.
Any idea what could be causing this or further tests I could run?
A simple solution - A key step of course is that you have to restart your apache web server to get this to work, I had forgotten this.
Leaving this up in case it helps anyone else stumbling along the same route

Categories