forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
953 stars 406 forks source link

Code coverage highlighting no longer displaying and returns error message on Apex v60.8.0 #5534

Closed zfrench closed 5 months ago

zfrench commented 5 months ago

Summary

Code coverage highlighting no longer displays and a pop error occurs

Steps To Reproduce:

  1. Enable 'Highlight Apex Code Coverage'
  2. Select a unit test to run from a test class
  3. Click on the on class that you ran the code coverage for and an error message will be displayed.

Expected result

Expected the code highlighting to display green or red lines depending on the code that ran.

Actual result

No code highlighting occurred and error message was displayed.

Additional information

Error Message: Expected double-quoted property name in JSON at position 30195 (line 1 column 30196)

image

If I downgrade the extension from 60.8.0 to 60.7.0 then it will display the highlighted coverage correctly.

Salesforce Extension Version in VS Code: Apex v60.8.0

SFDX CLI Version: 2.36.8

OS and version: Windows 10 Enterprise

VS Code version: 1.88.0

diyer commented 5 months ago

Thank you for reporting this issue @zfrench ! Our team is aware of this and is working on a fix. Please stay tuned and apologies for the inconvenience 🙏

alan-liu-ofx commented 5 months ago

Same for me. image @salesforce/cli/2.36.8 win32-x64 node-v20.11.1 VS Code 1.88.1 Win 10 22H2

maximojoinansel commented 5 months ago

Hi there! I am still getting this issue. I saw there is a work to fix it in progress but in the meantime Is there any workaround available to make this work? I really appreciate any help you can provide.

peternhale commented 5 months ago

@maximojoinansel the only workaround would be to downgrade extensions to v60.7.0.

The work is in progress and we hope to have the fix out in our release next week.

jh480 commented 5 months ago

Hi there! I am still getting this issue. I saw there is a work to fix it in progress but in the meantime Is there any workaround available to make this work? I really appreciate any help you can provide.

You can still get the first few uncovered lines from the Output section under "Apex Code Coverage by Class".

Or you install the earlier version of the Apex extension mentioned in OP.

maximojoinansel commented 5 months ago

@peternhale downgrading the extensions to v60.7.0. works! Thanks for your help here.

AhmedElAmory commented 5 months ago

I thought I was the only one, thanks for reporting this. I'm waiting for the fix.

EDIT: Make sure you downgrade the Apex Extension itself not the Extension Pack. Downgrading the Extension pack did not work for me.

rvanaken commented 5 months ago

I had trouble getting the test status indicators to show up after updating to v60.8.0.

The indicators always showed blue regardless of the test result for each test: image It may be related to this JSON parsing error:

SyntaxError: Expected double-quoted property name in JSON at position 12030

I downgraded to v60.7.0 and it started working correctly.

Here is what it should look like: (after downgrading) image

I wasn't sure if you guys wanted a new issue logged, but can do.

petehale commented 5 months ago

The issue with parsing result is probably the cause of the test indicators showing blue. The fix for the parsing issue should be in next week's release.

daphne-sfdc commented 5 months ago

Hello everyone, this issue has been resolved and the fix is included in this week's release v60.10.0. Please upgrade your extensions to the latest version for the best user experience. Thank you for your patience.