Prerendering not working

Site: https://graceful-pasca-92362a.netlify.app/
=> Domain: https://www.gideonking.com/

I have just deployed a Vue 3 app which has dynamic routes, so I am using useHead to supply meta tags appropriate to each page. I understand that the crawlers from the likes of facebook and linkedin do not trigger javascript to load, so I enabled pre-rendering on netlify.

When I try to share a site link on LinkedIn, it does not generate a preview, and when I use their post inspector tool it says it can’t load the URL.

My test URL is https://www.gideonking.com/gallery/10cf851e-db78-45ff-a953-0ac91930fb1b
and you can see the results of trying to debug the issue on their tool at https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fwww.gideonking.com%2Fgallery%2F10cf851e-db78-45ff-a953-0ac91930fb1b

Similarly, it fails on facebook’s tool https://developers.facebook.com/tools/debug/?q=https%3A%2F%2Fwww.gideonking.com%2Fgallery%2F10cf851e-db78-45ff-a953-0ac91930fb1b

However, if I use curl to fetch the URL with the user agent specified like this:

curl -A LinkedInBot https://www.gideonking.com/gallery/10cf851e-db78-45ff-a953-0ac91930fb1b

It returns the correct information, including the dynamically updated headers.

Similarly, if I use Facebook’s recommended command to fetch it, it again returns the correct results:

curl -v --compressed -H "Range: bytes=0-524288" -H "Connection: close" -A "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)" "https://www.gideonking.com/gallery/10cf851e-db78-45ff-a953-0ac91930fb1b"

In this particular case, the correct og:title is Stampede. If I fetch without specifying a user agent, it just gives me the contents of my index.html, without loading any Javascript, which is expected.

At one stage, Facebook was showing a 502 error when it was trying to scrape the page, but now it’s just hanging when trying to access it.

I have tried installing the netlify fork of the prerender code locally and running my app through that and it worked fine in that scenario too. I have set up a robots.txt to make sure that everything is allowed.

Is there something else I need to do to get this up and running?

Another data point - not sure if it has any relevance. My brother who lives in NZ tried to open the website on his phone and it wouldn’t let him because it said it wasn’t secure. I can open it fine here in Australia, and it has a valid certificate and redirects http to https, so that may be a separate thing to look into, but I thought I’d mention it…

Edit: he can’t reproduce the problem

Another data point on this:

This:
curl https://www.gideonking.com/gallery/10cf851e-db78-45ff-a953-0ac91930fb1b\?_escaped_fragment_\=
returns the unrendered page (i.e. just index.html)

and this:
curl -A twitterbot https://www.gideonking.com/gallery/10cf851e-db78-45ff-a953-0ac91930fb1b
returns the rendered page with the right met tags

The Facebook Sharing Debugger will not load the page

Pre-rendering is a beta feature and we currently do not allocate any significant engineering or Support resources. It will continue to work, but seeing flaky behaviour is expected.

With that being said, as long as passing the user agent is working to get the correct response is working, prerendering itself is working. We won’t be able to understand or explain why Facebook debugger is not able to load the page.