-
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 isn't working with arrayUnion #1831
Comments
Hey @manicantic this was resolved in v5.2.0, please could you upgrade, thanks. Changelog & upgrade guide here: https://rnfirebase.io/docs/v5.x.x/releases/v5.2.0 |
Hey @Salakar , I tried 5.2.0 and still got an error. If I have update with arrayUnion and serverTimestamp with transaction app instantly crashes ( code : Also my app level build.gradle details : |
@manicantic hey, sorry I forgot to mention, the fix for v5.2.0 means that data gets passed correctly to Firestore - now that it's correctly passed it will give you that Error as this is the correct behaviour, none of the Firebase SDKs support References and other values work fine. |
@Salakar "none of the Firebase SDKs support serverTimestamp in arrayUnion/remove yet" "YET", does that mean that it will be supported eventually? |
Not supported yet unfortunately! |
still not supported yet unfortunately |
so is there a workaround? How do I add a server timestamp to an array? |
I find it absolutely ridiculous that there is no mention of this in the documentation... what a frustrating afternoon. This issue resulted in app crash with no error msg for me in Flutter. It would take one person half a day to update the docs/SDKs to save thousands of collective hours of wasted time... |
Issue
FieldValue serverTimestamp inside arrayUnion isn't working. Outside arrayUnion everything works fine.
await messageRef.update({array: firebase.firestore.FieldValue.arrayUnion({ message, timestamp: firebase.firestore.FieldValue.serverTimestamp(), senderId }) })
Also, on version 5.2.0 same code reproduce this :
Environment
N/A
Windows_NT x64 10.0.17134
N/A
React Native
version:React Native Firebase
library version:Firebase
module(s) you're using that has the issue:TypeScript
?N/A
ExpoKit
?ExpoKit
N/A
The text was updated successfully, but these errors were encountered: