Open fnberta opened 3 years ago
@fnberta thank you for reporting this! Seems like a bug to me.
I've filed b/172262957 to track this internally
Digging into this, seems we're not passing a proper context. Will report back.
Has this been resolved? I've run into the exact problem while trying to unit test my Functions. The context coming from the emulator is missing .eventId and .timestamp
After some more testing, I also noticed that it is giving the right context when I run a firebase triggered function, but not when I run an Auth triggered function.
[REQUIRED] Environment info
firebase-tools:8.14.1
Platform:macOS
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
Include the above snippet as a cloud function and create a new user. You'll see that the
context
is not a validEventContext
.[REQUIRED] Expected behavior
I would expect
context
to contain all properties specified inEventContext
.[REQUIRED] Actual behavior
context
is missing e.g. theeventId
and thetimestamp
. See the log output: