Showing data dump in the type text/x-component on the UI
#48527
Replies: 10 comments 6 replies
-
|
Hi, We are actually struggling with the same problem. Turns out that Next.js does some magic with the "vary" header, which instructs caching layers/services how to cache the content. If your caching layer, like a CDN, doesn't handle the vary header, or handles it incorrectly, then this can happen. I'm haven't found any official documentation on this, but I found this discussion that might help you: https://www.reddit.com/r/nextjs/comments/13bizz0/hosting_ssr_site_with_cache_control/ |
Beta Was this translation helpful? Give feedback.
-
|
I am experiencing this problem. |
Beta Was this translation helpful? Give feedback.
-
|
Were you able to find a solution for this issue? We are having this problem with cloudfare caching. |
Beta Was this translation helpful? Give feedback.
-
|
We’re encountering the same issue while using Cloudflare. Since Cloudflare doesn’t support the Vary header, we initially assumed that could be the root cause. However, based on this comment from @timneutkens, it seems the introduction of the _rsc query parameter should address this:
Does this mean there's a bug? My understanding from the comment is that all RSC requests should now include the _rsc parameter, which should make the Vary header unnecessary. |
Beta Was this translation helpful? Give feedback.
-
|
Has anyone made any progress on resolving this issue? We've been experiencing an identical problem for the past two days with the following technical details: Environment:
Issue Description: Current Workaround: Question: |
Beta Was this translation helpful? Give feedback.
-
|
We just ran into this issue as well. We have a Google Cloud CDN in front of our frontends which we just upgraded to For our case, I believe this was caused by changes to the To confirm this, I created a fresh
My understanding is that this allowed our CDN (and likely browser caches) to incorrectly serve an RSC payload (which might have been cached from a client-side navigation or prefetch, or an SSR fallback). We upgraded one of our staging environments to Although our CDN did have |
Beta Was this translation helpful? Give feedback.
-
|
Having the same issue. I disabled the cache in cloudfront :( for now to get it working properly but would like a real solution so I can go back re-enable the cache I was on v15.3.0 updating to 15.4.0-canary.49 did not fix the issue for me |
Beta Was this translation helpful? Give feedback.
-
|
Having the same issue. |
Beta Was this translation helpful? Give feedback.
-
|
Having the same issue. The official of Next.js has some conflicts with the CDN provider,View the following article: Solution:
|
Beta Was this translation helpful? Give feedback.
-
|
Has anyone managed to solve this issue? We are running latest Next 14 while self hosting on AWS and it seems like the only solution is to turn the caching off on cloudflare side. Edit: Looks like Cloudflare has acknowledged the issue and suggests two solutions for this problem in this doc https://developers.cloudflare.com/cache/advanced-configuration/serve-tailored-content/ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
When I do a client side navigation from Page A to Page B using Link component, the page renders correctly.
When I check the network request, the type of the content being
text/x-componentand the response being:0:[["children",["slug","/slug","oc"],in this format.Now when I refresh the page, I get:
0:[["children",["slug","/slug","oc"],being dumped on the UI in place of HTML.I suspect this to be a cache issue, because when a query param is added the page renders perfectly and when I bypass the cache it renders correctly.
This does not happen there is a server navigation.
Can someone shed some light on this ?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions