1

I have created a message channel in VS Code. When I attempt to deploy from the package.xml file I receive this error: "No source backed components present in the package".

When I attempt to deploy the xml file itself I receive this error: "Could not infer a metadata type".

Does any know what this means? I appreciate anyone's help with solving this.

1
  • This almost certainly means the file is the wrong folder, and so the correct datatype couldn't be determined. Make sure the xml file is stored in the correct file location. Read this carefully.
    – sfdcfox
    Jul 21, 2021 at 13:30

2 Answers 2

0

People landing here due to google search may have above error due to other reasons. This Answer talks to the "No source backed components present in the package" error, due to retrieve deploy bug.

So...

If you retrieve just the File, the folder will be present in the source, because that is the correct structure.

but the folder metadata could be missing, if you only retrieved the file. See pic add the folder to the package.xml

However... I retrieved both file and folder, but it failed deploy too, with a "not found in the Zipped directory" error.

This was because I retrieved with the extension in the package.xml which worked, but the extension is not wanted on deploy. I do feel this is a bug due to the need for various extensions should be allowed.

  1. you must retrieve file and folder, to be able to deploy a new file in a new folder.
  2. you must not deploy with the file extension in the Package.xml, otherwise you get a "An object '' of type '' was named in package.xml, but was not found in zipped directory" error.
  3. this may change.
  4. if you experience these errors try a few different setups because sfdx could change how it behaves.

Here is my failure example

enter image description here

My example is for documents but the error was the same, other may land here too.

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_document.htm

0

This error occurs when you create messageChannels folder somewhere else instead 'force-app/main/default'.

You must log in to answer this question.

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