forcedotcom / salesforcedx-apex

Salesforce Apex Node Library
BSD 3-Clause "New" or "Revised" License
18 stars 25 forks source link

sfcli apex test run command is throwing an error "Error (10): Cannot read properties of undefined (reading 'Status')" #346

Open RohitGagan16 opened 7 months ago

RohitGagan16 commented 7 months ago

Summary

sfcli apex test run command is throwing an error "

Steps To Reproduce

IMPORTANT First authenticate the user using salesforce cli. Use the authenticator token to run the following command

sf apex run test -o -l RunLocalTests -d {dir} -w 240 -r human -c

Expected result

This should give the test result report along with the coverage for each class

Actual result

It is throwing an error "Error (10): Cannot read properties of undefined (reading 'Status')""

System Information

Jenkins linux agent

Salesforce cli version:

github-actions[bot] commented 7 months ago

Hello @RohitGagan16 :wave: It looks like you didn't include the full Salesforce CLI version information in your issue. Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

A few more things to check:

Thank you!

github-actions[bot] commented 7 months ago

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.

mshanemc commented 7 months ago

That's coming from the Apex library. I'm going to transfer the issue to them. Thanks for reporting.

RohitGagan16 commented 7 months ago
Rocko1204 commented 6 months ago

Hi @mshanemc @RohitGagan16 I have created the pull request #351 to resolve this issue. The error occurs very often hence the pull request. It doesn't solve the actual problem on the org, but it handles the module error.

mingxuanzhangsfdx commented 6 months ago

Hi @Rocko1204 Thanks for creating the PR, we will review it and get back to you soon.