Unhandled rejection HeadlessError: Phantom immediately exited with: 255
Hi. First of all, thanks very much for such project.
I am trying to use phantom-prebuilt with horseman and the following error came up when I tried to launch it. Do we have a list of all these error code and what it means? May I also ask how could I debug it? Thanks.
Unhandled rejection HeadlessError: Phantom immediately exited with: 255
at ChildProcess.immediateExit (http://localhost:3000/dist/bundle.js:210237:24)
at ChildProcess.g (events.js:286:16)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
The meanings of the error codes are not from Horseman. You need to look at PhantomJS probably.
I seem to be bumping into this (or something similar) as well.
Phantom Simple is getting SIGSEGV
I noticed the node-phantom-simple build is failing and I'm wondering if that has anything to do with it.
@awlayton Hi, this is cause of Horseman, there is no error code with 255 number in phantomJS, also I have tested phantomJS without Horseman using webdriverio it works as expected.
It is not horman @sharifzadesina. The message clearly states that phantom is exiting with code 255. Horseman doesn't have or define any exit codes.
@awlayton of course horseman doesn't. but it does something that cause this. you can test this by yourself, for example try to use horseman in electron or node-webkit, you will get 255 return code, but if you use phantomjs with webdriverio you won't.
What do you mean use "use horseman in electron or node-webkit"? Horseman doesn't run in anything except NodeJS, and the only browsers it supports are phantom and slimer.
I cannot try it myself because for me phantom-prebuilt works just fine with Horseman. There must be something about your setup.
@awlayton !!! man electron and node-webkit are node.js way for building desktop applications!!! they are node.js!!!
I told you how you can test, just try to run horseman on electron or node-webkit you will get this error.
Start here, it will take only 10 minute of you.
I know what electron and node-webkit are. What would you use them with Horseman though? Horseman would still need phantom or slimer to work.
@awlayton Yes, I install phantomjs-prebuilt, horseman can access to the phantomjs binary and it can run it, but it doesn't work and throws 255 error, for unknown reason, in the other hand phantomjs works well with webdriverio.
I understand webdriverio. I do not understand what electron and node-webkit have to do with this.
@awlayton I want to use horseman through electron/node-webkit desktop applications. but it throws 255 error.
I do not really have time lately for debugging Horseman issues, which is why there are so many.
Using electron should have no effect on horseman. If I had time to debug, I would start by figuring out under what circumstances phantom exits with code 255.
If you post code I can run to try to reproduce the error on my system, I will try to run it. Or you could try the phamtomjs npm package, or installing phantomjs globally for horseman to find (it checks the $PATH).