Closed crooms closed 2 years ago
As a workaround, we tried to use force:source:convert
to convert the source into metadata API, but that command error'd with the same error as force:source:deploy
`ERROR running force:source:convert: Unexpected file found in package directory: C:\sample\app\main\default\accountRelationshipShareRules\AccountSharing.accountRelationshipShareRule
Even retrieving this using sfdx force:source:retrieve causes issues:
sfdx force:source:retrieve --json --loglevel fatal -m AccountRelationshipShareRule
{
"status": 1,
"name": "UnsupportedType",
"message": "The specified metadata type is unsupported: [AccountRelationshipShareRule]",
"exitCode": 1,
"commandName": "SourceRetrieveCommand",
"stack": "UnsupportedType: The specified metadata type is unsupported: [AccountRelationshipShareRule]\n at Function.create (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/salesforce-alm/node_modules/@salesforce/core/lib/sfdxError.js:160:16)\n at /Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/salesforce-alm/dist/lib/source/sourceElementsResolver.js:46:40\n at Array.forEach (<anonymous>)\n at SourceElementsResolver.parseTypeNamePairs (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/salesforce-alm/dist/lib/source/sourceElementsResolver.js:42:23)\n at SourceElementsResolver.getSourceElementsFromManifest (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/salesforce-alm/dist/lib/source/sourceElementsResolver.js:32:21)\n at SourceRetrieve.retrieveFromManifest (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/salesforce-alm/dist/lib/source/sourceRetrieve.js:97:43)\n at SourceRetrieve.retrieve (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/salesforce-alm/dist/lib/source/sourceRetrieve.js:61:27)\n at SourceRetrieveCommand.execute (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/salesforce-alm/dist/lib/source/sourceRetrieveCommand.js:32:16)\n at SourceRetrieveCommand.execLegacyCommand (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/salesforce-alm/dist/ToolbeltCommand.js:149:29)\n at SourceRetrieveCommand.run (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/salesforce-alm/dist/commands/force/source/retrieve.js:32:16)\n at SourceRetrieveCommand._run (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/@salesforce/command/lib/sfdxCommand.js:93:40)\n at Config.runCommand (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/@oclif/config/lib/config.js:173:24)\n at Main.run (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/@oclif/command/lib/main.js:27:9)\n at Main._run (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/node_modules/@oclif/command/lib/command.js:43:20)\n at Object.run (/Users/jan/.local/share/sfdx/client/7.82.0-3d0c527ac6/dist/cli.js:32:20)",
"warnings": []
}
This type is supported in the newer deploy/retrieve commands. Is the error gone?
This issue has been automatically closed because there has been no response to our request for more information from the original author. Currently, there is not enough information provided for us to take action. Please reply and reopen this issue if you need additional assistance.
Summary
When running
sfdx force:source:deploy
of a folder that contains AccountRelationshipShareRule metadata, sfdx fails with errorERROR running force:source:deploy: Unexpected file found in package directory:
If you run
sfdx force:source:convert
to convert to mdapi format, and deploy usingsfdx force:mdap:deploy
it works correctly.Steps To Reproduce:
sfdx force:source:deploy
with a folder path that includes AccountRelationshipShareRule metadata.Expected result
Command should pass and metadata is deployed.
Actual result
Errors with
ERROR running force:source:deploy: Unexpected file found in package directory: C:\sample\app\main\default\accountRelationshipShareRules\AccountSharing.accountRelationshipShareRule
Additional information
As mentioned, works with mdapi deployment.
SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
sfdx-cli/7.49.1-2b6ba86a25 win32-x64 node-v10.15.3
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)
OS and version: Windows 10