Cli: sfdx force:source:retrieve -m CustomMetadata fails

Created on 26 Jun 2020  ยท  4Comments  ยท  Source: forcedotcom/cli

Summary

sfdx force:source:retrieve -m CustomMetadata fails against non-scratch orgs

Steps To Reproduce:

Create a non-scratch org and auth to it
sfdx force:source:retrieve -m CustomMetadata

I can't reproduce it with a scratch org because the command works against scratch orgs.

Expected result

Source retrieves

Actual result

$ sfdx force:source:retrieve -u platformers -m CustomMetadata
ERROR running force:source:retrieve: The "path" argument must be of type string. Received type object

Additional information

Fails against both production and full sandbox
Also fails when trying to pull using the OrgBrowser in vscode...same command underneath in the Output
sfdx-cli/7.61.0 darwin-x64 node-v12.14.0

$ sfdx plugins --core
@mshanemc/sfdx-migration-automatic 0.3.1 (link) /Users/shane.mclaughlin/code/sfdx-migration-automatic
@oclif/plugin-autocomplete 0.2.0
@oclif/plugin-commands 1.2.3 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.7.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/analytics 0.17.0 (link) /Users/shane.mclaughlin/code/sfdx-analytics-plugin
@salesforce/lwc-dev-server 2.2.0
โ”œโ”€ @oclif/plugin-help 2.2.1
โ””โ”€ @oclif/plugin-update 1.3.9
@salesforce/sfdx-diff 0.0.6
@salesforce/sfdx-trust 3.0.7 (core)
analytics 1.7.1 (core)
evergreen 0.22.10
โ””โ”€ evergreen-build 0.11.1
generator 1.1.2 (core)
salesforcedx 48.19.0
โ”œโ”€ @salesforce/sfdx-plugin-lwc-test 0.1.5
โ”œโ”€ custom-metadata 1.0.1
โ”œโ”€ salesforce-alm 48.20.0
โ””โ”€ salesforcedx-templates 48.18.0
sfdx-cli 7.61.0 (core)
shane-sfdx-plugins 4.37.1 (link) /Users/shane.mclaughlin/code/shane-sfdx-plugins

OSX 10.15.5 (19F101)

bug

All 4 comments

I got this to work--it looks like if the cmdt object is in a packageDirectory that isn't the default, and the pull tries to put the CustomMetadata into a different packageDirectory that is the default, you get this error message.

This is no longer reproducible with the latest version of the CLI

How come using this command works sfdx force:source:retrieve -m CustomMetadata but if I specify a wildcard in a package.xml and do sfdx force:source:retrieve -x package.xml I get this error The specified metadata type is unsupported: [Custom?Metadata]

Note CustomMetadata works but not Custommetadata (case sensitive).

Was this page helpful?
0 / 5 - 0 ratings