Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

144
Vistas
Why would Firebase Realtime Database's "once" Javascript function fail silently for Safari users?

I am working with Firebase Realtime Database's Web-based interface (SDK 8.10.0) and I'm running into a very strange bug.

It only happens to Safari users on Mac (we haven't ruled out Safari on iOS yet, but it definitely doesn't happen to Chrome or Firefox users on Mac, or to anyone on PC) and it's erratic - happening maybe 20% of the time.

Here's the offending line of code:

firebase.database().ref('/userdata/' + authToken + '/user_id').once('value').then(function(snapshot) {

When this bug strikes, the entire callback function is skipped. No errors are logged. I've added lots of console logging within the block of code; none of it triggers. Console logging after the callback, in the normal flow, works as expected.

I considered the possibility that the value it's looking for has not been populated, but my understanding from the documentation is that the callback should fire regardless. I tried switching from once() to get() but it didn't help.

Any theories about the problem, or advice for gathering more information, would be appreciated.


ADDENDUM: Upgrading to version 9 of the Javascript SDK resolved this problem. Leaving this here in case someone with the same issue stumbles across this. I didn't even have to rewrite anything; v9 in compatibility mode ran perfectly with the same code.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda