Skip to content

Not able to deploy, error: Duplicate name 'metadataName' specified #7244

@PawelWozniak

Description

@PawelWozniak

Summary

After last changeds to the plugin architecture source tracking is mandatory that cause an issues when keeping only requiring components in the repository.

Steps To Reproduce:

I don't know how to prepare example but will describe the process.

  1. I have a project where we download only part of metadata using package.xml as we want to keep only strictly listed metadata in the repository.
  2. Initiate Download metadata with package.xml
  3. First change to old process, conflicts are compared an you get notification if you want to overwrite conflicts - yes.
  4. Metadata are downloaded
  5. Metadata that we don't want to keep are removed, task related changes are commited to git.
  6. Then sf project deploy start --dry-run --ignore-conflicts --verbose --test-level RunLocalTests --source-dir . --target-org PROD is run.
  7. Geting a long list of errors like:
| CustomField     │ PricebookEntry.UnitPrice                                                      │ Duplicate name 'PricebookEntry.UnitPrice' specified                                                      │             │
│ CustomField     │ PricebookEntry.UnitPrice                                                      │ Duplicate name 'PricebookEntry.UnitPrice' specified                                                      │             │
│ CustomField     │ PricebookEntry.UseStandardPrice                                               │ Duplicate name 'PricebookEntry.UseStandardPrice' specified                                               │             │
│ CustomField     │ PricebookEntry.UseStandardPrice                                               │ Duplicate name 'PricebookEntry.UseStandardPrice' specified                                               │             │
│ ListView        │ Product2.AllProducts                                                          │ Duplicate name 'Product2.AllProducts' specified                                                          │             │
│ ListView        │ Product2.AllProducts                                                          │ Duplicate name 'Product2.AllProducts' specified                    

There is only one solution to make it work by deleting the content of .sf\orgs\00D1x0000000NAABCD\remoteMetadata
Then deployment go smoothly.

Expected result

I should be able turn of source tracking as I don't need.

Actual result

Deployment fails with unknown erros

Additional information

Image

Salesforce Extension Version in VS Code:
66.8.0

Salesforce CLI Version:
@salesforce/cli/2.130.9 win32-x64 node-v24.15.0

OS and version:
Windows 11 25H2

VS Code version:
1.117

Most recent version of the extensions where this was working:
Before introducing a new plugin for metadata handling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions