realm / realm-java

Realm is a mobile database: a replacement for SQLite & ORMs
http://realm.io
Apache License 2.0
11.45k stars 1.75k forks source link

Encrypted interprocess sharing is currently unsupported.DB has been opened by pid: 24651. Current pid is 4233 #7776

Closed Kolyall closed 1 year ago

Kolyall commented 1 year ago

How frequently does the bug occur?

Once

Description

io.realm:realm-gradle-plugin:10.13.0

Stacktrace & log output

java.lang.RuntimeException: /data/user/0/com.example/files/place_profile.realm: Encrypted interprocess sharing is currently unsupported.DB has been opened by pid: 24651. Current pid is 4233. in /tmp/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 107
                                                                                                        at io.realm.internal.OsSharedRealm.nativeGetSharedRealm(Native Method)
                                                                                                        at io.realm.internal.OsSharedRealm.<init>(OsSharedRealm.java:174)
                                                                                                        at io.realm.internal.OsSharedRealm.getInstance(OsSharedRealm.java:259)
                                                                                                        at io.realm.BaseRealm.<init>(BaseRealm.java:142)
                                                                                                        at io.realm.BaseRealm.<init>(BaseRealm.java:109)
                                                                                                        at io.realm.Realm.<init>(Realm.java:161)
                                                                                                        at io.realm.Realm.createInstance(Realm.java:535)
                                                                                                        at io.realm.RealmCache.createInstance(RealmCache.java:508)
                                                                                                        at io.realm.RealmCache.doCreateRealmOrGetFromCache(RealmCache.java:461)
                                                                                                        at io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:422)
                                                                                                        at io.realm.Realm.getInstance(Realm.java:464)

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 1 Android Build Tools version: 7.4.1 Gradle version: https\://services.gradle.org/distributions/gradle-7.6-bin.zip

clementetb commented 1 year ago

We can see that you can reproduce this issue sometimes, are there any reproduction steps that we can follow to try to reproduce it?

Kolyall commented 1 year ago

no, i can't find steps

cmelchior commented 1 year ago

Hi @Kolyall This is a duplicate of https://github.com/realm/realm-java/issues/1477, so I will be merging it into that one. That issue also contains more context.

Note, we have a PR that is work-in-progress in Core that will fix this: https://github.com/realm/realm-core/pull/5786