Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

276
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!