NexAuth returning action not found


Since last Tuesday afternoon, all of our PRs previews have been returning:

Error: This action with HTTP GET is not supported by NextAuth.js

Screen Shot 2022-10-20 at 18.16.52

This is an error that comes from NextAuth and from their docs that could be related to not specifying a NEXTAUTH_URL variable. We’ve been following Netlify docs that say there’s no need to set that variable since is done automatically, but suddenly is just not working anymore.

Everything works fine in local mode, and we have tried setting the variable in the netlify.toml file but no results.


We had the same issue in production too, but after coming back to an old commit and rebuilding the project the error stopped appearing. It looks like something could be being cached, but we are not able to find what it is and the relation with NexAuth.

I’m not sure what is causing the problem and why is popping. We’ve been using NexAuth for the past 6 months with no issues.

Thanks in advance.

We are having the same issue too, it occurs on every new build

Update: Manged to solve the issue by upgrading to next@12.3.1 and next-auth@4.14.0

1 Like

Hi, I’m facing the exact same issue. Working fine with localhost and vercel. Can you tell me which next-js plugin you’re using with netlify.

Update thank you! Using next@12.3.1 and next-auth@4.14.0 worked.

1 Like

Indeed, updating Next-js solves the problem. We were using 12.1.0, we have upgraded to 12.3.1. There was no need to update NextAuth. Looks like the issue is related to how Netlify is handling functions.

Screen Shot 2022-10-24 at 11.17.10

Thanks for sharing this, folks :wave: I am glad that you all have found a solution and that you are not blocked. Happy building :rocket: