ivolo / scraper

A simple API for phantom web scraping
9 stars 3 forks source link

AssertionError: signal killed phantomjs: SIGKILL #7

Open ivolo opened 10 years ago

ivolo commented 10 years ago
AssertionError: signal killed phantomjs: SIGKILL',
    '    at Console.assert (console.js:102:23)',
    '    at ChildProcess.<anonymous> (scraper/node_modules/phantom/phantom.js:123:21)',
    '    at ChildProcess.EventEmitter.emit (events.js:98:17)',
    '    at Process.ChildProcess._handle.onexit (child_process.js:797:12)' ] }
mieszko4 commented 10 years ago

The same happened to me several times. It seems to happen randomly. Each time it happens to me after the script which uses phantom is executed for a long time (more than 1h).

What could be the cause? Does anyone have an idea how it could be debugged?

ivolo commented 10 years ago

Boy, I have no idea. what operating system is this running on for you?

mieszko4 commented 10 years ago

debian-7.0-x86_64

Yeah, it is strange. Perhaps it has something to do with OS.

grigoryvp commented 9 years ago

It can be 'oom killer': with default configuration most of linux boxes will kill process if it uses all system memory and wants more.

KeinborgMichael commented 9 years ago

same issue ... on "phantom.create(function(ph) {"

AssertionError: signal killed phantomjs: SIGKILL at Console.assert (console.js:106:23) at ChildProcess. (/Users/Michael/Sites/bookGenerator/nodejsscripts/node_modules/phantom/phantom.js:152:21) at ChildProcess.emit (events.js:110:17) at Process.ChildProcess._handle.onexit (child_process.js:1067:12)

oliviermeyer commented 9 years ago

I have the same issue on osx yosemite. assert.js:92 throw new assert.AssertionError({ ^ AssertionError: signal killed phantomjs: SIGKILL at Console.assert (console.js:102:23) ...

oliviermeyer commented 9 years ago

Working now on windows :+1: I've added environment variable path : "C:\phantomjs\bin\" and removed phantom.exe at th end. if you inspect phantom.js in phantom folder in node_module : options.binary = options.path + 'phantomjs';extension is ever added.

Don't forget in windows to add option : dnodeOpts: {weak: false}

Working on osx yosemite :
step 1 brew install upx upx -d bin/phantomjs

step 2 remove node module and do npm install

brackmayhall commented 9 years ago

Oliver,

I tried this on Yosemite and it doesn't seem to be working. I just keep getting phantomjs is not installed. upx is removing it from my path it seems.

brackmayhall commented 9 years ago

Make sure this has been handled.

Phantom requires you to have the XCode Command Line Tools installed on your box, or else you will get some nasty errors (xcode not found or make not found). If you haven't already, simply install XCode through the App Store, then install the command line tools.