I and my whole team encounter this error while inserting some data into a new Scratch Org.

DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>: []

What we are doing:
* create a new scratch org
* push source
* insert one account or one custom object (UI/Apex doesn't matter)
* insertion usually fails even though no records are in the scratch org

The problem is it's indeterministic. Tried the same steps more times on the same source, the same devhub, and sometimes it succeeds, sometimes it fails.

Moreover, another team working on a different project is not facing this issue at all.

sourceApiVersion: 45.0
DevHub: release 19'

Source worked as expected. On 5th September it stopped working, i.e. newly created scratch org started to throw this exception even though no changes in the source were made. Even tried to create scratch org from old source that was validated through our pipeline at that time and now it's facing the same issue.

  • can you specify which object? is it the standard object or custom object have unique field on it? Sep 10, 2019 at 11:02
  • Sometimes Account, sometimes custom object.
    – ondrakr
    Sep 10, 2019 at 11:15

2 Answers 2


Just got an answer from the support that this is known bug and will be resolved ASAP.


Please check is there any duplicate rule active in your org.


  1. search for the duplicate rule in the setup in a classic.
  2. If any deactivate that and try.
  • The insertion fails even on objects without any duplication rules. Also, no records are in the scratch org.
    – ondrakr
    Sep 10, 2019 at 11:05
  • are you trying to insert in APEX or via UI
    – Sarvesh
    Sep 10, 2019 at 11:08
  • Apex/UI doesn't matter as mentioned in the question.
    – ondrakr
    Sep 10, 2019 at 11:15
  • check is there any PB, workflow with the corresponding object
    – Sarvesh
    Sep 10, 2019 at 11:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .