fzaninotto / screenshot-as-a-service

Website screenshot service powered by node.js and phantomjs
1.1k stars 243 forks source link

[uncaughtException] { [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' } #42

Open ne0c0de opened 10 years ago

ne0c0de commented 10 years ago

Hi,

I just downloaded the zip file and tun the following commands:

npm install node app.js

it gives me that error:

[uncaughtException] { [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' }

i also tried it with sudo command but the error didn't change.

finally i tried to give chmod 777 to all files in the current folder but the result didn't change.

what can id in this situaiton?

ne0c0de commented 10 years ago

Finally i bypassed this error with installing phantomjs on my mac :)

My new error is on my server (Ubuntu 12.04) When i try to run app it gives that error:

Phantomjs internal server listening on port 3001 Express server listening on port 3000 phantomjs error: 2013-10-28T12:35:58 [WARNING] phantomjs: cannot connect to X server

phantomjs failed; restarting [uncaughtException] [TypeError: Object # has no method 'startService'] Stopping Phantomjs internal server

Of course there's no X Server on my server so what can i do for this error?

ne0c0de commented 10 years ago

I installed the latest version of phantomjs and the latest problem is resolved on my first server.

Now i try to install it on a fresh server (with x86-64 CPU), i installed all nodejs phantomjs and other components with same commands (sure to compatible with new CPU) but when i try to execute node app it fails and returun empty result (no error or any message)

What is the problem can be there?

ne0c0de commented 10 years ago

I noticed that node app was completely f*cked up. I corrected it.

Now i get on my every request:

Express 404 Error: ENOENT, stat '/tmp/screenshot_c5ed435cf6361229c3a00a89eef131e4.png'

i changed the tmp directory to another directory and give 777 with chmod command but i got same error again :/

PedroGabriel commented 10 years ago

Same error in here, using Ubuntu VM at Koding

[uncaughtException] { [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' }

ryangurn commented 10 years ago

This means that you do not have the phantomjs executable in your bin of your system or in the path variable... I had the same issue and thats how i fixed it.

bergkampho commented 10 years ago

Yes, im using Win7 64-bit. it can be solved by installed phantomjs and located the path.

However, i get the same errors as ne0c0de on every request.

Express 404 Error: ENOENT, stat '/tmp/screenshot_c5ed435cf6361229c3a00a89eef131e4.png'

ming535 commented 10 years ago

Same error, has any one following this issue? Has any one solved this issue?

zhangwei217245 commented 10 years ago

try this : https://github.com/zhangwei217245/webshot-rest-amqp-service

sferoze commented 10 years ago

I am having this issue. Installing phantomjs binary using brew install phantomjs solved it. But it still doesnt work, anytime I make a request like in the example I just get:

Stopping Phantomjs internal server Phantomjs internal server listening on port 3001

glaudiston commented 9 years ago

I did solve it by installing bzip2 and tar RUN yum install -y tar bzip2

hquadrat commented 9 years ago

Can confirm the solution by @ryangurn . Added a symlink to phantomjs in /bin.