You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Didn't to work at first run but if I change the code and do hot reload it will work as expect.
FYI : I expect { a: 'foo', b: 'bar', c: undefined, d: undefined, ... }
But whenever I restart emu, I will got not thing because {a}/.../{z} didn't match foo/bar.
I know this is sound weird and confuse, I lost an hour to figure this strange behavior anyway.
BTW, I wouldn't know what collection name will be add at root by user, so I've to dynamically watch it as {a}.
The text was updated successfully, but these errors were encountered:
@katopz thanks for the descriptive issue. I think this is actually working as intended, although it's definitely confusing! I think the hot reload is failing to notice the updated trigger definition, which is a bug. However you can't really do what you're trying to do:
A write to /foo/bar does NOT match that description. {c} and {d} must be path segments with length >=0 to match.
That said if you're really set on this, you can do:
// Match all writes to top level collections like /foo/bar
functions.firestore.document('{a}/{b}').onCreate({ ... });
// Match all writes to second level collections like /foo/bar/sub/doc
functions.firestore.document('{a}/{b}/{c}/{d}').onCreate({ ... });
// Match all writes to third level collections like /foo/bar/sub/doc/sub/doc
functions.firestore.document('{a}/{b}/{c}/{d}/{e}/{f}').onCreate({ ... });
// etc
[REQUIRED] Environment info
firebase-tools:
8.7.0
Platform:
macOS 10.15.5
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
http://localhost:4006/firestore
watchCreate1
function to...nodemon
to recompile the code.[REQUIRED] Expected behavior
Judge from second attempt, The first run should return...
[REQUIRED] Actual behavior
What I'm trying to do
I'm trying to watch all update in one function but it seem to do able only after changing code and hot reload. e.g.
Didn't to work at first run but if I change the code and do hot reload it will work as expect.
FYI : I expect
{ a: 'foo', b: 'bar', c: undefined, d: undefined, ... }
But whenever I restart emu, I will got not thing because
{a}/.../{z}
didn't matchfoo/bar
.I know this is sound weird and confuse, I lost an hour to figure this strange behavior anyway.
BTW, I wouldn't know what collection name will be add at root by user, so I've to dynamically watch it as
{a}
.The text was updated successfully, but these errors were encountered: