'updateCurrentUser failed: First argument "user" must be an instance of Firebase User or null.' when running in Firebase Hosting
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- firebase, javascript, react
- Ambito
- authentication, frontend
Direzione di ricerca
Inizia riproducendo il problema in Firebase Hosting con lo script riservato /__/firebase/init.js e il componente StyledFirebaseAuth usando firebase.auth(). Verifica come l’istanza Firebase del CDN interagisce con la dipendenza FirebaseUI caricata tramite npm. Il lavoro è completato quando è stata definita e documentata una configurazione supportata che eviti sia l’avviso duplicate-global sia l’errore updateCurrentUser.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi - I'm not sure if this is a bug report for FirebaseUI-web-react of FirebaseUI-web; I suspect this is the correct place but please tell me if not.
I'm running my app in Firebase Hosting, and I'm linking the magic/reserved URLs that autoconfigure firebase (<script src="/__/firebase/init.js"></script>)
Later, when <StyledFirebaseAuth uiConfig={uiConfig} firebaseAuth={firebase.auth()}/> is mounted, I get this warn on the console:
Warning: Firebase is already defined in the global scope. Please make sure Firebase library is only loaded once.
This warning is there because window.firebase is defined (it was defined from in the init.js loaded from the reserved URL).
I understand this is because I have a "version" of firebase loaded from the CDN and another "version" of firebase loaded from NPM (from a firebaseui dependency).
I would ignore this warning (since I made sure I'm loading the same version of Firebase from the CDN and from npm) but after logging in using GOOGLE_AUTH as provider, I get:
updateCurrentUser failed: First argument "user" must be an instance of Firebase User or null. Dismiss
and in my experience this is related to the previous warning.
So, my question would be: what's the correct way to use firebaseui-web-react when I'm running in the Firebase Hosting thus using Firebase from the CDN and not NPM.
thanks
- Lingua principale
- JavaScript
- Stelle
- 1.3k
- Fork
- 246
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di firebase/firebaseui-web-react
-
This Project Is DeadAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
firebase/firebaseui-web-react#292 · 1 reazione ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
firebase/firebaseui-web-react#280 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
firebase/firebaseui-web-react#220 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
firebase/firebaseui-web-react#210 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
firebase/firebaseui-web-react#201 · 1 commento · 1 reazione ·
Tutte le issue di firebase/firebaseui-web-react
Issue simili
-
status: waiting triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
freeCodeCamp/freeCodeCamp#70412 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Jason-Vaughan/TangleClaw#1884 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue web
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoft/TypeScript#64453 ·
I maintainer di solito rispondono entro 1 giorno
-
self-driving
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno