-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
serverTimestamp fails when uploading to firestore. #3509
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version info
Angular: ^17.3.0",
Firebase: 9.23.0
AngularFire: ^17.0.1",
Node v20.11.
How to reproduce these conditions
Failing test unit, Stackblitz demonstrating the problem:
Currently, I do not have a failing test unit or a Stackblitz example, but I can describe the issue and the steps to reproduce it below.
Steps to set up and reproduce:
Set up AngularFirestore and AngularFireStorage in your Angular component.
Create a form with a field set to serverTimestamp().
Attempt to update a Firestore document using WriteBatch.update() with the form values.
Here is a snippet of the code causing the issue:
Sample data and security rules:
Please provide the necessary data structure and Firestore security rules if they are relevant to the issue.
Debug output
Errors in the JavaScript console:
Output from firebase.database().enableLogging(true);:
Please attach output if available.
Screenshots:
Please attach screenshots if they help illustrate the problem.
Expected behavior
The expected behavior is that the Firestore document should be updated with the current server timestamp in the dateReported field without any errors.
Actual behavior
The actual behavior is that an error is thrown when trying to update the Firestore document, indicating that an unsupported field value (a custom sl object) was found in the dateReported field.
Also there is no documentation how to use serverTimestamp, increment, etc, for current version using compat.
The text was updated successfully, but these errors were encountered: