Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Issue in integrating with jenkins #460

Open
dineshrb opened this Issue · 15 comments

7 participants

@dineshrb

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
Collaborator

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

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
Collaborator

What version of node and karma are you using?

@dineshrb

node version v0.10.2 & karma 0.8.2

@dineshrb

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

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

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

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

@josebalius

@dineshrb

Did you ever find a solution this problem?

Jose

@ibussieres

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

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
@pvanlaere

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
Collaborator

@pvanlaere what version of Chrome you use?

@pvanlaere

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
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.