Open matiasfha opened 10 years ago
I was able to reproduce this issue with the URL given with just phantomJS. This an ssl error with phatomJS that isn't getting reported well, but basically the default configuration has a set of allowed SSL protocols and the server that site/url is using a different one,
Fix: if you use the "--ssl-protocol=any" with phantomJS it works.
More information can be found here: http://stackoverflow.com/questions/12021578/phantomjs-failing-to-open-https-site
Simply pass that configuration to phantomJS with webshot (check the readme) and I think you should be set.
Note: This isn't something webshot should automatically do for you. The developer needs to decide to overwrite the ssl settings for themselves, so I'd say add a note in the readme and close the ticket.
:+1:
How exactly do I pass the "--ssl-protocol=any" in to the webshot function ? .. found it, "phantomConfig"
I upgraded to phantom 2.x .. and ran with phantomConfig: { "ssl-protocol":"ANY", 'ignore-ssl-errors': 'true' }
.. still getting this.. err: [Error: PhantomJS exited with return value 1]
error..
weird thing is I get this on my AWS box but not on my localhost.
I am using PhantomJS 2.1.1 and phantomConfig: { "ssl-protocol":"ANY", 'ignore-ssl-errors': 'true' }. Even though its giving same error [Error: PhantomJS exited with return value 1]
PhantomJS exited with return value 1, just tells us that PhatomJS had an error. It does not tell us what the error was. In the original issue the error was related to an SSL compatibility issue. That may have nothing to do with your problems.
Try to connect to the site with just PhantomJS, and look at the error PhatomJS is giving you. Webshot should probably bubble up the error, but (unless something has change recently) currently does not.
:+1:
Is there any solution for [Error: PhantomJS exited with return value 1] ? I am using this module (node-webshot) with SailsJS, seems it's working fine on my local setup but on Amazon linux server getting this error.
FYI: If I run a raw phantomjs test.js with some code it seems working fine but when I try to get a screenshot using webshot I am getting this error though I am using phantomConfig: { "ssl-protocol":"any"}
Any suggestion?
Any update on this? I'm getting this error usnig webshot
I just ran into this issue as well. It seems that when you supply phantomConfig for ssl purpose, you will need to define phantomPath as well. I added that and it works.
I have this code
It's works!, but with some url, just not render de image, The url for test: https://medium.com/@moon_beamed/on-going-viral-62a3e71ddac4 i'm get
if i don't use gm
i get