Next.js Discord

Discord Forum

NextAuth.js SignOut function does not redirect and throws error "Missing 'next-action' header"

Unanswered
Masai Lion posted this in #help-forum
Open in Discord
Masai LionOP
Hello everyone, I'm fairly new in Next.js and I assume I made a very rookie mistake, but I'm unable to solve it.

Version: Next.js 14.0.4

Expected behavior: After onClick() is executed in my page.tsx, the User gets redirected to the homepage of the website.

Current behavior: After onClick() the following error is displayed: Error: Failed to find Server Action "null". This request might be from an older or newer deployment. Original error: Invariant: Missing 'next-action' header.

I have tried to modify the next-action header accordingly in the screenshot below, but with no success. Any tips are very appreciated!

0 Replies