-
Notifications
You must be signed in to change notification settings - Fork 107
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
Error: Child terminated with non-zero exit code 1 #73
Comments
Heads up, I'm getting the same error, nice recon @ucarbehlul |
Hey y'all. Sorry for the delay. We just had a baby. @ucarbehlul, thanks for the awesome bug report. I appreciate the detective work and thorough repro info. I'm going to try to get to the bottom of this. I just tested with v1.0.2 and v1.0.3 of Casper. The |
@lawnsea I am experiencing a similar error to this as well, I downgraded the version of PhantomJS I was using to 1.8.2 to see if that had any effect but it didn't change anything. I think it's these release notes that we want in order to try and understand the error and not the 1.0.3 ones? When I had a read through the upgrade guide I noticed this section which mentions that "CasperJS 1.1 now internally uses PhantomJS’ native require()" so I added the line var require = patchRequire(require); to the top of lib/bootstrap/casper.js which dealt with the "Cannot find module 'casper'" error I was getting, but now when I run, the command just hangs. Not sure where to go from here in attempting to fix - hopefully this is of some use! EDIT - It was hanging because I had left the transport on stdio. Adding the patch require to the top of lib/bootstrap/casper.js seemingly fixes the issue when you are running with the dev version of casper 😄 |
@rumca Thanks for the help. I'm not able to fix this with your change on my ubuntu VM, but I think you're on the right track. I'll keep y'all posted. |
@rumca Ok, I have a fix for this locally. I'll be pushing it up later today or tomorrow. Interestingly, the stdio hang is due to Casper's broken Function.prototype.bind polyfill. |
@lawnsea sweet, thanks for the fast fix! |
@rumca and @ucarbehlul: I'd like to merge this and publish a new version. Any chance y'all could pull #75 in the next day or so and see if it fixes this for you? |
Seems to be working. Good job. Cheers. |
Same here, has fixed the issues I was seeing also! |
Great! I'll cut a release tonight. |
When I try to use spooky with node command I encounter this error message:
My configuration is as follows:
when I added
console.log(options.command, args.join(' ') )
to spawning code, I got this:casperjs ./node_modules/spooky/lib/bootstrap.js --command=casperjs --port=8081 --spooky_lib=./node_modules/spooky/ --transport=stdio --bufferSize=16384
So I tried running it and I got this error:
{"jsonrpc":"2.0","method":"emit","params":["error","CasperError: Can't find module ./node_modules/spooky/lib/bootstrap/emit",[{"file":"/usr/local/Cellar/casperjs/1/libexec/bin/bootstrap.js","line":214,"function":"patchedRequire"},{"file":"./node_modules/spooky/lib/bootstrap.js","line":18,"function":""}]]}
If I replace . with
pwd
in the command, namelycasperjs
pwd/node_modules/spooky/lib/bootstrap.js --command=casperjs --port=8081 --spooky_lib=
pwd/node_modules/spooky/ --transport=stdio --bufferSize=16384
, this time I got this error:{"jsonrpc":"2.0","method":"emit","params":["error","Error: Cannot find module 'events'",[{"file":"phantomjs://bootstrap.js","line":289,"function":""},{"file":"phantomjs://bootstrap.js","line":254,"function":"require"},{"file":"/Users/baysungur/dev/gtranslate_scaper/node_modules/spooky/lib/stream.js","line":28,"function":""},{"file":"/Users/baysungur/dev/gtranslate_scaper/node_modules/spooky/lib/stream.js","line":142,"function":""},{"file":"/Users/baysungur/dev/gtranslate_scaper/node_modules/spooky/lib/stream.js","line":143,"function":""}]]}
I installed 1.1.0-DEV version of casperjs with brew and phantomjs (version 1.9.1) with brew as well. I installed Spooky with npm to the working directory.
It works with the stable version of casperjs but 1.1.0-DEV does not work. The reason I'm trying DEV is that xpath seems to work better in it.
Best Regards
The text was updated successfully, but these errors were encountered: