Skip to content Skip to sidebar Skip to footer

Why Validation Rules Behave Differently (only) With Ondisconnect Update?

I have made some tests with firebase and saw difference in rules validation between onDisconnect().update() and simple update() using newData.parent() in rules. When I using update

Solution 1:

firebaser here

During an onDisconnect() operation, each property is treated as a separate write operation while we're validating the rules. That means that in your case the operation fails. While this is an unfortunate design, it is unlikely to change in the near future. For this reason I recommend using simpler write operations in onDisconnect() handlers.

Post a Comment for "Why Validation Rules Behave Differently (only) With Ondisconnect Update?"