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

codecoverage not getting #2873

Open
revanth-svmx opened this issue May 17, 2024 · 9 comments
Open

codecoverage not getting #2873

revanth-svmx opened this issue May 17, 2024 · 9 comments
Labels
more information required Issue requires more information or a response from the customer stale validated Version information for this issue has been validated

Comments

@revanth-svmx
Copy link

revanth-svmx commented May 17, 2024

Note
Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

sf apex get test --test-run-id 707RL00000E6OMq -o test-kysllsvmthwu@example.com --code-coverage --json
Getting this error: RangeError: Invalid string length

Steps To Reproduce

IMPORTANT
Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue.
We may close your issue if you don't include proper instructions.

  • Generate a project with sf project generate or fork dreamhouse-lwc.
  • Provide detailed step-by-step instructions on how to reproduce the issue.

Expected result

Actual result

System Information

@salesforce/cli/2.41.8 darwin-x64 node-v20.12.2
sarigarevanth@SREVANTH2ML ~ % sf version --verbose --json
{
"architecture": "darwin-x64",
"cliVersion": "@salesforce/cli/2.41.8",
"nodeVersion": "node-v20.12.2",
"osVersion": "Darwin 22.4.0",
"rootPath": "/usr/local/lib/sf",
"shell": "zsh",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.0.17 (core)",
"@oclif/plugin-commands 3.3.2 (core)",
"@oclif/plugin-help 6.0.21 (core)",
"@oclif/plugin-not-found 3.1.8 (core)",
"@oclif/plugin-plugins 5.0.19 (core)",
"@oclif/plugin-search 1.0.23 (core)",
"@oclif/plugin-update 4.2.11 (core)",
"@oclif/plugin-version 2.0.18 (core)",
"@oclif/plugin-warn-if-update-available 3.0.16 (core)",
"@oclif/plugin-which 3.1.9 (core)",
"@salesforce/cli 2.41.8 (core)",
"apex 3.1.11 (core)",
"auth 3.6.9 (core)",
"data 3.3.4 (core)",
"deploy-retrieve 3.6.13 (core)",
"info 3.2.7 (core)",
"limits 3.3.5 (core)",
"marketplace 1.2.5 (core)",
"org 4.1.8 (core)",
"packaging 2.4.2 (core)",
"schema 3.3.6 (core)",
"settings 2.2.6 (core)",
"sobject 1.4.1 (core)",
"source 3.3.9 (core)",
"telemetry 3.3.5 (core)",
"templates 56.2.5 (core)",
"trust 3.6.8 (core)",
"user 3.5.5 (core)"
]
}

PASTE_VERSION_OUTPUT_HERE

Additional information

@revanth-svmx revanth-svmx added the investigating We're actively investigating this issue label May 17, 2024
Copy link

Hello @revanth-svmx 👋 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!

@github-actions github-actions bot added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels May 17, 2024
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.

@revanth-svmx
Copy link
Author

@salesforce/cli/2.41.8 darwin-x64 node-v20.12.2

@iowillhoit
Copy link
Contributor

Hello @revanth-svmx,

  • I need the full output of sf version --verbose --json (this will be multiple lines)
  • Can you also run your command with the --dev-debug flag and also provide the full output?
  • How many tests are you running? The error indicates that the returned string was too long. I found an internal ticket (W-14848875) that indicates that this should have been fixed in CLI version 2.35.6

@revanth-svmx
Copy link
Author

sarigarevanth@SREVANTH2ML ~ % sf version --verbose --json
{
"architecture": "darwin-x64",
"cliVersion": "@salesforce/cli/2.41.8",
"nodeVersion": "node-v20.12.2",
"osVersion": "Darwin 22.4.0",
"rootPath": "/usr/local/lib/sf",
"shell": "zsh",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.0.17 (core)",
"@oclif/plugin-commands 3.3.2 (core)",
"@oclif/plugin-help 6.0.21 (core)",
"@oclif/plugin-not-found 3.1.8 (core)",
"@oclif/plugin-plugins 5.0.19 (core)",
"@oclif/plugin-search 1.0.23 (core)",
"@oclif/plugin-update 4.2.11 (core)",
"@oclif/plugin-version 2.0.18 (core)",
"@oclif/plugin-warn-if-update-available 3.0.16 (core)",
"@oclif/plugin-which 3.1.9 (core)",
"@salesforce/cli 2.41.8 (core)",
"apex 3.1.11 (core)",
"auth 3.6.9 (core)",
"data 3.3.4 (core)",
"deploy-retrieve 3.6.13 (core)",
"info 3.2.7 (core)",
"limits 3.3.5 (core)",
"marketplace 1.2.5 (core)",
"org 4.1.8 (core)",
"packaging 2.4.2 (core)",
"schema 3.3.6 (core)",
"settings 2.2.6 (core)",
"sobject 1.4.1 (core)",
"source 3.3.9 (core)",
"telemetry 3.3.5 (core)",
"templates 56.2.5 (core)",
"trust 3.6.8 (core)",
"user 3.5.5 (core)"
]
}

