Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'toLowerCase' of undefined #1187

Closed
IVerkhosh opened this issue Sep 10, 2021 · 5 comments
Closed

Cannot read property 'toLowerCase' of undefined #1187

IVerkhosh opened this issue Sep 10, 2021 · 5 comments
Labels
investigating We're actively investigating this issue

Comments

@IVerkhosh
Copy link

Summary

Executing sfdx force:source:retrieve resulted in "Cannot read property 'toLowerCase' of undefined" error

Steps To Reproduce:

  1. Execute sfdx force:source:retrieve -x ./manifest/PROD_package.xml --json

Expected result

Components retrieved from Org.

Actual result

Error "Cannot read property 'toLowerCase' of undefined"

sfdx force:source:retrieve -x ./manifest/PROD_package.xml --json --loglevel trace
{
"status": 1,
"name": "TypeError",
"message": "Cannot read property 'toLowerCase' of undefined",
"exitCode": 1,
"commandName": "Retrieve",
"stack": "TypeError: Cannot read property 'toLowerCase' of undefined\n at RegistryAccess.getTypeByName (C:\Users\ixv4\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules\@salesforce\source-deploy-retrieve\lib\src\registry\registryAccess.js:27:28)\n at ManifestResolver. (C:\Users\ixv4\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules\@salesforce\source-deploy-retrieve\lib\src\resolve\manifestResolver.js:42:42)\n at Generator.next ()\n at fulfilled (C:\Users\ixv4\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules\@salesforce\source-deploy-retrieve\lib\src\resolve\manifestResolver.js:11:58)\nOuter stack:\n at Function.wrap (C:\Users\ixv4\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules\@salesforce\plugin-source\node_modules\@salesforce\command\node_modules\@salesforce\core\lib\sfdxError.js:171:27)\n at Retrieve.catch (C:\Users\ixv4\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules\@salesforce\plugin-source\node_modules\@salesforce\command\lib\sfdxCommand.js:248:67)\n at async Retrieve._run
(C:\Users\ixv4\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules\@salesforce\plugin-source\node_modules\@salesforce\command\lib\sfdxCommand.js:85:13)\n at async Config.runCommand (C:\Users\ixv4\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules\@oclif\config\lib\config.js:173:24)\n at async SfdxMain.run (C:\Users\ixv4\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules\@oclif\command\lib\main.js:27:9)\n at async SfdxMain._run (C:\Users\ixv4\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules\@oclif\command\lib\command.js:43:20)\n at async Object.run (C:\Users\ixv4\AppData\Local\sfdx\client\7.117.0-b5a8ac9\dist\cli.js:162:47)",
"warnings": []
}

System Information

{
"cliVersion": "sfdx-cli/7.117.0",
"architecture": "win32-x64",
"nodeVersion": "node-v14.17.6",
"pluginVersions": [
"@oclif/plugin-autocomplete 0.3.0 (core)",
"@oclif/plugin-commands 1.3.0 (core)",
"@oclif/plugin-help 3.2.2 (core)",
"@oclif/plugin-not-found 1.2.4 (core)",
"@oclif/plugin-plugins 1.10.1 (core)",
"@oclif/plugin-update 1.4.0-3 (core)",
"@oclif/plugin-warn-if-update-available 1.7.0 (core)",
"@oclif/plugin-which 1.0.3 (core)",
"@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)",
"@salesforce/sfdx-trust 3.6.0 (core)",
"alias 1.1.10 (core)",
"apex 0.2.8 (core)",
"auth 1.7.1 (core)",
"config 1.2.28 (core)",
"custom-metadata 1.0.12 (core)",
"data 0.6.1 (core)",
"generator 1.1.7 (core)",
"limits 1.2.1 (core)",
"org 1.7.0 (core)",
"salesforce-alm 52.3.2 (core)",
"schema 1.0.8 (core)",
"sfdx-cli 7.117.0 (core)",
"source 1.0.12 (core)",
"telemetry 1.2.3 (core)",
"templates 52.1.0 (core)",
"user 1.4.0 (core)"
],
"osVersion": "Windows_NT 10.0.18363"
}

Additional information

Feel free to attach a screenshot.

@IVerkhosh IVerkhosh added the investigating We're actively investigating this issue label Sep 10, 2021
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@IVerkhosh
Copy link
Author

I found what causing this error.
I added documents and dashboard folders without the closing tag.
It should point to the error in xml file, instead of "Cannot read property 'toLowerCase' of undefined", which does not indicate anything

@khookguy
Copy link

khookguy commented Apr 6, 2022

I also experienced this when I was missing a closing tag in my package.xml. Thanks @IVerkhosh for reporting this or I would have spent hours trying to figure it out!

@marcilenne
Copy link

I removed the complete <type> </type> and it worked

@vmunisamy
Copy link

I found what causing this error. I added documents and dashboard folders without the closing tag. It should point to the error in xml file, instead of "Cannot read property 'toLowerCase' of undefined", which does not indicate anything

Thanks, got the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

4 participants