nathanboktae / mocha-phantomjs

:coffee: :ghost: Run client-side mocha tests in the command line through phantomjs
MIT License
954 stars 112 forks source link

phantomjs terminated with signal SIGSEGV #217

Closed WNLee closed 9 years ago

WNLee commented 9 years ago

When I run "mocha-phantomjs -R dot /test/file.html",it catch "phantomjs terminated with signal SIGSEGV". What caused this error?

pavlo commented 9 years ago

Same issue for me, running mocha-phantomjs on an ElCapitan OSX:

> mocha-phantomjs ./test/client/index.html

phantomjs terminated with signal SIGKILL
npm ERR! Test failed.  See above for more details.
nathanboktae commented 9 years ago

mocha-phantomjs is just a thin CLI around phantomjs. If it's being killed you'll need to figure it out with phantomjs. However I see you already asked @WNLee (ariya/phantomjs#13702) and got blown off. I'd try running simple phantomjs examples and seeing if they work. If your on OS X, sometimes there can be issues with decompressing the binary, so you can use upx directly - see ariya/phantomjs#12900

If you need to use phantomjs 2, you can use mocha-phantomjs-core directly.

WNLee commented 9 years ago

upx -d phantomjs can fix my problem. Phantomjs can run on my OS X 10.10.5.

jackocnr commented 8 years ago

I had the same issue on MacOS Sierra. The solution was to tell mocha-phantomjs to use my local (homebrew installed) phantomjs using the -p option.

/path/to/mocha-phantomjs -p /usr/local/bin/phantomjs ...

sakshij commented 7 years ago

@WNLee How did upx -d phantomjs fix the problem? What is it supposed to do?

evamedia commented 7 years ago

@jackocnr can you expand on that, have the two paths, where do I put them?

jackocnr commented 7 years ago

@evamedia you just add that -p option whenever you run mocha-phantomjs. For me that was in package.json, under "scripts".

akauppi commented 7 years ago

@jackocnr Your solution works for me, but does the extra -p parameter hurt developers who don't have the phantomjs file in that path?

This issue is closed, which indicates it would be fixed in mocha-phantomjs, but I still need to do the workaround.

macOS 10.12.4 phantomjs 2.1.1 (via HomeBrew) $ npm list | grep mocha ├─┬ mocha@3.2.0 ├─┬ mocha-phantomjs@4.1.0 │ ├── mocha-phantomjs-core@1.3.1

jackocnr commented 7 years ago

Yes that solution would require all devs to have phantomjs installed in the same path. TBH we ended up switching from mocha-phantomjs to mocha-phantomjs-core which solved the issue for us.