vbauer / manet

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

No such file or directory (Error) #74

Open vpn opened 7 years ago

vpn commented 7 years ago

I'm having a problem when trying capture a website. Whenever I try a website, any website at all, I am getting the error

{
    "error": {
        "error": "Can not capture: google.com"
    }
}

When running manet in debug mode I am getting the following output

{Server+/-Time} - debug: Request query parameters: {"url":"google.com","selectorCrop":"false"}
{Server+/-Time} - debug: Request body parameters: {}
{Server+/-Time} - debug: Sending file ("google.com") in response
{Server+/-Time} - info: Capture site screenshot: "google.com"
{Server+/-Time} - debug: Options for script: {"url":"http://google.com","selectorCrop":false}, base64: eyJ1cmwiOiJodHRwOi8vZ29vZ2xlLmNvbSIsInNlbGVjdG9yQ3JvcCI6ZmFsc2V9, command: ["phantomjs","--ignore-ssl-errors=true","--web-security=false","/usr/lib/node_modules/manet/src/scripts/screenshot.js","eyJ1cmwiOiJodHRwOi8vZ29vZ2xlLmNvbSIsInNlbGVjdG9yQ3JvcCI6ZmFsc2V9","/tmp/af296973dbf794cbe18d66fa984eac349180a0f2.png"]
{Server+/-Time} - debug: Process output:
: No such file or directoryerror: Process error: /usr/bin/env: node

{Server+/-Time} - debug: Execution time: 0.02 sec
{Server+/-Time} - debug: Process finished work: eyJ1cmwiOiJodHRwOi8vZ29vZ2xlLmNvbSIsInNlbGVjdG9yQ3JvcCI6ZmFsc2V9
{Server+/-Time} - error:  error=Can not capture: google.com

My inital thought was that there was a problem with my node setup, but I have checked and I have correctly linked it. The output of ls -lah /usr/bin/node is

root@mk:/usr/bin# ls -lah /usr/bin/node
lrwxrwxrwx 1 root root 40 Jan 17 21:12 /usr/bin/node -> /root/.nvm/versions/node/v7.4.0/bin/node
vbauer commented 7 years ago

@vpn Could you please run manet with debug logging level (it will provide some additional information)?

Ex:

manet --level=debug
nikoma commented 6 years ago

Same here on Windows 10. 2018-03-02T05:05:31.139Z - debug: Execution time: 2.13 sec 2018-03-02T05:05:31.141Z - debug: Process finished work: eyJ1cmwiOiJodHRwOi8vd3d3LmVxYm90aWNzLmNvbSJ9 2018-03-02T05:05:31.146Z - error: Error while sending data file: ENOENT: no such file or directory, stat 'C:\Users\manek\AppData\Local\Temp\8a09ae3e79aab90afc91939e806a957ab602537d.png' 2018-03-02T05:05:51.359Z - debug: Request query parameters: {"url":"google.com"} 2018-03-02T05:05:51.361Z - debug: Request body parameters: {} 2018-03-02T05:05:51.367Z - debug: Sending file ("google.com") in response 2018-03-02T05:05:51.369Z - info: Capture site screenshot: "google.com" 2018-03-02T05:05:51.371Z - debug: Options for script: {"url":"http://google.com"}, base64: eyJ1cmwiOiJodHRwOi8vZ29vZ2xlLmNvbSJ9, command: ["phantomjs","--ignore-ssl-errors=true","--web-security=false","C:\Users\manek\AppData\Roaming\npm\node_modules\manet\src\scripts\screenshot.js","eyJ1cmwiOiJodHRwOi8vZ29vZ2xlLmNvbSJ9","C:\Users\manek\AppData\Local\Temp\6cb5cc98058f44169418625e4ef37cb83fcadd42.png"] 2018-03-02T05:05:53.483Z - debug: Process output: Script options: {"url":"http://google.com"}

2018-03-02T05:05:53.486Z - debug: Execution time: 2.11 sec 2018-03-02T05:05:53.486Z - debug: Process finished work: eyJ1cmwiOiJodHRwOi8vZ29vZ2xlLmNvbSJ9 2018-03-02T05:05:53.488Z - error: Error while sending data file: ENOENT: no such file or directory, stat 'C:\Users\manek\AppData\Local\Temp\6cb5cc98058f44169418625e4ef37cb83fcadd42.png'