Firebase Cloud Functions // Snapshot has no readTime

Viewed 464

I'm getting strange warning messages in my Firebase Cloud Functions logs:

Snapshot has no readTime. Using now()

I have quite a number of functions running and it happens with a good handful of them. But it doesn't happen with each invocation, just occasionally.

A google search turned up the line responsible for this message in the snapshotConstructor function within the firebase-functions lib. You can find it on Github here. It seems like the data.value.readTime isn't available on the Event.

What exactly is causing this error and is it a problem?


UPDATE: I've discovered this is happening when onWrite functions are triggered at the same time by the same document. I have a few functions that start like this:

functions
.firestore.document('organizations/{organizationId}/updates/{updateId}')
.onWrite(async (change, context) => {...

Again, it doesn't happen every time they're triggered, but often enough to warrant concern.

0 Answers
Related