Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

277
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda