You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
Unable to perform sfdx force:source commands, error is “ERROR running force:source:legacy:status: Cannot read properties of undefined (reading 'length')”
Steps To Reproduce:
sfdx force:source:legacy:status -u or
sfdx force:source:legacy:pull -u
Expected result
Command should work as it always has.
Actual result
$ sfdx force:source:legacy:status -u
WARNING: The command "SourceStatusCommand" has been deprecated and will be removed in v56.0 or later. Use "force:source:status" instead.
ERROR running force:source:legacy:status: Cannot read properties of undefined (reading 'length')
Additional information
Feel free to attach a screenshot.
SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
sfdx-cli/7.169.1 darwin-x64 node-v16.17.0
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)
@oclif/plugin-autocomplete 1.3.0 (core)
@oclif/plugin-commands 2.2.0 (core)
@oclif/plugin-help 5.1.12 (core)
@oclif/plugin-not-found 2.3.1 (core)
@oclif/plugin-plugins 2.1.0 (core)
@oclif/plugin-update 3.0.0 (core)
@oclif/plugin-version 1.1.2 (core)
@oclif/plugin-warn-if-update-available 2.0.4 (core)
@oclif/plugin-which 2.1.0 (core)
@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)
alias 2.1.0 (core)
apex 1.2.0 (core)
auth 2.2.5 (core)
community 2.0.1 (core)
config 1.4.19 (core)
custom-metadata 2.0.0 (core)
data 2.1.2 (core)
generator 2.0.2 (core)
info 2.1.0 (core)
limits 2.0.1 (core)
org 2.2.3 (core)
packaging 1.9.1 (core)
salesforce-alm 54.8.1 (core)
schema 2.1.3 (core)
sfdx-cli 7.169.1 (core)
signups 1.2.0 (core)
source 2.0.13 (core)
telemetry 2.0.0 (core)
templates 55.1.0 (core)
trust 2.0.4 (core)
user 2.1.2 (core)
OS and version:
MacOS 12.6
Stack Trace:
Log:
{"name":"sf","hostname":"HONC02DR86LMD6R","pid":10663,"log":"SourceStatusCommand","level":40,"msg":"[\n '\x1B[33mWARNING:\x1B[39m',\n 'The command "SourceStatusCommand" has been deprecated and will be removed in v56.0 or later. Use "force:source:status" instead.'\n]","time":"2022-09-26T14:16:23.211Z","v":0}
{"name":"sf","hostname":"HONC02DR86LMD6R","pid":10663,"log":"SourceStatusCommand","level":50,"msg":"[\n '\x1B[1mERROR running force:source:legacy:status: \x1B[22m',\n "\x1B[31mCannot
read properties of undefined (reading 'length')\x1B[39m"\n]","time":"2022-09-26T14:16:30.304Z","v":0}
ROOT Cause :
On investigation, this was an issue with the implementation of mydomain on a previously onauthorized org. As per query.js :
this.records = (_this$records2 = this.records) === null || _this$records2 === void 0 ? void 0 : (0, _concat.default)(_this$records2).call(_this$records2, maxFetch - this.records.length > data.records.length ? data.records : (0, _slice.default)(_context7 = data.records).call(_context7, 0, maxFetch - this.records.length));
this._locator = data.nextRecordsUrl ? this.urlToLocator(data.nextRecordsUrl) : undefined;
this._finished = this._finished || data.done || !autoFetch || // this is what the response looks like when there are no results
data.records.length === 0 && data.done === undefined; // streaming record instances
This does not appear to make account for API calls that result in 200 level status not conforming to the expected response shape, which would be the case here. force:org:open in these instances redirects to an authorization page.
Re-authorization of the org fixes this error, so this issue is more for general information for future googlers .
The text was updated successfully, but these errors were encountered:
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.
Summary
Unable to perform sfdx force:source commands, error is “ERROR running force:source:legacy:status: Cannot read properties of undefined (reading 'length')”
Steps To Reproduce:
sfdx force:source:legacy:status -u or
sfdx force:source:legacy:pull -u
Expected result
Command should work as it always has.
Actual result
$ sfdx force:source:legacy:status -u
WARNING: The command "SourceStatusCommand" has been deprecated and will be removed in v56.0 or later. Use "force:source:status" instead.
ERROR running force:source:legacy:status: Cannot read properties of undefined (reading 'length')
Additional information
Feel free to attach a screenshot.
SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
sfdx-cli/7.169.1 darwin-x64 node-v16.17.0
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)
@oclif/plugin-autocomplete 1.3.0 (core)
@oclif/plugin-commands 2.2.0 (core)
@oclif/plugin-help 5.1.12 (core)
@oclif/plugin-not-found 2.3.1 (core)
@oclif/plugin-plugins 2.1.0 (core)
@oclif/plugin-update 3.0.0 (core)
@oclif/plugin-version 1.1.2 (core)
@oclif/plugin-warn-if-update-available 2.0.4 (core)
@oclif/plugin-which 2.1.0 (core)
@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)
alias 2.1.0 (core)
apex 1.2.0 (core)
auth 2.2.5 (core)
community 2.0.1 (core)
config 1.4.19 (core)
custom-metadata 2.0.0 (core)
data 2.1.2 (core)
generator 2.0.2 (core)
info 2.1.0 (core)
limits 2.0.1 (core)
org 2.2.3 (core)
packaging 1.9.1 (core)
salesforce-alm 54.8.1 (core)
schema 2.1.3 (core)
sfdx-cli 7.169.1 (core)
signups 1.2.0 (core)
source 2.0.13 (core)
telemetry 2.0.0 (core)
templates 55.1.0 (core)
trust 2.0.4 (core)
user 2.1.2 (core)
OS and version:
MacOS 12.6
Stack Trace:
ERROR running force:source:legacy:status: Cannot read properties of undefined (reading 'length')
*** Internal Diagnostic ***
Type: Cannot read properties of undefined (reading 'length')
at Function.wrap (/usr/local/lib/sfdx/node_modules/@salesforce/core/lib/sfError.js:61:25)
at SourceStatusCommand.catch (/usr/local/lib/sfdx/node_modules/salesforce-alm/dist/ToolbeltCommand.js:255:44)
at async SourceStatusCommand._run (/usr/local/lib/sfdx/node_modules/@salesforce/command/lib/sfdxCommand.js:106:13)
at async Config.runCommand (/usr/local/lib/sfdx/node_modules/@oclif/core/lib/config/config.js:272:25)
at async run (/usr/local/lib/sfdx/node_modules/@oclif/core/lib/main.js:76:5)
Caused by: TypeError: Cannot read properties of undefined (reading 'length')
at Query._execute (/usr/local/lib/sfdx/node_modules/jsforce/lib/query.js:483:205)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /usr/local/lib/sfdx/node_modules/jsforce/lib/query.js:395:9
Log:
{"name":"sf","hostname":"HONC02DR86LMD6R","pid":10663,"log":"SourceStatusCommand","level":40,"msg":"[\n '\x1B[33mWARNING:\x1B[39m',\n 'The command "SourceStatusCommand" has been deprecated and will be removed in v56.0 or later. Use "force:source:status" instead.'\n]","time":"2022-09-26T14:16:23.211Z","v":0}
{"name":"sf","hostname":"HONC02DR86LMD6R","pid":10663,"log":"SourceStatusCommand","level":50,"msg":"[\n '\x1B[1mERROR running force:source:legacy:status: \x1B[22m',\n "\x1B[31mCannot
read properties of undefined (reading 'length')\x1B[39m"\n]","time":"2022-09-26T14:16:30.304Z","v":0}
ROOT Cause :
On investigation, this was an issue with the implementation of mydomain on a previously onauthorized org. As per query.js :
This does not appear to make account for API calls that result in 200 level status not conforming to the expected response shape, which would be the case here. force:org:open in these instances redirects to an authorization page.
Re-authorization of the org fixes this error, so this issue is more for general information for future googlers .
The text was updated successfully, but these errors were encountered: