Next.js 13.4 displays text instead of content due to improper handling of Vary header

My site name is deploja-site.netlify.app

As of writing, I have had to downgrade to 13.2, so the issue is not visible on this site.

I’m using the new app router feature released in Next.js 13.

The issue observed is that, intermittently, I will get a response starting with text, such as:

0:[["children",["slug","/slug","oc"],
1: ...

The issue is described here: Showing data dump in the type `text/x-component` on the UI · vercel/next.js · Discussion #48527 · GitHub
The suspects involve headers and caching.

When running the server in production mode locally, I do not experience this issue.

This is a known issue, so far no timeline to fix or no workarounds known.

Hey @hrishikesh
Are there any updates on this? One of my clients projects is not really working well because of that issue in Netlify. I don’t wish to migrate to Vercel but if that doesn’t get resolved soon I might have to.

Would be nice if you have any updates on timeline for fixing that.

No updates at the moment, @OFranke_limebit. In an optimistic scenario, we might be able to fix this in a release we’re planning in October, but it’s far from being considered official - it’s more in a PoC stage.

Hey @hrishikesh
Any updates on a fix for this issue??

One of the projects I have is having this issue quite frequently. & it looks bad for users…

If no official fix is out yet, are there any tips on why this could happen & how we could reduce the chance of it happening??

Thanks.

We’re not investigating issues individually until we ship the new Next.js Runtime, so the cause of this issue has never been investigated. I believe it has something to do with how the ISR responses get cached when used in a combination with RSC, but that’s as far as the investigation has gone. There’s no known solution or workaround for this right now.

Once the new Next.js Runtime is shipped, it would automatically fix several issues and then we can revisit the issues that still need some manual fixes.