Strange prerender behavior

Hey!

I am experiencing strange behaviour with prerendering for site maaloptijd-staging.

https://maaloptijd.dev/nl/faq/?escaped_fragment= for example shows the homepage (sort of, it looks a bit strange) instead of the actual screen.

Does this have to do with netlify rewrites or something? I don’t understand what’s happening. It’s supposed to go to the correct screen based on the URL (which it does if you go to https://maaloptijd.dev/nl/faq/).

Any pointers would make me happy.

I’ve now tried setting the global prerender state on window, but this also doesn’t work…

Hi @RWOverdijk, have you checked out this post:

One thing to note is that prerendered pages are cache from 24 to 48 hours and you may be seeing an older version of the page. Let me know if that helps.

Hey Dennis :slight_smile: I did actually check that out. I’m using a new page for every test, but it’s always showing the landing page and it’s always broken. It doesn’t seem to execute very well and I think that’s what’s causing the issues. I think it’ll be faster to just move it to Next.js and put it on vercel. Thanks for the help though :slight_smile:

hi there, can you say a little bit more about what isn’t working very well? we’d be happy to troubleshoot.

1 Like

Hey Perry, thanks for the reply.

I’ve disabled it now, but it wasn’t navigating (using react-navigation) and everything flex-box based was off.

tinkers in netlify

I’ve re-enabled it and this link is an example: https://maaloptijd.dev/nl/faq/?escaped_fragment=

This is what should happen: https://maaloptijd.dev/nl/faq

You might have to hard-refresh to see the effect (because of the web worker).

PS: Google does index it properly with prerendering disabled, but twitter, facebook etc don’t understand what I’m talking about :smile:

Well, that certainly does look strange, agreed. Our prerendering is a bit of a black box - the only real way to see the errors will be if you run a local copy as mentioned here:

That will expose any render errors - which are pretty hard to see in our internal logs (they aren’t corresponded to specific sites or threaded, so we get pieces of stack traces interleaved).

It does seem that the official prerender.io codebase (which we’ve forked) has the same misbehavior:

https://service.prerender.io/https://maaloptijd.dev/nl/faq/

(cf https://prerender.io/documentation/test-it as to what that is doing).

Sup fool (nice),

yeah. The weirdest thing is that I already did run it locally and I don’t see any errors (besides S3 bucket errors because I am not caching).

I guess it’s fine, I really should use Next.js or something… Such a huge investment of time is a shame, but if I keep pushing it it’s only going to get worse. Thanks for trying to help, I appreciate it :slight_smile: