veliovgroup / jazeee-meteor-spiderable

Fork of Meteor Spiderable with longer timeout, caching, better server handling
https://atmospherejs.com/jazeee/spiderable-longer-timeout
33 stars 9 forks source link

Error executing PhantomJS on Heroku #38

Closed vfportero closed 7 years ago

vfportero commented 8 years ago

Hi!

I'm getting this error when try to render this url: https://www.escapistas.club/?_escaped_fragment_=

2016-09-28T16:57:08.269592+00:00 app[web.1]: spiderable: phantomjs failed: { [Error: Command failed: /bin/sh -c phantomjs --load-images=no --ssl-protocol=TLSv1 --ignore-ssl-errors=true --web-security=false /app/.meteor/heroku_build/app/programs/server/assets/packages/jazeee_spiderable-longer-timeout/lib/phantom_script.js "https://www.escapistas.club/" 2016-09-28T16:57:08.269607+00:00 app[web.1]: ] 2016-09-28T16:57:08.269608+00:00 app[web.1]: killed: false, 2016-09-28T16:57:08.269609+00:00 app[web.1]: code: 255, 2016-09-28T16:57:08.269610+00:00 app[web.1]: signal: null, 2016-09-28T16:57:08.269612+00:00 app[web.1]: cmd: '/bin/sh -c phantomjs --load-images=no --ssl-protocol=TLSv1 --ignore-ssl-errors=true --web-security=false /app/.meteor/heroku_build/app/programs/server/assets/packages/jazeee_spiderable-longer-timeout/lib/phantom_script.js "https://www.escapistas.club/"' }

PhantomJS is installed on my Heroku web, is in the path and works locally.

Also, when execute i'm getting no response when execute this command in my heroku bash: phantomjs --load-images=no --ssl-protocol=TLSv1 --ignore-ssl-errors=true --web-security=false /app/.meteo r/heroku_build/app/programs/server/assets/packages/jazeee_spiderable-longer-timeout/lib/phantom_script.js "htt ps://www.escapistas.club/"

Any idea? Thanks for the help

jazeee commented 8 years ago

It looks like you are setting Meteor.isReadyForSpiderable = true and it looks like you are waiting for publications before setting that flag, so I am unsure why it wouldn't work.

I also tested curl https://www.escapistas.club/?_escaped_fragment_= which provided full content, and suggests that spidering is working.

Did you end up figuring it out, and if so, what was the problem?

vfportero commented 8 years ago

I set the Meteor.isReadyForSpiderable = true on the Router.configure method, is that correct?

I think is problem of the https call... if I try to get the same URL whit http instead https y get the correct answer. With https i get the same response with /?_escaped_fragment_= than whithout it: the regular meteor answer.

jazeee commented 8 years ago

I noticed a number of console errors in the browser when opening the https URL with escaped fragment. I wonder if that is the issue.

On Oct 6, 2016 2:43 AM, "Víctor Fernández Portero" notifications@github.com wrote:

I set the Meteor.isReadyForSpiderable = true on the Router.configure method, is that correct?

I think is problem of the https call... if I try to get the same URL whit http instead https y get the correct answer. With https i get the same response with /?_escapedfragment= than whithout it: the regular meteor answer.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jazeee/jazeee-meteor-spiderable/issues/38#issuecomment-251890019, or mute the thread https://github.com/notifications/unsubscribe-auth/AFXnaBo4pjNIWcOzJkMcStQlPvKfYSHAks5qxKaUgaJpZM4KJEgs .

vfportero commented 8 years ago

To try to avoid the problem i've changed locally the phantom.js script to replace https call for plain http. Is for that reason that you can view the complete html when make the curl call: this is getting the http response.

jazeee commented 8 years ago

I don't know why your setup fails. I also use https, and it works fine. I wonder if mixed mode http/https is the issue...

On Oct 8, 2016 6:03 AM, "Víctor Fernández Portero" notifications@github.com wrote:

To try to avoid the problem i've changed locally the phantom.js script to replace https call for plain http. Is for that reason that you can view the complete html when make the curl call: this is getting the http response.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jazeee/jazeee-meteor-spiderable/issues/38#issuecomment-252418588, or mute the thread https://github.com/notifications/unsubscribe-auth/AFXnaC8B6GCAmNjhTfIJZjtuRp9dDP__ks5qx3iOgaJpZM4KJEgs .

dr-dimitru commented 7 years ago

Hello @vfportero ,

Have you tried --ssl-protocol=any flag?

Here is flags used on my end:

--load-images=false --ssl-protocol=any --ignore-ssl-errors=true --disk-cache=true --disk-cache-path=/data/phantomjs --web-security=false
dr-dimitru commented 7 years ago

Closed due to silence at issue owner end. Feel free to reopen it in case if the issue still persists on your end.