Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RLM_ERR_NO_SUCH_OBJECT]: Key 'X' not found in <classname> when nullifying incoming links #1537

Closed
thiagodelgado111 opened this issue Oct 4, 2023 · 3 comments · Fixed by realm/realm-core#7064

Comments

@thiagodelgado111
Copy link

thiagodelgado111 commented Oct 4, 2023

How frequently does the bug occur?

Sometimes

Description

Hi folks!

Has anyone seen this one before? It looks like it happens when trying to create an asymmetric object using insert and it might be related to realm-core (https://github.com/realm/realm-core/blob/8948e8399b93f8e3bcf3b914f1f1cf4c2a5a6a6b/src/realm/cluster.cpp#L974). I couldn't reproduce it so maybe you can give me a hand figuring this one out?

Another thing I noticed is that the error message says it couldn't find Key '4' in my AsymmetricRealmObject but my primary key is an ObjectId and I'm not using dictionaries or embedded models.

Stacktrace & log output

java.lang.IllegalArgumentException: [RLM_ERR_NO_SUCH_OBJECT]: Key '4' not found in 'Event' when nullifying incoming links
    at io.realm.kotlin.internal.interop.CoreErrorConverter.asThrowable
    at io.realm.kotlin.internal.interop.CoreErrorConverter.asThrowable
    at io.realm.kotlin.internal.interop.realmcJNI.realm_commit(SourceFile)
    at io.realm.kotlin.internal.SuspendableWriter$WriterRealm.getRealmReference
    at io.realm.kotlin.internal.WriteTransactionManager$DefaultImpls.commitTransaction
    at io.realm.kotlin.internal.SuspendableWriter$WriterRealm.commitTransaction
    at io.realm.kotlin.internal.interop.realmc.realm_commit
    at io.realm.kotlin.internal.interop.RealmInterop.realm_commit
    at io.realm.kotlin.internal.WriteTransactionManager$DefaultImpls.commitTransaction
    at io.realm.kotlin.internal.SuspendableWriter$WriterRealm.commitTransaction
    at io.realm.kotlin.internal.SuspendableWriter$write$2.invokeSuspend
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith
    at kotlinx.coroutines.DispatchedTask.run
    at kotlinx.coroutines.DispatchedTask.run
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
    at java.lang.Thread.run(Thread.java:1012)

Can you reproduce the bug?

No

Reproduction Steps

No response

Version

1.10.0

What Atlas App Services are you using?

Both Atlas Device Sync and Atlas App Services

Are you using encryption?

No

Platform OS and version(s)

Android

Build environment

Android Studio version: Iguana | 2023.2.1 Canary 6
Android Build Tools version: 33.0.2
Gradle version: 8.0.2

@cmelchior
Copy link
Contributor

Key '4' is our internal ID used for Objects, which is probably why you don't recognize it.

Asymmetric objects are deleted on the device once they are sent to the server and it looks like something is going wrong there for some reason.

Can you share the schemas used for these objects?

@jedelbo
Copy link

jedelbo commented Oct 16, 2023

Internal note: related Core version is .13.15.2

@jedelbo
Copy link

jedelbo commented Oct 16, 2023

I can reproduce the error, if I delete the just created object before the transaction is committed. Could that be the issue here?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants