GitLiveApp / firebase-kotlin-sdk

A Kotlin-first SDK for Firebase
https://gitliveapp.github.io/firebase-kotlin-sdk/
Apache License 2.0
1.14k stars 155 forks source link

SerializationException: This serializer must be used with FirebaseEncoder #662

Open Monabr opened 2 days ago

Monabr commented 2 days ago

Hello.

Here code I am using

@Serializable(with = TimestampSerializer::class)
override val serverTime: Timestamp = getDefaultPlatformTimestamp(),

And getting

kotlinx.serialization.SerializationException: This serializer must be used with FirebaseEncoder

Before set data to Firestore I am using Properties.encodeToMap(myClass). I believe here the error is occurs.

What am I doing wrong? Documentations says nothing about this case.