-
Type: Improvement
-
Resolution: Incomplete
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
Description
Realm doesn't work properly in BroadcastReceiver. It seems to have been functioning well until version 1.5.2.
I'm trying to perform Realm.open in the onReceive method of BroadcastReceiver.
When I try it, it works fine in version 1.5.2, but in version 1.6.0, I encounter the following error when attempting Realm.open in onReceive of Broadcast. The same error occurs in version 1.9.1 as well.
I'm running it in KMM.
If you need any further information, I'll be happy to provide it.
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
java.lang.UnsatisfiedLinkError: No implementation found for long io.realm.kotlin.internal.interop.realmcJNI.realm_config_new() (tried Java_io_realm_kotlin_internal_interop_realmcJNI_realm_1config_1new and Java_io_realm_kotlin_internal_interop_realmcJNI_realm_1config_1new__) at io.realm.kotlin.internal.interop.realmcJNI.realm_config_new(Native Method) at io.realm.kotlin.internal.interop.realmc.realm_config_new(realmc.java:262) at io.realm.kotlin.internal.interop.RealmInterop.realm_config_new(RealmInterop.kt:125) at io.realm.kotlin.internal.ConfigurationImpl.createNativeConfiguration(ConfigurationImpl.kt:99) at io.realm.kotlin.internal.ConfigurationImpl.openRealm$suspendImpl(ConfigurationImpl.kt:104) at io.realm.kotlin.internal.ConfigurationImpl.openRealm(Unknown Source:0) at io.realm.kotlin.internal.RealmImpl$1.invokeSuspend(RealmImpl.kt:121) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284) at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85) at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59) at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source: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:118) at io.realm.kotlin.internal.RealmImpl.<init>(Unknown Source:0) at io.realm.kotlin.internal.RealmImpl$Companion.create$io_realm_kotlin_library(RealmImpl.kt:296) at io.realm.kotlin.Realm$Companion.open(Realm.kt:82)
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
1.5.2
What Atlas App Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Android13
Build environment
Android Studio version: Android Studio Giraffe | 2022.3.1 Canary 8
Android Build Tools version: ...
Gradle version: ...