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 :

N/AWindows_NT x64 10.0.17134N/AReact Native version:React Native Firebase library version:Firebase module(s) you're using that has the issue:TypeScript?N/AExpoKit?ExpoKitN/AHey @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 : await transaction.update(messageRef, {
array: firebase
.firestore
.FieldValue
.arrayUnion({
message,
timestamp: firebase
.firestore
.FieldValue
.serverTimestamp(),
senderId
})
}) ) ), and if update wihtout transaction I get this error :
Code for this : await messageRef.update({
array: firebase
.firestore
.FieldValue
.arrayUnion({
message,
timestamp: firebase
.firestore
.FieldValue
.serverTimestamp(),
senderId
})
}) .
And first time I updated to 5.2.0 ( while I was writing this issue ) I updated document and firestore looked like this:

Also my app level build.gradle details :
implementation "com.google.firebase:firebase-core:16.0.6"
implementation "com.google.firebase:firebase-auth:16.1.0"
implementation "com.google.firebase:firebase-firestore:17.1.5"
@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 serverTimestamp in arrayUnion/remove yet. E.g.: https://github.com/firebase/firebase-admin-node/issues/336
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?
Most helpful comment
@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
serverTimestampin arrayUnion/remove yet. E.g.: https://github.com/firebase/firebase-admin-node/issues/336References and other values work fine.