[next-auth][error][CLIENT_FETCH_ERROR]
https://next-auth.js.org/errors#client_fetch_error fetch failed {
error: {
message: 'fetch failed',
stack: 'TypeError: fetch failed\n' +
' at Object.fetch (node:internal/deps/undici/undici:11118:11)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)',
name: 'TypeError'
},
url: 'http://localhost:3000/api/auth/session',
message: 'fetch failed'
}
Changing the following worked for me (.env files)
NEXTAUTH_URL=http://localhost:3000
to
NEXTAUTH_URL=http://127.0.0.1:3000
Thank you so much, I have been looking for a long time and finally found it!
Ande then do I need to put the NEXTAUTH_URL somewhere?
Hi Lucas,
I am so sorry. That is part of the “.env” file . Those are the the constants you use for autoconfiguration.