io.realm.exceptions.RealmPrimaryKeyConstraintException: Value already exists: 0

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

io.realm.exceptions.RealmPrimaryKeyConstraintException: Value already exists: 0
at io.realm.internal.Table.throwDuplicatePrimaryKeyException(Table.java:721)
at io.realm.internal.Table.addEmptyRow(Table.java:414)
at io.realm.Realm.createObject(Realm.java:688)
at io.realm.RealmUserRealmProxy.copy(RealmUserRealmProxy.java:390)
at io.realm.RealmUserRealmProxy.copyOrUpdate(RealmUserRealmProxy.java:381)
at io.realm.DefaultRealmModuleMediator.copyOrUpdate(DefaultRealmModuleMediator.java:99)
at io.realm.Realm.copyOrUpdate(Realm.java:1272)
at io.realm.Realm.copyToRealm(Realm.java:727)
at com.smartwavedev.genie.Activity.MainActivity.onCreate(MainActivity.java:200)

Users with the same issue

54 times, 1 year ago

Know the solutions? Share your knowledge to help other developers to debug faster.