-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(firestore): Timestamp values #474
Comments
In poking around the codebase, I've narrowed down the problem to the |
Thank you for reporting this issue! Would you be willing to create a PR with your idea? I would then take a closer look. |
Sure thing, @robingenz . I'll see if I can get that together, this morning. |
@robingenz Could you please provide any updates on this matter or offer an estimated timeframe for resolving the issue? Thank you. |
@SureshKumarToverto As already mentioned in #564 (comment), this is currently a bug in Capacitor (see ionic-team/capacitor#7252). I have to wait until it's fixed. |
@robingenz does this same bug also affect geopoints? we store both timestamps and geopoints in our firestore db, everything comes back fine when testing in the browser, but when we compile into a native iOS app and test on the device, neither timestamps/geopoints come back |
@johnmckay-reward No, this should be another issue. Please create a separate bug report. |
Is there a workaround for this bug while waiting for the capacitor team to fix ionic-team/capacitor#7252, or should I switch to storing my dates as strings as opposed to the Timestamp type in firestore to avoid this issue? |
No, there is currently no workaround. I have another idea on how to solve this, but of course I would prefer the problem to be solved in the Capacitor Core. I currently save all timestamps as ISO 8601 strings. |
Any update, this is pretty crucial I would think to any app using firestore? |
No, there are no updates yet. It's still on my to-do list for this year. For the time being, I recommend saving all timestamps as ISO 8601 strings. |
I'm still facing the same issue (on iOS). Are there any updates regarding this? |
Plugin(s)
Did you test the latest version?
Platform(s)
Current behavior
If I read a document using the
FirebaseFirestore.getDocument
method, itssnapshot.data
object is completely missing any value that resolves as a FirestoreTimestamp
value. For example, a document of the following format in Firebase ...... is returned as ...
Expected behavior
I would expect that any
snapshot.data
value has certain values in Firestore, it this method would return those values as part of its resolved object structure.Reproduction
https://github.com/Paganiniana/capawesome-bug-reproduction
Steps to reproduce
(See the readme)
Other information
No response
Capacitor doctor
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 5.5.0
@capacitor/core: 5.5.0
@capacitor/android: 5.5.0
@capacitor/ios: 5.5.0
Installed Dependencies:
@capacitor/android: not installed
@capacitor/cli: 5.5.0
@capacitor/ios: 5.5.0
@capacitor/core: 5.5.0
[success] iOS looking great! 👌
Before submitting
The text was updated successfully, but these errors were encountered: