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.34k stars 290 forks source link

Cannot use Firebaseui 6.0v with Firebase 9.9v . #494

Closed thanhtutzaw closed 2 years ago

thanhtutzaw commented 2 years ago

Describe the bug Cannot use Firebaseui 6.0 v with Firebase 9.9 v .

Versions

next-firebase-auth version: .1.0.0-canary.9 Firebase JS SDK: 9.9.0 react-firebaseui": 6.0.0"

To Reproduce Steps to reproduce the behavior:

  1. In firebase 8.9 v work , didn't work in firebase 9.9

Error Message Uncaught FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app-compat/no-app). at app (index.esm2017.js?ad1f:230:1) at Object.serviceNamespace [as auth] (index.esm2017.js?ad1f:264:1) at FirebaseAuth (FirebaseAuth.js?a1c5:92:27) at renderWithHooks (react-dom.development.js?ac89:16305:1)

Additional context Is there any Solution?

juliankleine commented 2 years ago

Experiencing the same bug

kmjennison commented 2 years ago

The canary example app uses Firebase JS SDK v9.8.0 and react-firebaseui v6.0.0. Could you try running it to see if you still see the problem? If so, please provide a live reproduction.

thanhtutzaw commented 2 years ago

Can You Tell me your issue? So I can Help If you don't use react-firebaseui then you should check version and use react-firebase-auth@canary version with firebase v9.9 .

thanhtutzaw commented 2 years ago

The canary example app uses Firebase JS SDK v9.8.0 and react-firebaseui v6.0.0. Could you try running it to see if you still see the problem? If so, please provide a live reproduction.

There is some firebase version code problem with react-firebaseui. I solved by changing firebase.auth() to getAuth() In styled(react-firebaseui) part.