[BUG] [with-firebase-authentication] getServerSideProps issues
See original GitHub issueBug report
Describe the bug
I just cloned the example project with-firebase-authentication and followed the instructions within the README.md to setup. After running the command npm run dev and went to my browser on localhost:3000, I received an error within my terminal.
Error: Error serializing `.user` returned from `getServerSideProps` in "/".
Reason: `undefined` cannot be serialized as JSON. Please use `null` or omit this value all together.
To Reproduce
- Go to https://github.com/zeit/next.js/tree/canary/examples/with-firebase-authentication
- Followed the setup guide exactly.
- Go to
localhost:3000to see the webpage - See error within page and terminal
Expected behavior
Expected to see the the login button within the page.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS:
macOS - Browser:
Chrome - Version of Next.js:
^9.3.3 - Version of Node.js:
v10.16.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
[BUG] [with-firebase-authentication] getServerSideProps issues
I just cloned the example project with-firebase-authentication and followed the instructions within the README.md to setup. After running the ...
Read more >Authenticated server-side rendering with Next.js and Firebase
It only demonstrates how to make authenticated POST requests to an API, not authenticate users inside getServerSideProps . So below I explain how...
Read more >error serializing `.csrftoken` returned from `getserversideprops`
I just cloned the example project with-firebase-authentication and followed the instructions within the README.md to setup. After running the command npm run ...
Read more >getServerSideProps not working in nextjs error in mapping
Your main problem is you're trying to call getServerSideProps in Answerhooks but it's not a page component, so you cannot get data on...
Read more >The Confusing Core Of NextJS - getServerSideProps - YouTube
I hate NextJS. It's awesome.Seriously tho getServerSideProps is a...rough pattern, and I hope this helps clarify why I think soALL MY ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Sure!
I may have found a fix for the problem.
Changing within
getServerSidePropsto
seems to fix the issue for me.