Skip to content

unresolved get cause onValue to not be called on child path #6397

Closed
@christophe-g

Description

@christophe-g

Describe your environment

  • Operating System version: linux
  • Browser version: chrome latest
  • Firebase SDK version: JS SDK v9.8.4
  • Firebase Product:

Describe the problem

onValue callback function on node for which a get on a parent has not yet resoved will never be called. This is pretty bad as get seems to have unpredictable side-effect.

get should not have ANY side-effect.

Possibly related to #6038. Took me ages to identify the reason for some part of my app failing while transitionning to v9.

Work around for now: avoid any use of get, replace by a thenable onValue ... {onlyOnce: true}

Steps to reproduce:

go there - possibly adjust the ms property

The test case is fragile as it depends on race conditions. So please adjust the ms wait property to see the test fail.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions