Firebase-admin-node: Firebase Functions on 5.13.0 produce "Cannot read property 'seconds' of null" errors.

Created on 20 Jul 2018  路  8Comments  路  Source: firebase/firebase-admin-node

Firebase Functions on 5.13.0 produce "Cannot read property 'seconds' of null" errors.

TypeError: Cannot read property 'seconds' of null
    at Function.fromProto (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/build/src/timestamp.js:91:46)
    at _firestore.request.then.resp (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/build/src/write-batch.js:472:42)

Most helpful comment

Hey! Chiming in here. Are you using empty write batches? It looks like we choke on the server response if you don't add a write operation. We will fix this in the next release of @google-cloud/firestore. Thanks for finding this one!

All 8 comments

Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight.

Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information.

Functions peer dependency is on 5.12.1. You should stick to that version, until the next version of Functions comes out.

Seeing the same issue on functions 2.0.1 which has a dependency of 5.13.0. Any suggestions?

This issue shouldn't be closed until the errors gone.

@kawauso there's nothing to be done at the firebase-admin level as it already uses the latest Firestore. @laurenzlong @schmidt-sebastian any thoughts?

Hey! Chiming in here. Are you using empty write batches? It looks like we choke on the server response if you don't add a write operation. We will fix this in the next release of @google-cloud/firestore. Thanks for finding this one!

Looks like there was an edge case where it was possible that the batch could have been empty, so it confirms your theory. I've made an adjustment to prevent that in my code.

Appreciate your responses @hiranya911 and @schmidt-sebastian

Was this page helpful?
0 / 5 - 0 ratings