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

Launcher - ignore exit code after killing #444

Closed
vojtajina opened this issue Mar 29, 2013 · 6 comments
Closed

Launcher - ignore exit code after killing #444

vojtajina opened this issue Mar 29, 2013 · 6 comments

Comments

@vojtajina
Copy link
Contributor

Once the launcher gets into state BEING_KILLED or BEING_TIMEOUTED, ignore the exit code.

http://nodejs.org/api/child_process.html#child_process_event_close
Most of the browsers returns "not-normally" (because of receiving a signal) and therefore exit event gets null exit code. But PhantomJS exits "normally" with status code 1 (after receiving TERM signal):
Medium/phantomjs@8921fb7

@ghost ghost assigned vojtajina Mar 29, 2013
@acjcm3c
Copy link

acjcm3c commented Apr 8, 2013

I second this feature since it is giving us an ERROR [launcher]: Cannot start PhantomJS when we run our tests with karma

@mnichols
Copy link

Yes I can confirm this on my Mac OSX 10.8. My tests run and indicate SUCCESS or FAILUREs but then I get the ERROR [launcher] message

@icecreamliker
Copy link

It happened on my ubuntu 12.04.
Do you have some advice? or I should modify the source code of PhantomJS?

@oleastre
Copy link

As said by email, I can confirm this problem with PhantomJS 1.8 on fedora 18 and ubuntu 12.04.

For those that are blocked by this problem, a quick workaround is to modify the PhantomJS launcher to return 0 instead of 1 (see the phantomJS commit).

On the long term, the exit code can be ignored when being killed (or karma can handle the specific phantomJS case).

@leostera
Copy link

leostera commented May 2, 2013

👍 to @mnichols, same system here, same issue.

Running tests works thou.

@swallentin
Copy link

I'm experiencing the very same problem, my tests run and pass but "build" fails.

PhantomJS 1.9 (Mac): Executed 1 of 1 SUCCESS (1.156 secs / 1.067 secs)
ERROR [launcher]: Cannot start PhantomJS

I'm on Mountain Lion using phantomjs 1.9.0.

vojtajina added a commit that referenced this issue Jun 7, 2013
Most of the browsers returns "not-normally" (because of receiving a signal) and therefore exit event gets null exit code. But PhantomJS exits "normally" with status code 1 (after receiving TERM signal).

I think this logic is better - show error, if process exits during a state which does not expect exiting (CAPTURED, BEING_CAPTURED).

Closes #444
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