firebase-functions: Cannot read property 'name' of undefined

Hello,

I start getting this error on my cloud functions logs interface:

TypeError: Cannot read property 'name' of undefined
    at Firestore.snapshot_ (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/build/src/index.js:422:127)
    at beforeSnapshotConstructor (/user_code/node_modules/firebase-functions/lib/providers/firestore.js:140:30)
    at changeConstructor (/user_code/node_modules/firebase-functions/lib/providers/firestore.js:144:49)
    at cloudFunctionNewSignature (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:104:28)
    at cloudFunction (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:135:20)
    at /var/tmp/worker/worker.js:768:24
    at process._tickDomainCallback (internal/process/next_tick.js:135:7)

This is happening sometimes but frequently. I set a console log on the top of my function, but it doesn’t seem to be logged, so the function does not even started.

Environment:

"dependencies": {
    "cors": "^2.8.5",
    "express": "^4.16.4",
    "firebase-admin": "~6.0.0",
    "firebase-functions": "^2.1.0",
    "lodash": "^4.17.11"
  },

This issue begins in the same time as the issue mentioned here 357. But I cannot confirm it’s related to. Maybe both bugs are due to a change made by Firebase.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 25 (5 by maintainers)

Most upvoted comments

Hi, is still happening…

error

Hey, we’re so sorry about this; just so you know, it’s a known issue and we’re rolling back now to fix it. Thanks for your patience.

Firestore is an amazing product, but this incident is extremely worrying given the explanation on the incident page:

An upgrade of our infrastructure did not support a feature we thought was no longer in use

How was this able to happen? Are you guys not testing the whole stack before you deploy to production? I would appreciate some reassurance here, as would others I’m sure.

Furthermore, I hope you appreciate the severity of this incident. Applications which use Firestore and depend on at-least-once delivery of events will now be in a corrupted state. Actual downtime would have been much less damaging in many cases.

I agree with @joshdifabio. The optics here are quite bad.

  1. Rolling something out on a Friday afternoon

  2. Not monitoring what must have been a significant increase in errors for a specific trigger type right after the rollout

  3. The very vague and almost nonchalant explanation.

As mentioned, due to the mechanics of the triggers this has likely caused a lot of corrupted state and nasty errors that will creep up in the coming days or weeks, for your customers.

It would be very appreciated with a bit of transparency on what happened and what you’re doing to prevent similar problems in the future.

And our data is flying all over the place, there are now multiple orders going to “undefined” due to this! It’ll take weeks to parse all this ffs.

Hi all, confirming that this was an issue with a rollout on our side, which we have now rolled back. I understand your frustration and apologize about the incident. We will be investigating into the reasons why this occurred. Internal bug reference: 121064658