node-horseman: Horseman exiting when PhantomJS has an error

We’re running a fairly complicated set of tests and the last few days for some reason they’ve been failing. Most of the time it prints the following error:

{ [HeadlessError: Error parsing JSON from phantom: SyntaxError: Unexpected token E
Data from phantom was: Error 403: Directory Listing Denied
Directory listing denied]
  name: 'HeadlessError',
  message: 'Error parsing JSON from phantom: SyntaxError: Unexpected token E\nData from phantom was: Error 403: Directory Listing Denied\nDirectory listing denied' }

… and then exits. But sometimes it just plain exits with no logging (odd).

I’m wondering if there is a specific reason for this behavior, or maybe an undocumented option that can cause horseman to behave differently when something goes wrong in phantom?

Our ideal here is to have our series of tests continue even if one has an issue (and we’d like to log the issue we’re having with as much info as possible). But the major hangup is the script exiting.

(note: I’m aware this could be user error, but I’m not 100% familiar with the script or horseman yet so any help is appreciated).

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Comments: 37 (3 by maintainers)

Most upvoted comments

I was running it on the machine at my desk which I recently rebuilt @ohenepee , so it’s pretty powerful:

6 core i7 CPU
64 GB ram

So if the issue happen when running out processor power, I guess that won’t happen on that computer. I have some deadline coming up at work, but some point in the future I should be able to test in a VM or something.