nextauthjs / next-auth

Authentication for the Web.
https://authjs.dev
ISC License
23.79k stars 3.27k forks source link

Failed to fetch rsc payload while using NextAuth #8398

Closed imprakharshukla closed 11 months ago

imprakharshukla commented 12 months ago

Environment

OS: Windows 10 10.0.22000 CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor Memory: 9.22 GB / 31.94 GB Binaries: Node: 18.17.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD npm: 9.8.1 - ~\AppData\Roaming\npm\npm.CMD pnpm: 8.6.12 - ~\AppData\Roaming\npm\pnpm.CMD Browsers: Edge: Spartan (44.22000.120.0), Chromium (116.0.1938.54) Internet Explorer: 11.0.22000.120

Reproduction URL

https://github.com/imprakharshukla/next-auth-js-rsc-payload-issue-test

Describe the issue

Hey! I am using NextAuth+Google for auth and it's working super well on all devices except mobile. All I get is this error-

ERROR Failed to fetch RSC payload. Falling back to browser navigation. TypeError: Load failed.

Was having the same error with Discord.

Will appreciate any help. Thank you.

Possibly related issue- https://github.com/vercel/next.js/issues/48677

How to reproduce

Try to login from a mobile to reproduce.

Expected behavior

Should open up the OAuth Consent screen of the provider but it just loads and stays on the sign in page.

imprakharshukla commented 12 months ago

Vercel Preview- https://next-auth-js-rsc-payload-issue-test-web.vercel.app/dashboard

appusvivek commented 11 months ago

@imprakharshukla , can you mention how you managed to resolve it?

imprakharshukla commented 11 months ago

@appusvivek I really could not find any solution and issues were not being answered, so I switched to https://clerk.dev since I had to implement the auth for only an internal dashboard and the free plan was perfect.

appusvivek commented 11 months ago

Hehe cool, the reason I asked was I'm using clerk at the moment and had the same error at some particular scenario. Couldn't spot what it was exactly.

Anyhow thanks for the update, cheers mate.

hocgin commented 11 months ago

I encountered the same problem

image