Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeError: Maximum call stack size exceeded #1026

Closed
ryangittings opened this issue Jan 2, 2021 · 12 comments · Fixed by #1030
Closed

RangeError: Maximum call stack size exceeded #1026

ryangittings opened this issue Jan 2, 2021 · 12 comments · Fixed by #1030
Assignees
Labels
bug Something isn't working priority Priority fix or enhancement

Comments

@ryangittings
Copy link

Using 3.2.0-canary.10, and just getting the folllowing error:

Describe the bug
RangeError: Maximum call stack size exceeded

Do not report bugs with your own project here, ask from help by raising a question instead - this helps us a lot with administration overhead.

Steps to reproduce
Run npm run dev, and load page with auth provider.

Expected behavior
No callstack error!

Screenshots or error logs
API resolved without sending a response for /api/auth/session, this may result in stalled requests.
/node_modules/next-auth/dist/server/index.js:71
resolve();
^

RangeError: Maximum call stack size exceeded
at
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:71:11)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)
at ServerResponse.res.end (/node_modules/next-auth/dist/server/index.js:72:15)

@ryangittings ryangittings added the bug Something isn't working label Jan 2, 2021
@balazsorban44 balazsorban44 self-assigned this Jan 2, 2021
@balazsorban44 balazsorban44 added the priority Priority fix or enhancement label Jan 2, 2021
@balazsorban44
Copy link
Member

Thanks for reporting! I quickly managed to find the cause and fixed some other bugs along the way. canary is a bit brittle at the moment, so feedback is extremely helpful!

@github-actions
Copy link

github-actions bot commented Jan 2, 2021

🎉 This issue has been resolved in version 3.2.0-canary.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ryangittings
Copy link
Author

Just tried this! Getting another error, did you want me to create a new issue?

/node_modules/next-auth/dist/server/routes/session.js:48
return res.setHeader('Content-Type', 'application/json').json({}).end();
^

TypeError: Cannot read property 'end' of undefined

@balazsorban44
Copy link
Member

balazsorban44 commented Jan 2, 2021

Sorry for the inconvenience! Try next-auth@3.2.0-canary.12

I overlooked some stuff and was too eager to merge. It should be ok now, I tested 12, and I can manage to log in correctly.

We need to improve our tests to avoid things like this.

@ryangittings
Copy link
Author

No problem - I'm here to help! Great stuff, thanks for sorting so quickly.

@ryangittings
Copy link
Author

ryangittings commented Jan 2, 2021

Working locally, though deploying with Next on Netlify and just getting console error. Not sure if this is environment related though... /api/auth/session is just a blank page with no source, but is JSON locally. Hm...

["/api/auth/session", SyntaxError: Unexpected end of JSON input
at /_next/static/chunks/0…]0: "/api/auth/session"1: SyntaxError: Unexpected end of JSON input
at /_next/static/chunks/0557186d9f439fb0430cdc93057e1a56c86d23a1.c7cc4ffd86991a5c6ff0.js:1:8356
at Generator.next ()
at l (/next/static/chunks/0557186d9f439fb0430cdc93057e1a56c86d23a1.c7cc4ffd86991a5c6ff0.js:1:3628)
at c (/next/static/chunks/0557186d9f439fb0430cdc93057e1a56c86d23a1.c7cc4ffd86991a5c6ff0.js:1:3831)length: 2__proto
: Array(0)

Update: works on Vercel, so it must be something specific with netlify!

@ryangittings
Copy link
Author

I'm testing Sign in with Apple, and just getting a task timeout on Vercel. Not sure why that is, though!

[POST] /api/auth/callback/apple - Task timed out after 10.01 second

@balazsorban44
Copy link
Member

Can you check if it works on canary version 8?

@ryangittings
Copy link
Author

Yep, works perfectly!

@balazsorban44
Copy link
Member

Will have to look at it again, later. Might have to revert some of the refactorings.

@github-actions
Copy link

github-actions bot commented Feb 1, 2021

🎉 This issue has been resolved in version 3.3.0-canary.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@marciodiasdeveloper

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority Priority fix or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants