Skip to content

firebase.loadFirestoreRules timing out in emulator #1396

Closed
@brianmhunt

Description

@brianmhunt

Describe your environment

  • Operating System version: _____Mac
$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14
BuildVersion:	18A391
$ node --version
v10.13.0
  • Browser version: _____N/A
  • Firebase SDK version: _____
    "@firebase/testing": "^0.3.3",
    "firebase": "^5.5.9",
    "firebase-admin": "^6.2.0",
    "firebase-functions": "^2.1.0",
    "firebase-functions-test": "^0.1.5",
    "firebase-tools": "^6.1.1"

Describe the problem

It appears that successive calls to firebase.loadFirestoreRules are increasingly slower, to the point where it quickly becomes unusable.

This is a regression, though I have not been able to pinpoint where, and might be Mac specific.

Relevant Code:

Minimum working reproduction here: brianmhunt/bug-reports#firestore-emulator-timeouts

Steps to reproduce:

Sample output from the reproduction repo:

  firebase emulator
    ✓ does not time out (101ms)
    ✓ does not time out 2 (968ms)
    ✓ does not time out 3 (1316ms)
    ✓ does not time out 4 (2168ms)
    ✓ does not time out 5 (4717ms)
    ✕ does not time out 6 (5009ms)

  ● firebase emulator › does not time out 6

    Timeout - Async callback was not invoked within the 5000ms
    timeout specified by jest.setTimeout.

    Rules loaded in 21 ms

  console.log test/firebase.test.js:17
    App initialized in 2 ms

  console.log test/firebase.test.js:14
    Rules loaded in 900 ms

  console.log test/firebase.test.js:17
    App initialized in 0 ms

  console.log test/firebase.test.js:14
    Rules loaded in 1603 ms

  console.log test/firebase.test.js:17
    App initialized in 0 ms

  console.log test/firebase.test.js:14
    Rules loaded in 2520 ms

  console.log test/firebase.test.js:17
    App initialized in 0 ms

  console.log test/firebase.test.js:14
    Rules loaded in 4417 ms

  console.log test/firebase.test.js:17
    App initialized in 1 ms

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions