-
Notifications
You must be signed in to change notification settings - Fork 928
8.6.8 breaks Timestamp support for Firestore Emulator #5047
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
Comments
Hi @jirizavadil, thanks for the report. I tried replicating the issue, but I wasn't able to. I used the same SDK version and Firebase tools, but the test app was able to read and write data from Firestore database. If I can replicate the issue, I can have a better look into it. Please share a minimal, but complete sample of a project that I can run locally. Also, you may enable Firestore debugging |
I think I may have the same issue, but I've managed to isolate the problem. It seems Just follow https://github.com/mandalornl/firebase-8.6.8-test I hope this helps! |
I spend most of my day yesterday trying to debug an issue which I believe might be related to this. In my case, using |
Hey @jirizavadil. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
I would like to add that it's broken from Also notice the difference between the Firebase <= 8.6.2
{
"update": {
"name": "projects/sometest-78e8d/databases/(default)/documents/test/CBVTnjvUzfraWgCuuynB",
"fields": {
"updatedAt": {
"timestampValue": "2021-07-02T07:24:58.654000000Z"
}
}
},
"updateMask": {
"fieldPaths": [
"updatedAt"
]
},
"currentDocument": {
"exists": true
}
} Firebase >= 8.6.3
{
"update": {
"name": "projects/sometest-78e8d/databases/(default)/documents/test/eUikl3S7Bt6d4AxTq0aS",
"fields": {
"updatedAt": {
"timestampValue": {
"seconds": 1625210353,
"nanos": 166000000
}
}
}
},
"updateMask": {
"fieldPaths": [
"updatedAt"
]
},
"currentDocument": {
"exists": true
}
} |
@looptheloop88 here it is. Thanks to @mandalornl, i've been able to boil it down to a reproducible sample:
I've tested many versions with this result: |
Hi @jirizavadil and @mandalornl, I was able to replicate the issue using the sample projects that you've shared with us. Let me bring this matter to the attention of our engineers here. |
This issue is still happening. Using the emulator, when I try changing the data in a timestamp field, it seems like the change took but when I refresh the page it still shows the old timestamp. No entries in the log! |
Do you have persistence enabled? I wonder if these documents are read from cache. You should be able to see logs from the Firestore SDK itself (call |
This is how I start the emulator: Is there a way to set the log level using the CLI? |
No - this would be a line you need to add to your Web or Node app. |
Well, I'm not sure how to do that on the functions side, is there an example? I have this but doesn't compile:. (should be easy for you to try on your end, do you experience the same problem?) |
Update: |
Are you writing to Firestore from your function? You may have to invoke the Admin SDK directly. If you can send me a code snippet, I can modify it to enable logging. |
I want to confirm that this happens when you try to add or update a |
Confirmed. Using the emulator served on localhost:4000. Changing the value of a timestamp field fails silently. |
I was able to write Timestamps from the Web SDK, the Node Web SDK and the Node Admin SDK successfully. Here is my setup: https://gist.github.com/schmidt-sebastian/59c76a6655b3556d542b90882de689bc Can you spot a difference? |
Thanks for sharing the code. Writing and reading timestamp fields using the SDK is not the issue, maybe I didn't explain well on the original post. |
Ah, okay, that makes sense. Will get this fixed. |
Fixed in Emulator UI in Firebase CLI v9.16.1. |
Steps to reproduce:
I've spent over 3 hours trying to replicate this in a new project, but unsuccessfuly. In the current project i could only try emulators, not cloud environment, as i only have production cloud env at this time.
Last version that doesn't introduce any bugs for me is 8.4.0
The text was updated successfully, but these errors were encountered: