I am getting this error while trying to fetch(retrieve) source from VS Code and SF Extension Pack.


Right click on sfdx-project-json -> click on Retreiev Source from Org.

enter image description here

The file is present in the directory. So the problem doesn't exist here.


The problem is that your sfdx-project.json file isn't a source file that can be retrieved. You'll need to select something valid to retrieve.

This can be a particular metadata file (e.g., a specific class file to retrieve just that class), a folder (e.g., the classes folder to retrieve all classes in the folder) or a manifest (package.xml file).

| improve this answer | |
  • 1
    Hey John, Actually the situation is that I need to fetch all customObjects using VS Code and I added the entry of Custom Object in package.xml and tried again to retrieve data by right clicking on sfdx-project.json and clicking retrieve source and there I get error. Is there a way to retrieve the custom objects in that project – rrc1709 Jan 2 '19 at 12:49
  • 3
    For that, you should right-click on the package.xml file and click 'Retrieve Source from Org' to retrieve the metadata in your manifest. If you want to retrieve all of your custom objects and nothing else in the manifest you could also run the following command: sfdx force:source:retrieve -m CustomObject – John Towers Jan 2 '19 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.