io.realm.exceptions.RealmPrimaryKeyConstraintException

Value already exists: 0

Solutions on the web14

  • Value already exists: 0
  • Value already exists: 0
  • Stack trace

    • io.realm.exceptions.RealmPrimaryKeyConstraintException: Value already exists: 0 at io.realm.internal.Table.throwDuplicatePrimaryKeyException(Table.java:727) at io.realm.internal.Table.addEmptyRowWithPrimaryKey(Table.java:473) at io.realm.Realm.createObject(Realm.java:701) at io.realm.StepRealmProxy.copy(StepRealmProxy.java:301) at io.realm.StepRealmProxy.copyOrUpdate(StepRealmProxy.java:291) at io.realm.DefaultRealmModuleMediator.copyOrUpdate(DefaultRealmModuleMediator.java:99) at io.realm.Realm.copyOrUpdate(Realm.java:1292) at io.realm.Realm.copyToRealm(Realm.java:720) at com.xyz.moorche.android.database.RealmDatabase$3.execute(RealmDatabase.java:220) at io.realm.Realm$1.run(Realm.java:1187) at io.realm.internal.async.BgPriorityRunnable.run(BgPriorityRunnable.java:34) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    54 times, 1 year ago