I am using the following command to deploy to a sandbox:

sfdx force:source:deploy -x ./manifest/package.xml

My source is in DX format and it deploys fine when there are no errors.

However, when there are errors the line numbers that are reported do not correspond to lines in the problem files reported. For example, I have an error reported as:

duplicate value found: <unknown> duplicates value on record with id: <unknown> (5407:18)

When I open TheRecordType.recordType-meta.xml it has nowhere near 5407 lines. My guess is that the line numbers being reported are in some intermediate metadata file that the CLI is using, but I do not know where to find them.

Why is there a line number mismatch?

If it is what I think (or even isn't), where are the metadata files the CLI creates when using force:source:deploy with a manifest file (package.xml) and the dx source format?

1 Answer 1


You're right, the error line number is linked to the Metadata format, not Source format.

With Metadata format, Record Types (and other stuff like fields) are part of only one metadata sobject file, which is refered to by the error line number.

What you can do is convert your source to the metadata format using sfdx force:source:convert, and then look at the metadata file generated for your object.

You can also try using sfdx force:source:deploy --dev-debug to find where are stored the temporary files, but I find it less convenient.

Though to be honest in this Record Type issue, I think the error line number will only point you to the opening tag of your record type, so you may not learn something new.

Not saying this is your issue, but when I had this issue in the past, this was linked to a duplicate value in one of the related picklist with a different encoding, so having both values it's solved and it%27s solved.

  • 1
    Looks like the encoding was the culprit. I used your convert suggestion. ThanksI Commented Dec 13, 2019 at 16:06
  • I reported the bug in a Github issue Commented Dec 13, 2019 at 16:07

You must log in to answer this question.

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