Prerendering issue

answered
#1

Hi! I have an issue with Netlify prerendering. I was previously hosting my website with a nginx proxy and a local prerender-io instance and it worked well.

I then moved it to netlify and activated the prerendering service. Since it was working with prerender before, all pages have the <meta name="fragment" content="!"> header, no hash URL, and window.prerenderReady management.

A sample page can be seen here and its prerendered-io html here.

However, nothing is parsed with Netlify prerender service, just the raw html before JS. (I’m using react-helmet to set all the relevent opengraph metadata after data retrieval.)

I tried to parse this page with the cloned netlify prerendering instance and got the following logs:

curl -A twitterbot https://dev.streamfizz.live/video/cjucjaxwy3kfp0760pq9x90om

2019-04-26T08:26:43.826Z Starting Chrome
2019-04-26T08:26:44.339Z Started Chrome: HeadlessChrome/74.0.3729.108
2019-04-26T08:27:59.244Z S3 PUT failed error=“MissingRequiredParameter: Missing required key ‘Bucket’ in params” url="[mypage]"

Same thing happens for something like a google URL, for instance.

If the same issue is in production, that could explain it.

Has anyone experienced the same issue or is the netlify prerendering service working as expected?

Thanks in advance!

Julien

#2

Since we don’t use prerender.io’s codebase directly (we use a fork that has missing features since those are not open sourced by prerender.io), that isn’t a good test methodology, and in fact, shows a proximate cause of the problem to be that we are a few months behind on tracking HEAD of prerender.io’s project, which is a bit problematic for us (it’s not just an update; have to adjust things to work with our setup as well).

I see that our service has prefixed the plaintext string html to the output which is clearly not correct, so I’ll work with my team on getting that resolved ASAP. I’m not sure but that may be the “interfering” factor here, and it is probably something you can work around temporarily by removing your <!doctype html> as mentioned in the open bug on the issue we are tracking here:

#4

Hi @fool, thanks for your answer!
I subscribed to the github thread and will look forwards for any updates.

As requested, I removed my <!doctype html> and generated a new page. However, it seems that there’s no prerendering anymore, a curl as twitterbot returns a plain html in less than a second.

Using the local netlify prerender instance works after 79 second with the following error in the logs:

2019-04-30T07:47:45.697Z S3 GET failed error="MissingRequiredParameter: Missing required key 'Bucket' in params" url="https://dev.streamfizz.live/video/cju47djw938n90760vrkwoeca"

#5

Hi @jbarret, I just did this curl command you posted and I do see prerendered content:

Perhaps you were seeing the old prerendered content. We do cache prerendered content for 24 to 48 hours. It seems that by the time I tried it, the cache has expired. You’ll want to keep that in mind when testing since prerendering will be cached for that duration regardless of any changes to your page.