I have been noticing some incorrect meta data on a few of our Gatsby SSR pages. If I inspect the page with view source I can see the SSR html code and the meta title, description, og title, og description., twitter title, etc. are all incorrect and show data from another unrelated page. Everything else looks fine on the page except the meta data is coming from another page. But if I view the page and inspect with the chrome dev tools I see the correct meta data. This at least tells me the SSR page starts with incorrect data and then the correct meta data is added on page load. This seems to be related to the @netlify/plugin-gatsby because clearing the cache and triggering a rebuild would fix the issue every time we saw this.
Ive had to remove the @netlify/plugin-gatsby(v2.1.2) because this issue was starting to happen too often over the last 2 weeks. So I do not have a live example to show. What I do have to show are a couple screenshots below that I took when this was happening yesterday. The project repo is also private so Im afraid I cant share a code base. We have a paid Netlify account here so maybe the support team can take a look at the logs of this site.
One thing that might help is if you can describe how the Netlify cache plugin is affect that the SSR process? The Netlify cache plugin is somehow grabbing the wrong meta data with our SSR Gatsby pages.
This is the page view source showing the meta data for the wrong page:
This is a Slack URL share showing the wrong meta data:
Sorry for the delay here. I checked now and it appears that the page is showing correct metadata. Are you still having this issue?
@hrishikesh I mentioned in my post that I had to remove the @netlify/plugin-gatsby in order to get the meta data to work correctly. So its working only because I uninstalled @netlify/plugin-gatsby. I would like to use @netlify/plugin-gatsby but not until can figure out why this plugin is causing meta data issues on our site.
The problem still exists. Can you help me figure out why?
Can you describe how this Netlify cache plugin is affect that the SSR process? The Netlify cache plugin is somehow grabbing the wrong meta data with our SSR Gatsby pages.
Would you be able to setup the site on another URL so we can check? The thing is SSR responses are never cached (but DSG are), so we do not expect this behaviour at all. Once we have a URL to check, we can try to produce some theories.
@hrishikesh I installed the Essential Gatsby plugin on https://particle-staging-01110000.netlify.app Take a look there and let me know if you see anything that could be causing this.
For the page:
That’s the meta that we’re seeing. So the text is:
Understanding where IoT is in its hype cycle isn't just a thought exercise. It can have major implications for how you think about solving customer problems by deploying connectivity in your solutions.
Since you didn’t mention what the expected text was, I’m not sure if this is cached or correct. It does appear to be different from the one you posted, so I’m assuming it’s correct?
Are there any other pages affected, or is that the only one? Did you notice the cache get cleared automatically in a few days or something of that sort?