Search code examples
meteormeteor-up

Googlebot returns with AJAX temporarily unreachable in Meteor Js Application


I built a Meteor application and installed the spiderable package. I've deployed with Meteor Up smart package. Everything seems to be working fine but in google webmaster tools I only get partial page rendering. I have checked that the <meta name="fragment" content="!"> is present in the <head> section. The site can be seen at http://adjustmentjobs.com

The errors listed by googlebot are as follows: https://checkout.stripe.com/v2/checkout.js Script Blocked http://adjustmentjobs.com/sockjs/725/ju0i7bzc/xhr_send AJAX Not found
http://adjustmentjobs.com/sockjs/068/uat6sjkk/xhr_send AJAX Temporarily unreachable http://adjustmentjobs.com/sockjs/370/u7hz6996/xhr_send AJAX Temporarily unreachable http://adjustmentjobs.com/sockjs/info?cb=nqf08z0y_h AJAX Temporarily unreachable http://adjustmentjobs.com/sockjs/info?cb=wqf89krdmo AJAX Temporarily unreachable

I think the problem might be with phantomjs on the server but I can't determine what exactly the problem is. Any help would be appreciated.


Solution

  • If you see sockjs/info?cb=xxx as an error, spiderable isn't working.

    Spiderable is a bit quirky when it comes to debugging. There are some weird issues, so make sure:

    • If you use select2 make sure you use a version without the accented characters. Which spiderable is not compatible with (bit odd). Use a compatible package from atmosphere that have these removed.

    • If you use ssl check that your certificate isn't being rejected.

    • Check that each of your publish methods actually return something, if they return nothing and don't call this.ready() then spiderable will time out waiting to render the page.

    • Check the page can render on your own computer using a local version of phantomjs (gives out debug errors too). A script that does this can be found on : http://www.meteorpedia.com/read/spiderable/

    • Check your server logs for output from phantomjs's stderr

    • There are a couple of packages on atmospherjs that have forked versions of spiderable that provide a bit more debug info, you could use those to see whats going wrong.

    • Check your web page's raw html source to see that the html is actually being rendered by appending ?_escaped_fragment_=# to the url. You shouldn't expect to see an empty body.

    Also looking at your site http://adjustmentjobs.com/?_escaped_fragment_=# it looks like all is okay. You might want to check that all pages work.

    Also Googlebot will 'test' your site without the ?_escaped_fragment_, so in this case there will be errors like the above.