gladly-team / next-firebase-auth

Simple Firebase authentication for all Next.js rendering strategies
https://nfa-example-git-v1x-gladly-team.vercel.app/
MIT License
1.33k stars 290 forks source link

TypeError: u[v] is not a function. (In 'u[v](x)', 'u[v]' is null) #693

Closed MvRemmerden closed 7 months ago

MvRemmerden commented 7 months ago

When filing a bug report, please confirm you've done the following:

  1. Have you set onVerifyTokenError and onTokenRefreshError in your config and checked for any helpful errors? ✅

  2. Have you set debug: true in your config and read through server-side and client-side debug logs for any helpful messages? ✅

  3. Have you tried the example app with your own Firebase credentials? ✅

  4. Have you read through the troubleshooting Q&A? ✅

Describe the bug

When I'm loading the first page (no matter whether logged in or out, I sometimes get the following error:

TypeError: u[v] is not a function. (In 'u[v](x)', 'u[v]' is null)

It happens always on first load, and only sometimes afterwards, so I assume it might be a race condition.

image image

Versions

next-firebase-auth version: 1.0.1 Firebase JS SDK (firebase): 10.7.0 Firebase admin SDK (firebase-admin): 11.11.1 Next.js:

To Reproduce Steps to reproduce the behavior:

  1. Go to https://demo.nextfirestarter.com and look at the console