Uploaded image for project: 'Realm Kotlin'
  1. Realm Kotlin
  2. RKOTLIN-1113

[RLM_ERR_UNSUPPORTED_FILE_FORMAT_VERSION]: Database has an unsupported version (9) and cannot be upgraded

      How frequently does the bug occur?

      Sometimes

      Description

      Hi,
      Some of our users are experiencing a crash when trying to run our app.

      As I understand it, it's because the realm file use an unsuported version (number 9 according to the stack trace).

      I think I have the crash starting from the Realm kotlin SDK version 1.16.0.
      The first version of the SDK used in the project is 1.11.1.

      Anyone knows what might cause this crash and how to fix it ?

      One of our theory is that the user are updating the app from a "too old" version of realm, What is strange is that the older version is only 1.11.1 (that, according to the release note "Generates Realms with file format v23")

      Thanks in advance.

      PS : I tried to reproduce it, but never I never managed to make the app crash ... But a "lot" of our users are crashing.

      Stacktrace & log output

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      Fatal Exception: java.lang.RuntimeException
      Unable to create application "My_package": java.lang.IllegalStateException: [RLM_ERR_UNSUPPORTED_FILE_FORMAT_VERSION]: Database has an unsupported version (9) and cannot be upgraded
      
      
      Caused by java.lang.IllegalStateException: [RLM_ERR_UNSUPPORTED_FILE_FORMAT_VERSION]: Database has an unsupported version (9) and cannot be upgraded
             at io.realm.kotlin.internal.interop.CoreErrorConverter.asThrowable(CoreErrorConverter.kt:47)
             at io.realm.kotlin.internal.interop.realmcJNI.realm_open(realmcJNI.java)
             at io.realm.kotlin.internal.interop.realmc.realm_open(realmc.java:434)
             at io.realm.kotlin.internal.interop.RealmInterop.realm_open(RealmInterop.kt:237)
             at io.realm.kotlin.internal.ConfigurationImpl.openRealm$lambda$0(ConfigurationImpl.java:109)
             at io.realm.kotlin.internal.interop.NativePointerKt.use(NativePointer.kt:53)
             at io.realm.kotlin.internal.ConfigurationImpl.openRealm$suspendImpl(ConfigurationImpl.java:108)
             at io.realm.kotlin.internal.ConfigurationImpl.openRealm(ConfigurationImpl.java:100)
             at io.realm.kotlin.internal.RealmImpl$1.invokeSuspend(RealmImpl.kt:133)
             at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
             at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
             at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
             at kotlinx.coroutines.BlockingCoroutine.joinBlocking(BlockingCoroutine.java:95)
             at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(BuildersKt__Builders.kt:69)
             at kotlinx.coroutines.BuildersKt.runBlocking(Builders.kt:1)
             at io.realm.kotlin.internal.platform.CoroutineUtilsSharedJvmKt.runBlocking(CoroutineUtilsSharedJvm.kt:22)
             at io.realm.kotlin.internal.platform.CoroutineUtilsSharedJvmKt.runBlocking$default(CoroutineUtilsSharedJvm.kt:21)
             at io.realm.kotlin.internal.RealmImpl.<init>(RealmImpl.kt:115)
             at io.realm.kotlin.internal.RealmImpl.<init>(RealmImpl.kt:133)
             at io.realm.kotlin.internal.RealmImpl$Companion.create$io_realm_kotlin_library(RealmImpl.kt:318)
             at io.realm.kotlin.Realm$Companion.open(Realm.java:83)
      

      Can you reproduce the bug?

      No

      Reproduction Steps

      No response

      Version

      1.16.0

      What Atlas App Services are you using?

      Local Database only

      Are you using encryption?

      No

      Platform OS and version(s)

      Android (Min SDK 26)

      Build environment

      Android Studio version: ...
      Android Build Tools version: ...
      Gradle version: ...

            Assignee:
            claus.rorbech@mongodb.com Claus Rørbech (Inactive)
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: