Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in integrating with jenkins #460

Closed
dineshrb opened this issue Apr 4, 2013 · 16 comments
Closed

Issue in integrating with jenkins #460

dineshrb opened this issue Apr 4, 2013 · 16 comments

Comments

@dineshrb
Copy link

dineshrb commented Apr 4, 2013

I got the following error while integrating karma with jenkins:

�[39mKarma server started at http://localhost:9876/
�[32mINFO [launcher]: �[39mStarting browser Chrome
�[31mERROR [karma]: �[39m{ [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' }

I hope this is because of wrong chorme_bin path. I gave the below path in macos:
CHROME_BIN = /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

Is it required to give path for all the browsers?

@dignifiedquire
Copy link
Member

Try deleting your CHROME_BIN. It sounds like you have installed Chrome in the standard directory, so karma should find it on its own.
The error is just saying that it hasn't found the binary .See #452

@dineshrb
Copy link
Author

dineshrb commented Apr 5, 2013

If i delete CHROME_BIN, i get the following error and build gets failed.

[32mINFO [launcher]: �[39mTrying to start Chrome again.
�[32mINFO [launcher]: �[39mTrying to start Chrome again.
Build step 'Execute shell' marked build as failure

@dignifiedquire
Copy link
Member

What version of node and karma are you using?

@dineshrb
Copy link
Author

dineshrb commented Apr 5, 2013

node version v0.10.2 & karma 0.8.2

@dineshrb
Copy link
Author

dineshrb commented Apr 5, 2013

In safari , i get the below error:

Starting browser Safari
�[32mINFO [karma]: �[39mTo run via this server, use "karma run --runner-port 9106"
�[33mWARN [launcher]: �[39mSafari have not captured in 60000 ms, killing.
�[32mINFO [launcher]: �[39mTrying to start Safari again.
�[33mWARN [launcher]: �[39mSafari have not captured in 60000 ms, killing.
�[32mINFO [launcher]: �[39mTrying to start Safari again.

In firefox alone, it works correctly

@vojtajina
Copy link
Contributor

Still looks like Karma trying to execute non existing binary.

Can you run it with --log-level debug and also --no-colors to get cleaner output ?

@dineshrb
Copy link
Author

dineshrb commented Apr 8, 2013

Got the below o/p after running with the above said commands:

INFO [launcher]: Starting browser Chrome
DEBUG [launcher]: Creating temp dir at /var/folders/9m/9xdpq_td6976ks4v5d91j5jw00007b/T/testacular-26895358
DEBUG [launcher]: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --user-data-dir=/var/folders/9m/9xdpq_td6976ks4v5d91j5jw00007b/T/testacular-26895358 --no-default-browser-check --no-first-run --disable-default-apps --start-maximized http://localhost:9877/?id=26895358
INFO [karma]: To run via this server, use "karma run --runner-port 9101"
DEBUG [watcher]: Resolved files:
/usr/local/lib/node_modules/karma/adapter/lib/mocha.js
/usr/local/lib/node_modules/karma/adapter/mocha.js
/Users/Shared/Jenkins/Home/jobs/karma test/workspace/testtool/test/vendor.js
/Users/Shared/Jenkins/Home/jobs/karma test/workspace/testtool/test/app.js
DEBUG [launcher]: Process Chrome exitted with code 0
DEBUG [launcher]: Cleaning temp dir /var/folders/9m/9xdpq_td6976ks4v5d91j5jw00007b/T/testacular-26895358
INFO [launcher]: Trying to start Chrome again.
DEBUG [launcher]: Creating temp dir at /var/folders/9m/9xdpq_td6976ks4v5d91j5jw00007b/T/testacular-26895358
DEBUG [launcher]: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --user-data-dir=/var/folders/9m/9xdpq_td6976ks4v5d91j5jw00007b/T/testacular-26895358 --no-default-browser-check --no-first-run --disable-default-apps --start-maximized http://localhost:9877/?id=26895358
DEBUG [launcher]: Process Chrome exitted with code 0
DEBUG [launcher]: Cleaning temp dir /var/folders/9m/9xdpq_td6976ks4v5d91j5jw00007b/T/testacular-26895358
INFO [launcher]: Trying to start Chrome again.
DEBUG [launcher]: Creating temp dir at /var/folders/9m/9xdpq_td6976ks4v5d91j5jw00007b/T/testacular-26895358
DEBUG [launcher]: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --user-data-dir=/var/folders/9m/9xdpq_td6976ks4v5d91j5jw00007b/T/testacular-26895358 --no-default-browser-check --no-first-run --disable-default-apps --start-maximized http://localhost:9877/?id=26895358
DEBUG [launcher]: Process Chrome exitted with code 0
DEBUG [karma]: Chrome failed to capture, aborting the run.
DEBUG [launcher]: Disconnecting all browsers
DEBUG [launcher]: Killing Chrome
DEBUG [launcher]: Cleaning temp dir /var/folders/9m/9xdpq_td6976ks4v5d91j5jw00007b/T/testacular-26895358

@vojtajina
Copy link
Contributor

This is weird. I have no idea what's going on here... Can you see Chrome actually start the GUI ?

@josebalius
Copy link

@dineshrb

Did you ever find a solution this problem?

Jose

@ibussieres
Copy link

Just to mention this is still the case. Also true with Firefox. Might note that I can still run the exact same command manually, with the user. It's really just when Jenkins tries to run the command that this happens.

@vojtajina
Copy link
Contributor

Ok, I'm re-opening this issue.

I'm pretty sure there is some problem with quoting/not-quoting the path, or escaping/not-escaping spaces, etc.

@vojtajina vojtajina reopened this Mar 8, 2014
@pvanlaere
Copy link

Any Progress / Hint on this issue.
I seem to be bumping into the same issue, see below

Thanks, Peter

�[4mRunning "karma:continuous" (karma) task�[24m
Verifying property �[36mkarma.continuous�[39m exists in config...�[32mOK�[39m
File: �[33m[no files]�[39m
Options: �[36mbackground=false�[39m, �[36mconfigFile="build/karma-unit.js"�[39m
�[32mINFO [karma]: �[39mKarma v0.12.24 server started at http://localhost:9018/
�[32mINFO [launcher]: �[39mStarting browser Chrome
�[33mWARN [launcher]: �[39mThe path should not be quoted.
Normalized the path to C:/Program Files (x86)/Google/Chrome/Application/chrome.exe
�[33mWARN [launcher]: �[39mChrome have not captured in 60000 ms, killing.
�[32mINFO [launcher]: �[39mTrying to start Chrome again (1/2).
�[33mWARN [launcher]: �[39mThe path should not be quoted.
Normalized the path to C:/Program Files (x86)/Google/Chrome/Application/chrome.exe
�[33mWARN [launcher]: �[39mChrome have not captured in 60000 ms, killing.
�[32mINFO [launcher]: �[39mTrying to start Chrome again (2/2).
�[33mWARN [launcher]: �[39mThe path should not be quoted.
Normalized the path to C:/Program Files (x86)/Google/Chrome/Application/chrome.exe
�[33mWARN [launcher]: �[39mChrome have not captured in 60000 ms, killing.
�[31mERROR [launcher]: �[39mChrome failed 2 times (timeout). Giving up.

@maksimr
Copy link
Contributor

maksimr commented Oct 23, 2014

@pvanlaere what version of Chrome you use?

@pvanlaere
Copy link

Hi Maksim, that would be: Version 38.0.2125.104 m
In the meantime also found the below...
https://code.google.com/p/chromium/issues/detail?id=422218

@maksimr
Copy link
Contributor

maksimr commented Oct 23, 2014

@pvanlaere We already have a special task under Chrome 38 :)

@dignifiedquire
Copy link
Member

Closing due to inactivity. Please feel free to open a new issue with current data if this is still a problem. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants