question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SFDX CLI for Windows ERROR: Cannot read property 'fileName' of undefined. for AuraDefinitionBundle

See original GitHub issue

Summary

I am receiving the error: ERROR: Cannot read property ‘fileName’ of undefined.

Steps To Reproduce:

  1. Define this package.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>AuraDefinitionBundle</name>
    </types>
    <version>45.0</version>
</Package>
  1. Run this command: sfdx force:source:retrieve --manifest c:\_hilton\BossReno\manifest\package.xml

Expected result

The source should be retrieved

Actual result

ERROR: Cannot read property ‘fileName’ of undefined.

Additional information

The development environment is Salesforce Spring 2019

I have posted these questions on the forums: https://salesforce.stackexchange.com/questions/251431/sfdx-error-cannot-read-property-filename-of-undefined/251569#251569

https://developer.salesforce.com/forums/ForumsMain?id=9062I000000QuEcQAK

All other nodes in the package.xml are working fine. Only the AuraDefinitionBundle is not working. I figured this out through process of elimination.

Here is my full 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>45.0</version>
</Package>

SFDX CLI Version(to find the version of the CLI engine run sfdx --version): sfdx-cli/6.54.4-c01dcc69db (windows-x64) node-v8.9.4

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)

@salesforce/plugin-generator 1.0.1 (core) @salesforce/sfdx-trust 2.0.1 (core) builtins 1.0.0 (core) salesforcedx 45.3.4

OS and version: Windows 10 Pro

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:39 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jayanthiravindran-capgeminicommented, Aug 10, 2020

Hi , ERROR running force:source:retrieve: Cannot read property ‘fileName’ of undefined - > Still the bug exists?

1reaction
Ramondicommented, Mar 6, 2019

@shetzel I had the exact same issue and running the commands you mentioned I was able to run a retrieve without any problem. Thanks mate!

Read more comments on GitHub >

github_iconTop Results From Across the Web

SFDX ERROR: Cannot read property 'fileName' of undefined
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...
Read more >
SFDX ERROR: Cannot read property 'fileName' of undefined.
ERROR : Cannot read property 'fileName' of undefined. Here is the command that is being issued in VS Code when I click on...
Read more >
Salesforce: SFDX ERROR: Cannot read property 'fileName' of ...
Salesforce: SFDX ERROR: Cannot read property 'fileName' of undefined Helpful? Please support me on Patreon: https://www.patreon.com/roelvandepaar With ...
Read more >
Metadata API Developer Guide
Deploy Metadata with REST API in Salesforce CLI . ... first examine how schema metadata describes the properties of business data. For.
Read more >
Salesforce CLI - SFDX - Cannot read properties of undefined ...
When running the command that makes the login against our Sandbox org, it redirects to a localhost URL and then it display an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found