vbauer / manet

Website screenshot service powered by Node.js, SlimerJS and PhantomJS
MIT License
575 stars 102 forks source link

Process Error with slimmerjs #31

Closed webtrend closed 9 years ago

webtrend commented 9 years ago

Due to the issue as described here https://github.com/vbauer/manet/issues/19

I enabled slimmerjs instead of phantojs. Now I get a "error: Process errror" for any capture I try to do. Here is the output

curl http://localhost:8891/?url=cnn.com > cnn.png

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0info: Capture site screenshot: cnn.com
**error: Process error:**
100    43  100    43    0     0    148      0 --:--:-- --:--:-- --:--:--   148

Due to the lack of any additional information, I am unable to figure out what is going on. Any ideas?

vbauer commented 9 years ago

Hello @webtrend, Did you try to use command-line parameter "--level=debug" to get additional information on server-side?

webtrend commented 9 years ago

Thanks @vbauer. I just tried debug at command level. I am still not getting any useful information. Here is the output

root@localhost:~# curl http://localhost:8891/?url=cnn.com > cnn.png
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0debug: Sending image ("cnn.com") in response
info: Capture site screenshot: cnn.com
debug: Options for script: {"url":"http://cnn.com"}, base64: eyJ1cmwiOiJodHRwOi8vY25uLmNvbSJ9
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0debug: Process output:
error: Process error:
debug: Execution time: 0.31 sec
debug: Process finished work: eyJ1cmwiOiJodHRwOi8vY25uLmNvbSJ9
100    43  100    43    0     0    123      0 --:--:-- --:--:-- --:--:--   123

root@localhost:~# more cnn.png
{"error":"Can not capture site screenshot"}

When I start the manet server, I get following output:

root@localhost:~# manet --engine slimerjs --level=debug &
[1] 31292
root@localhost:~# info: Initialize FS watchdog: directory: /tmp, timeout: 3600000
debug: Default configuration file: /usr/local/lib/node_modules/manet/src/config/default.json
debug: Configuration parameters: {"port":8891,"cors":false,"ui":true,"silent":false,"level":"debug","engine":"slimerjs","options":{},"timeout":60000,"compress":false,"cache":3600,"cleanup":false,"commands":{"slimerjs":{"linux":"xvfb-run -a slimerjs","freebsd":"xvfb-run -a slimerjs","sunos":"xvfb-run -a slimerjs","darwin":"slimerjs","win32":"slimerjs.bat"},"phantomjs":{"linux":"phantomjs","freebsd":"phantomjs","sunos":"phantomjs","darwin":"phantomjs","win32":"phantomjs"}},"whitelist":[".*"],"XDG_SESSION_ID":"1","TERM":"xterm","SHELL":"/bin/bash","SSH_CLIENT":"**ip addr blocked** 5872 22","SSH_TTY":"/dev/pts/0","USER":"root","LS_COLORS":"rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:","MAIL":"/var/mail/root","PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games","PWD":"/root","LANG":"en_US.UTF-8","SHLVL":"1","HOME":"/root","LOGNAME":"root","SSH_CONNECTION":" **ip addr blocked ** 22","LESSOPEN":"| /usr/bin/lesspipe %s","XDG_RUNTIME_DIR":"/run/user/0","LESSCLOSE":"/usr/bin/lesspipe %s %s","_":[],"OLDPWD":"/usr/local/lib/node_modules/manet","$0":"/usr/local/bin/manet","storage":"/tmp"}
info: Manet server started on port 8891

I don't see anything obviously wrong in the above output. Am I missing any dependencies?

webtrend commented 9 years ago

I also want to say that the manet server works fine with phantomjs but there is an issue with width and height parameter as described in my first post.

ghost commented 9 years ago

I had the same problem. Following the installation docs for slimerjs solved it for me. Just run this command:

sudo apt-get install libc6 libstdc++6 libgcc1 libgtk2.0-0 libasound2 libxrender1
webtrend commented 9 years ago

@netlovers Thank you so much. Problem solved.

I really appreciate your help guys.

vbauer commented 9 years ago

@webtrend Did this article help you to solve this problem? (if yes, I'll add it in the README)