Closed Kolyall closed 1 year ago
This error doesn't happen due to use of compact
, but because multiple processes are accessing the same Realm.
Even if you entire app is only use one process, we have unfortunately seen that during app upgrades some variants of Android actually have two versions of the app running at the same time, which Realm will detect as this error.
We are currently in the process of adding support for this in https://github.com/realm/realm-core/pull/6304, but until that is complete the only work-around is to try to defer opening the Realm a little bit, i.e. opening the Realm in Application.onCreate
has a higher chance of triggering this.
How frequently does the bug occur?
Sometimes
Description
Can't compact Realm DB:
When I need to call
compactRealm
method?Stacktrace & log output
No response
Can you reproduce the bug?
Sometimes
Reproduction Steps
No response
Version
10.13.0
What Atlas App Services are you using?
Local Database only
Are you using encryption?
Yes
Platform OS and version(s)
Android
Build environment
Android Studio version: Android Studio Electric Eel | 2022.1.1 Patch 2 Build #AI-221.6008.13.2211.9619390, built on February 17, 2023 Runtime version: 11.0.15+0-b2043.56-8887301 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.4.0-144-generic GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 12 Registry: external.system.auto.import.disabled=true debugger.watches.in.variables=false ide.text.editor.with.preview.show.floating.toolbar=false ide.instant.shutdown=false
Non-Bundled Plugins: idea.plugin.protoeditor (221.6095) com.intellij.marketplace (221.6008.18) com.intellij.javafx (1.0.4) co.anbora.labs.kse (1.2.2) JUnit4-Parallel-Runner (1.5) com.atlassian.bitbucket.references (2022.1.223) com.thoughtworks.gauge (221.6008.13) com.developerphil.adbidea (1.6.8)
Current Desktop: ubuntu:GNOME
Android Build Tools version: 7.4.2 Gradle version: https://services.gradle.org/distributions/gradle-7.5-bin.zip