io.realm.exceptions.RealmPrimaryKeyConstraintException: Value already exists: ahJkZXZ-Y2hyaXNjYW1wLTEzMTlyDAsSCHByb2dyYW1zDA

GitHub | chrisolsen | 4 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    copyToRealmOrUpdate fails with RealmPrimaryKeyConstraintException: Value already exists

    GitHub | 4 months ago | chrisolsen
    io.realm.exceptions.RealmPrimaryKeyConstraintException: Value already exists: ahJkZXZ-Y2hyaXNjYW1wLTEzMTlyDAsSCHByb2dyYW1zDA
  2. 0

    Realm : getTable() delete all then copyToRealm

    Stack Overflow | 1 year ago | Miguel Victor
    io.realm.exceptions.RealmPrimaryKeyConstraintException: Value already exists: 18
  3. 0

    I want to add object to realm DB every time an item is clicked from the recyclerview

    Stack Overflow | 7 months ago | Nukhba Arshad
    io.realm.exceptions.RealmPrimaryKeyConstraintException: Value already exists: 0
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    RealmPrimaryKeyConstraintException: Value already exists: 0

    GitHub | 6 months ago | mehrdaad
    io.realm.exceptions.RealmPrimaryKeyConstraintException: Value already exists: 0

  1. brunosatriani 54 times, last 8 months ago

Root Cause Analysis

  1. io.realm.exceptions.RealmPrimaryKeyConstraintException

    Value already exists: ahJkZXZ-Y2hyaXNjYW1wLTEzMTlyDAsSCHByb2dyYW1zDA

    at io.realm.internal.Table.throwDuplicatePrimaryKeyException()
  2. io.realm.internal
    Table.addEmptyRowWithPrimaryKey
    1. io.realm.internal.Table.throwDuplicatePrimaryKeyException(Table.java:664)
    2. io.realm.internal.Table.addEmptyRowWithPrimaryKey(Table.java:435)
    3. io.realm.internal.Table.addEmptyRowWithPrimaryKey(Table.java:387)
    3 frames
  3. io.realm
    Realm.createObject
    1. io.realm.Realm.createObjectInternal(Realm.java:865)
    2. io.realm.Realm.createObject(Realm.java:845)
    2 frames