question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'name' of undefined

See original GitHub issue

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.

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
mtzfactorycommented, Jul 17, 2019

Hi, is still happening…

error

4reactions
joshdifabiocommented, Dec 16, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'name' of undefined
This type of error mean that your container variable file is not defined. You should use console.log at different places to see what...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Uncaught TypeError: Cannot read property 'name' of undefined
It is a very common error when working with object and array to get a TypeError: Cannot read property 'name' of undefined ....
Read more >
Cannot read property 'name' of undefined' mean? - Quora
Usually it means you misspelled a variable name, or forgot to declare a variable, or it is out of scope.
Read more >
Cannot read property 'name' of undefined - WordPress.org
`Cannot read property 'name' of undefined · At what stage do you encounter this notice? (ie. · As opposed to updating the plugin...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found