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

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

Open
RohitGagan16 opened this issue Feb 6, 2024 · 6 comments

Comments

@RohitGagan16
Copy link

Summary

sfcli apex test run command is throwing an error "

  • sf apex run test -o -l RunLocalTests -d {dir} -w 240 -r human -c
    Error (10): Cannot read properties of undefined (reading 'Status')"

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:

  • sf --version
    @salesforce/cli/2.26.10 linux-x64 node-v18.17.1
Copy link

github-actions bot commented Feb 6, 2024

Hello @RohitGagan16 👋 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:

  • Make sure you've provided detailed steps to reproduce your issue.
    • A repository that clearly demonstrates the bug is ideal.
  • Make sure you've installed the latest version of Salesforce CLI. (docs)
    • Better yet, try the rc or nightly versions. (docs)
  • Try running the doctor command to diagnose common issues.
  • Search GitHub for existing related issues.

Thank you!

Copy link

github-actions bot commented Feb 6, 2024

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
Copy link
Contributor

mshanemc commented Feb 6, 2024

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

@mshanemc mshanemc transferred this issue from forcedotcom/cli Feb 6, 2024
@RohitGagan16
Copy link
Author

  • sf --version --verbose --json
    @salesforce/cli/2.26.10 linux-x64 node-v18.17.1

@Rocko1204
Copy link

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants