I am trying to open a synced realm but I get the following error during crash
“java.lang.ClassCastException: kotlin.Pair cannot be cast to kotlin.reflect.KProperty1”
Nothing has changed with how the SyncConfiguration.Builder is setup but we cannot open the database and the error has not been helpful.
Can anyone provide some insight? Attached is the stacktrace.
2 Likes
It only happens when I using a combination of Kotlin 2 and Realm 2. The crash seems to be caused by a change in how the schema is being parsed by realm during the SyncConfiguration.Builder()
I had the same error after update to 2.0 and then i realised that i forgot to update library-base.
Now I am using the database smoothly like this:
project level build gradle:
plugins {
id("io.realm.kotlin") version "2.1.0" apply false
}
in .toml file:
[versions]
libraryBase = "2.1.0"
[libraries]
library-base = { module = "io.realm.kotlin:library-base", version.ref = "libraryBase" }
1 Like