1

I am getting an error when trying to do a sfdx retrieve:

ERROR: Cannot read property 'fileName' of undefined.

Here is the command that is being issued in VS Code when I click on the package.xml file and retrive source from org:

sfdx force:source:retrieve --manifest c:\hilton\BossReno\manifest\package.xml

The development environment is Salesforce Spring 2019 Here is my version of sfdx:

sfdx-cli/6.53.0-67a9cbb60c (windows-x64) node-v8.9.4

Here is my package.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>ApexClass</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexComponent</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexPage</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTestSuite</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTrigger</name>
    </types>
    <types>
        <members>*</members>
        <name>AuraDefinitionBundle</name>
    </types>
    <types>
        <members>*</members>
        <name>StaticResource</name>
    </types>
    <version>44.0</version>
</Package>
  • 2
    Is c:_hilton\ a typo? Should be \ instead of _. – sfdcfox Feb 22 at 20:55
  • It took out the backslash when I posted the stackoverflow question. it is c:\_hilton – Greg Finzer Feb 22 at 21:31
  • Just like in programming, you have to escape your backslashes. I'll fix it for you. (Or use a code block like I did). – sfdcfox Feb 22 at 21:35
0

This was an issue with the CLI on Windows, you can read more about it here.

I tried today after running sfdx update (I'm now running salesforcedx 45.3.4 (core)), and it's fixed.

Try updating the CLI and run the command again.

If it's not working, please post your CLI version (running sfdx plugins --core), and add a comment on the issue.

A workaround is to use sfdx force:mdapi:retrieve with the following package.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Package xmlns="http://soap.sforce.com/2006/04/metadata">
        <types>
            <members>*</members>
            <name>LightningComponentBundle</name>
        </types>
    <version>45.0</version>
</Package>

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.