#[next-auth][error][CLIENT_FETCH_ERROR] AWS Amplify Hosted returns invalid JSON response body at

10 messages · Page 1 of 1 (latest)

night terrace
#

Hello,

I'm struggling to get next-auth to work properly on AWS Amplify. Error states the CLIENT_FETCH_ERROR however the log reports an invalid JSON response (first image).

Things I've tried:

  • Ensured .env config is output in the next.config.js file
  • Ensured .env is being set in the Build Settings
  • NEXT_AUTH_URL is set and being pulled in the .env
  • Tried setting NEXTAUTH_URL_INTERNAL
  • Validated that the NEXT_AUTH_URL is set to the same as application host
  • Non-secure API endpoints all return valid results
  • Changing different NextJS and Next-Auth versions ( still trying different combinations )

Any other thoughts to get this to work?

plain yew
#

this happens to me in vercel too

night terrace
#

I keep trying the different suggestions on other threads; example use of NextJS 12.3.1 and Next-Auth to 4.14.0 - might get a slight change in the error, to invalid GET on request, but nothing working yet for me.

night terrace
#

well, after some testing looks like I'm switching over to Firebase for authentication now.

plain yew
#

I got mine working 😮

glad breach
#

@plain yew how did u do that?

#

I also have an issue with Vercel

weak thunder
#

issue is happening to me now, randomly. everything was fine before

jaunty cedar
#

LITERALLY

jaunty cedar