Skip to content

[BUG] [with-firebase-authentication] getServerSideProps issues #12139

@kohchihao

Description

@kohchihao

Bug 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

  1. Go to https://github.com/zeit/next.js/tree/canary/examples/with-firebase-authentication
  2. Followed the setup guide exactly.
  3. Go to localhost:3000 to see the webpage
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueEasy to fix issues, good for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions