Experimental HTTPS in NextJS 16.2, ERR_EMPTY_RESPONSE #202736
Replies: 2 comments 1 reply
-
|
This sounds like the HTTPS setup itself is working, but something is breaking when the authentication flow triggers a request or redirect. A few things I'd check:
Since the page loads normally over HTTPS and only fails during login/logout, I'd suspect an API route, authentication callback, or middleware issue rather than the experimental HTTPS feature itself. Which authentication setup are you using (NextAuth/Auth.js, custom API routes, Clerk, Supabase, etc.)? That would help narrow it down. |
Beta Was this translation helpful? Give feedback.
-
|
Hey Fred638, Looks like your HTTPS setup itself is fine — the error usually happens when something in the login or logout redirect breaks before the server sends a response. Try these quick checks: If everything looks correct, try running without --experimental-https and use a local proxy like mkcert or Caddy to confirm whether the issue is in Next.js’s experimental HTTPS layer. It’s usually just a redirect or cookie config mismatch — once those line up, the error should disappear. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
Body
I have configured my application to use https;
"dev": "next dev --experimental-https, installed a self-signed certificate. All good, however, when logging in or logging off the page shows, "... localhost didn't send any data. ERR_EMPTY_RESPONSE."Guidelines
Beta Was this translation helpful? Give feedback.
All reactions