firebase-functions: Cannot read property 'seconds' of undefined
Related issues
[REQUIRED] Version info
node: v14.16.0
firebase-functions: 3.14.1
firebase-tools: 9.16.0
firebase-admin: 9.11.0
[REQUIRED] Test case
The crash happens randomly and looks like it’s related to the code that invokes the functions. This is the stacktrace that I get:
TypeError: Cannot read property 'seconds' of undefined
at Function.fromProto (/workspace/node_modules/@google-cloud/firestore/build/src/timestamp.js:135:47)
at Firestore.snapshot_ (/workspace/node_modules/@google-cloud/firestore/build/src/index.js:677:57)
at beforeSnapshotConstructor (/workspace/node_modules/firebase-functions/lib/providers/firestore.js:139:30)
at changeConstructor (/workspace/node_modules/firebase-functions/lib/providers/firestore.js:143:49)
at cloudFunction (/workspace/node_modules/firebase-functions/lib/cloud-functions.js:133:34)
My code is not even reached.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 26
- Comments: 58 (11 by maintainers)
@taeold status should be updated to say you have an outage / problem - your cloud support has no idea
This issue is being treated with urgency by Google Cloud Platforms engineers. I’ll share a link to official comms once that becomes available.
My issue is that we are very dependebt on cloud functions, and are users in production are affected by this. And no one is answering. This is lesson learned about cloud functions.
You have to update and re-deploy your functions. Make sure you have the latest version of
@google-cloud/firestorewhen you do this - you probably have to re-install your dependencies.I am not the right person to say why this started happening.
Our situation is very similar. I would have move to cloud run, but guess that, events are not supported there even though they have the scheme for them.
On Fri, 30 Jul 2021 at 14:24, Mehmet Efe Akça @.***> wrote:
The issue persists.
It looks like after re-deploying (the same code/lockfile) some number of times the issue is resolved. I don’t know if there was some sort of package cache that persisted between deployments or what, but we’re all set for now, thanks for the suggestions @PARADOXST
Redeployed all functions with the fix, the issue is fully mitigated. Very curious to see a post mortem.
+1, we’re seeing this in a bunch of our functions as of 9:40am Pacific. This is a major outage and no response from Google. 😢