What version of Next.js are you using?
11.1.0
What version of Node.js are you using?
14
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
other
Describe the Bug
Since upgrading to 11.1.0 we're seeing numerous errors that contain this message in our logs:
[ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
The stacktrace is quite clear:
"at Server.renderError (/app/node_modules/next/dist/server/next-server.js:1363:17)",
"at Server.render404 (/app/node_modules/next/dist/server/next-server.js:1472:21)",
"at Server.renderToResponseWithComponents (/app/node_modules/next/dist/server/next-server.js:1257:28)",
I tried to go through the history but could not find any changes besides this PR: #27303
Expected Behavior
We reverted back to 10.0.x because the 404 page was breaking too often. Would be nice if the next.js team could help with debugging this.
To Reproduce
Haven't been able to isolate the case where this breaks sadly.