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.

Firestore: ReadTime not populated

See original GitHub issue

See https://github.com/firebase/firebase-js-sdk/issues/2459

It looks like data.value.readTime does not exist for a Firestore Event. When testing, this causes snapshotConstructor to set the readTime argument to undefined. If the read time is not available, we should use the update or create time of a document.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
schmidt-sebastiancommented, Mar 25, 2020

@laurenzlong Is this something you could take care of?

By the way: “when testing” means “when I reproduced it” 😃

0reactions
iwikalcommented, Jun 1, 2021

I don’t really know anything, but the way I see it the purpose of these fields is to guarantee the user that the document was definitely known to be in this state as represented by the snapshot, from updateTime until readTime. So if there’s any risk that the document has updated again before eventTime, we best not use it.

Said another way: updateTime is the earliest point in time at which we can be sure that the document was in this state on the database, and readTime is the latest.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get realtime updates with Cloud Firestore - Firebase
Get realtime updates with Cloud Firestore · On this page · Events for local changes · Events for metadata changes · Listen to...
Read more >
How to set rules in firebase firestore and realtime?
I have tried the following rules in realtime but it says:- Your security rules are not secure. Any authenticated user can steal, modify, ......
Read more >
Getting data | Firestore - Google Cloud
When you set a listener, Firestore sends your listener an initial snapshot of the data, and then another snapshot each time the document...
Read more >
Cloud Firestore | FlutterFire
Updating documents#. Sometimes you may wish to update a document, rather than replacing all of the data. The set method above replaces any...
Read more >
How To Set Up React With Firebase/Firestore | Get & Realtime
NEW VIDEO Version 9: https://youtu.be/-yrnWnN0g9oRepo v9: Repo: https://github.com/samfromaway/firebase-tutorialRepo v7: ...
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