Closed brandon-kong closed 1 year ago
getting the same error
Tried to reproduce it, but it works correctly, logged in successfully.
Please open a new issue with a proper reproduction.
@balazsorban44 Interesting... If you selectively install next v13.4.13 with npm i next@13.4.13
, are you also able to get the same results?
Here's the output I got from following my reproduction steps on a different device than the one in the environment section: https://github.com/nextauthjs/next-auth/assets/95515854/cc3a95f9-9761-4621-8223-52fe2afc118e
Update: Interestingly enough, I reverted back to 13.14.12, deleted node_modules and installed next@latest, and it seemed to work. Nonetheless, this seems to be a circumstantial issue that doesn't consistently happen. Does this seem like something to bat an eye to?
Try upgrading node https://github.com/nodejs/node/issues/46704 I had the same problem with same node version( or at least similar version ) upgrading fixed it.
Same - upgrading to 18.17.1 worked for me
I also had the same issue with next.js 13.4.17, and I had tried different version of nodejs (both 18.17.1 and 19.6.1), but diden't work for me. I finally change my next.js to version 13.4.12, and the issue has magically gone.
Upgrading NodeJS to 18.17.1
fixed this issue for me as well.
@yarrichar Thank you!
Thank you @yarrichar
Next v13.4.19 - Node 19.6.1, does not work.
Next v13.4.19 - Node v19.6.1 does not work Next v13.4.19 - Node v18.17.1 works fine
Next v13.4.19 - Node v18.14.1 does not work Next v13.4.19 - Node v18.17.1 works fine
Next v14.0.0 - Node v18.17.1 doesn't work
Next v14.0.0 - Node v18.17.1 doesn't work
same here !
Next-Auth v4.24.4 is now ok to install on Next v14.0.0, well done guys!
Next-Auth v4.24.4 is now ok to install on Next v14.0.0, well done guys!
thanks for telling us, will try it out. good luck !
Environment
System: OS: Windows 10 10.0.19045 CPU: (12) x64 AMD Ryzen 5 3600X 6-Core Processor Memory: 5.74 GB / 15.91 GB Binaries: Node: 18.14.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD npm: 9.5.0 - ~\AppData\Roaming\npm\npm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (115.0.1901.203) Internet Explorer: 11.0.19041.1566
Reproduction URL
https://github.com/brandon-kong/next-auth-next-test
Describe the issue
The latest version of Next-Auth as of August 13, 2023 is not compatible with Next.js v13.4.13. When attempting to go to
/api/auth/signin
OR use Next-Auth's session functions likegetServerSession
,signIn
,getSession
, etc..., the server output dumps:TypeError: cookies is not iterable at node:internal/deps/undici/undici:1865:43 at Headers Iterator.next (node:internal/deps/undici/undici:1108:26)
I have tried:
As soon as I reverted Next.js' version to 13.4.12, the preceding version of the latest, Next-Auth worked again.
An easy way to avoid this issue is to just not use Next.js v13.4.13. However, it is likely that future updates to Next.js will not be compatible with Next-Auth as well.
How to reproduce
create-next-app
version which will initialize a 13.4.13 project (as of this issue's creation). Note that using the App Router or Page Router will not matter.npm i next-auth
npm run dev
and navigate tohttp://localhost:3000/api/auth/signin
.500 Internal Error
will be displayed on the screen, and theTypeError
mentioned in the title and in the issue brief will be displayed in the server console.Additionally, you could also clone the next-auth-example repository: https://github.com/nextauthjs/next-auth-example After running
npm install
andnpm run dev
and attempting to use next-auth, you will come across the same error.Expected behavior
Visiting
/api/auth/signin
should display the default Next-Auth sign-in page will all the provider forms for signing in.