firestore emulator timeout when providing auth object

Env

  • Operating System version: OSX Catalina
  • Browser version: (not relevant)
  • Firebase SDK version: (not installed)
  • Firebase Product: firestore

Describe the problem

When I am running my tests and I am using @firebase/testing to create my tests databases

In my tests I am using @firebase/testing to create my databases. When I am not providing an auth object everything works as expected. However, when I do provide one, transactions nor queries or anything else is being executed. It just hangs and does nothing.

Steps to reproduce:

I added a test project. Please find it attached.

  • You can run npm install to install the dependencies.
  • Run npm run fb:emulator:setup to setup the emulator
  • Run npm run fb:emulator:start to start the emulator
  • Run node run.js, before transaction should be printed in the console
  • Now remove the auth object on line 12 and run node run.js. The following should be printed:
    • before transaction
    • in transaction
    • done

Relevant Code:

The run.js file in the test project

fbtesting.zip

1 possible answer(s) on “firestore emulator timeout when providing auth object

  1. @florianlenz Thanks for reporting the issue! I see in your package-lock.json file that you are using @firebase/testing at v0.16.2. There is currently an open issue at this version with the same problem you are running into. We are currently working on releasing a fix, but in the meantime, using v0.16.0 should fix the issue.