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

280
Vistas
Why am I getting nothing back from my Firestore request?

I'm trying to work with Firebase for the first time. I've set up the Firestore emulator and have put data in that I would like to retrieve in my Nextjs app. After initializing firebase, this is what my component looks like:

function Test() {
  useEffect(() => {
    const db = getFirestore();
    connectFirestoreEmulator(db, "localhost", 8080);

    async function testFirestore() {
      const testRef = doc(db, "test", "testid");
      const testSnap = await getDoc(testRef);
      console.log("does not reach this line")
      console.log(testSnap.data());
    }
    testFirestore();
  }, []);
  return <div></div>;
}

export default Test;

The problem is that I am getting nothing logged to the console. Not an error message, just nothing. The testFirestore function is running, but is seems to not get past the await getDoc() line. I also am not seeing requests coming in on the Firestore emulator. What am I doing wrong? I am sorry that I cannot be more specific, but there's no errors so it's hard to understand what is going on.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It seems to be an issue in Firebase JS SDK as mentioned in this Github issue. Upgrading to latest version should fix that issue.

about 4 years ago · Juan Pablo Isaza Denunciar
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