Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

'updateCurrentUser failed: First argument "user" must be an instance of Firebase User or null.' when running in Firebase Hosting

Abierto
#90 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
firebase, javascript, react

Línea de trabajo

Comienza reproduciendo el problema en Firebase Hosting con el script reservado /__/firebase/init.js y el componente StyledFirebaseAuth usando firebase.auth(). Comprueba cómo interactúa la instancia de Firebase del CDN con la dependencia FirebaseUI cargada mediante npm. Se considera completado cuando se haya establecido y documentado una configuración compatible que evite tanto la advertencia duplicate-global como el error updateCurrentUser.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
JavaScript
Estrellas
1.3k
Forks
246
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de firebase/firebaseui-web-react

Todos los issues de firebase/firebaseui-web-react

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.