Next.js Discord

Discord Forum

RSC payload is all that is sent from the server in the document request

Answered
Little yellow ant posted this in #help-forum
Open in Discord
Little yellow antOP
For whatever reason, one of my pages is rendering only something like the below RSC payload on one of my pages:

0:["development",[["children","(ConstrainedWidthPrimaryLayout)","children","account","children","overview","children","(MainOverviewLayout)","children","PAGE",["PAGE",{}],null,null]]]

For some accounts it works and some it doesn't... for a time. Eventually it decides to actually try rendering the page and then it works from then on.
Answered by Little yellow ant
It turned out to be a redirect in middleware. For whatever reason when the request came in the _rsc= parameter is stripped off so when the request is cloned to change the pathname, it results in that situation.
View full answer

6 Replies

Little yellow antOP
I have tried commenting out my page and just essentially turning it to a hello world but that doesn't get hit either. I added logging all the way up to the root layout, it doesn't ever get hit when it is returning that. Middleware does get hit each time though
When I run it in dev mode and change the contents it runs through the whole stack but doesn't return it. Then when you hit the page it keeps returning the RSC payload but nothing else.
oh and for some reason this only happens on iOS
Little yellow antOP
It looks like putting a redirect from a different url to the intended url in middleware will resolve the issue for that account. It is also resolved by adding a query param
Little yellow antOP
I have tried both 14.2 and the latest 15 versions. They both have the same issue
Little yellow antOP
It turned out to be a redirect in middleware. For whatever reason when the request came in the _rsc= parameter is stripped off so when the request is cloned to change the pathname, it results in that situation.
Answer