Skip to content

sfdx force:source:push failing with duplicate objects #1726

@deb761

Description

@deb761

Summary

I've tested this with multiple versions of the cli. Package has multiple projects, but no repeats of the metadata within them.

currently: sfdx-cli/7.169.1 darwin-x64 node-v16.15.0

{
    "packageDirectories": [
        {
            "path": "force-app",
            "default": true
        },
        {
            "path": "scratch-config",
            "default": false
        },
        {
            "path": "unpackaged/pre",
            "default": false
        }
    ],
    "namespace": "atlas1",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "sourceApiVersion": "55.0",
    "pushPackageDirectoriesSequentially": true
}

Output:

                    === Component Failures [4]                                  
                                                                                
                     Type  Name          Problem                                
                     ───── ─────────────                                        
                    ────────────────────────────────────────                    
                     Error Log__c.Client Duplicate name 'Log__c.Client'         
                    specified                                                   
                     Error Log__c.Client Duplicate name 'Log__c.Client'         
                    specified                                                   
                     Error Log__c.Client Duplicate name 'Log__c.Client'         
                    specified                                                   
                     Error Log__c.Client Duplicate name 'Log__c.Client'         
                    specified                                                   

I may have had a hidden file allowing me to push successfully, because when I cleaned out my directory, git clean -ffdx, I was able to reproduce what I have been seeing in github actions and my colleague has been seeing on windows.

Steps To Reproduce:

Repository to reproduce: atlas-dogs

NOTE: If your issue is not reproducable by dreamhouse-lwc, i.e. requires specific metadata or files, we require a link to a simple Salesforce project repository with a script to setup a scratch org that reproduces your problem.

  1. create a scratch org.
  2. run sfdx force:source:push to the scratch org.

Expected result

Source should have deployed to the scratch org.

Actual result

Describe what actually happened.

System Information

{
  "cliVersion": "sfdx-cli/7.169.1",
  "architecture": "darwin-x64",
  "nodeVersion": "node-v16.15.0",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 1.3.0 (core)",
    "@oclif/plugin-commands 2.2.0 (core)",
    "@oclif/plugin-help 2.2.3 (user)",
    "@oclif/plugin-not-found 2.3.1 (core)",
    "@oclif/plugin-plugins 2.1.0 (core)",
    "@oclif/plugin-update 1.3.10 (user)",
    "@oclif/plugin-version 1.1.2 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.4 (core)",
    "@oclif/plugin-which 2.1.0 (core)",
    "@salesforce/lwc-dev-server 2.10.0 (user)",
    "alias 2.1.0 (core)",
    "apex 1.2.0 (core)",
    "auth 2.2.5 (core)",
    "community 2.0.1 (core)",
    "config 1.4.19 (core)",
    "custom-metadata 2.0.0 (core)",
    "data 2.1.2 (core)",
    "generator 2.0.2 (core)",
    "info 2.1.0 (core)",
    "limits 2.0.1 (core)",
    "org 2.2.3 (core)",
    "packaging 1.9.1 (core)",
    "schema 2.1.3 (core)",
    "signups 1.2.0 (core)",
    "source 2.0.13 (core)",
    "telemetry 2.0.0 (core)",
    "templates 55.1.0 (core)",
    "trust 2.0.4 (core)",
    "user 1.4.0 (user)",
    "@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
    "salesforce-alm 54.8.1 (core)"
  ],
  "osVersion": "Darwin 21.6.0",
  "shell": "bash",
  "rootPath": "/usr/local/lib/node_modules/sfdx-cli"
}```
### Additional information

_Feel free to attach a screenshot_.

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigatingWe're actively investigating this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions