4

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
sfdx-cli/7.23.1-ced0ec4940
DevHub: release 19'

EDIT
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? – rahul gawale Sep 10 at 11:02
  • Sometimes Account, sometimes custom object. – ondrakr Sep 10 at 11:15
3

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

-2

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

Steps.

  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 at 11:05
  • are you trying to insert in APEX or via UI – Sarvesh Sep 10 at 11:08
  • Apex/UI doesn't matter as mentioned in the question. – ondrakr Sep 10 at 11:15
  • check is there any PB, workflow with the corresponding object – Sarvesh Sep 10 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.