@github-actions github-actions bot added validated Version information for this issue has been validated investigating We're actively investigating this issue and removed more information required Issue requires more information or a response from the customer labels May 18, 2024
@revanth-svmx
Copy link
Author

revanth-svmx commented May 18, 2024

Hello @revanth-svmx,

  • I need the full output of sf version --verbose --json (this will be multiple lines)
    sarigarevanth@SREVANTH2ML ~ % sf version --verbose --json
    {
    "architecture": "darwin-x64",
    "cliVersion": "@salesforce/cli/2.41.8",
    "nodeVersion": "node-v20.12.2",
    "osVersion": "Darwin 22.4.0",
    "rootPath": "/usr/local/lib/sf",
    "shell": "zsh",
    "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.17 (core)",
    "@oclif/plugin-commands 3.3.2 (core)",
    "@oclif/plugin-help 6.0.21 (core)",
    "@oclif/plugin-not-found 3.1.8 (core)",
    "@oclif/plugin-plugins 5.0.19 (core)",
    "@oclif/plugin-search 1.0.23 (core)",
    "@oclif/plugin-update 4.2.11 (core)",
    "@oclif/plugin-version 2.0.18 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.16 (core)",
    "@oclif/plugin-which 3.1.9 (core)",
    "@salesforce/cli 2.41.8 (core)",
    "apex 3.1.11 (core)",
    "auth 3.6.9 (core)",
    "data 3.3.4 (core)",
    "deploy-retrieve 3.6.13 (core)",
    "info 3.2.7 (core)",
    "limits 3.3.5 (core)",
    "marketplace 1.2.5 (core)",
    "org 4.1.8 (core)",
    "packaging 2.4.2 (core)",
    "schema 3.3.6 (core)",
    "settings 2.2.6 (core)",
    "sobject 1.4.1 (core)",
    "source 3.3.9 (core)",
    "telemetry 3.3.5 (core)",
    "templates 56.2.5 (core)",
    "trust 3.6.8 (core)",
    "user 3.5.5 (core)"
    ]
    }

[15:59:51.428] DEBUG (sf:connection): request
method: "GET"
url: "https://fun-ability-3956-dev-ed.scratch.my.salesforce.com/services/data/v60.0/tooling/query/0r8xx2yUm7hIPecAEG-10000"
headers: {
"content-type": "application/json",
"user-agent": "sfdx toolbelt:"
}
[16:00:20.765] DEBUG (sf:connection): request
method: "GET"
url: "https://fun-ability-3956-dev-ed.scratch.my.salesforce.com/services/data/v60.0/tooling/query/0r8xx2yUm7hIPecAEG-12000"
headers: {
"content-type": "application/json",
"user-agent": "sfdx toolbelt:"
}

  • How many tests are you running? The error indicates that the returned string was too long. I found an internal ticket (W-14848875) that indicates that this should have been fixed in CLI version 2.35.6

2934 classes

@iowillhoit
Copy link
Contributor

I am not seeing the RangeError: Invalid string length error in the debug logs. Is this happening intermittently on the same test-run-id?

Could you try running sf apex get test --test-run-id 707RL00000E6OMq -o test-kysllsvmthwu@example.com --code-coverage --result-format json? (difference is --result-format json vs just --json)

Typically when we see "too many tests" issues, we recommend running sf apex test run with either the --tests or --suite-names to reduce the number. You could then call get run on those results individually.

@iowillhoit
Copy link
Contributor

Apparently the fix I mentioned in my first comment, was intended for use with the -d, --output-dir=<value> flag. Try setting an output directory along with the --result-format json flag and see if that helps

@cristiand391 cristiand391 added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels May 30, 2024
Copy link

github-actions bot commented Jun 7, 2024

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

@github-actions github-actions bot added the stale label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information required Issue requires more information or a response from the customer stale validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

3 participants