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

Problems tab does not refresh when issues are addressed #2608

Closed
robcowell opened this issue Oct 8, 2020 · 23 comments
Closed

Problems tab does not refresh when issues are addressed #2608

robcowell opened this issue Oct 8, 2020 · 23 comments

Comments

@robcowell
Copy link

Summary

Problems tab in VS code reports issues that have since been addressed and only restarting VS Code clears them down

Steps To Reproduce:

  1. Create some Apex code with issues ¯_(ツ)_/¯
  2. Fix the issues
  3. Save the code

Expected result

Problems list should clear down.

Actual result

Problems list persists with those issues, file remains highlighted in sidebar (red in my theme).

Additional information

See screenshot.

VS Code Version: 1.49.3

SFDX CLI Version: 7.75.0-5521f40d11 Win32-x64 node-v12.18.3

OS and version: Windows Server 2012 R2 Standard (but also seen on my local machine Win10 Pro)
image

@BrettMN
Copy link
Contributor

BrettMN commented Oct 8, 2020

I have the same... Problems

VS Code Version: 1.50.0-insider

SFDX CLI Version: sfdx-cli/7.75.0 darwin-x64 node-v12.18.4

OS and version: MacOS Catalina 10.15.7

@RPDevJesco
Copy link

During those situations, reloading VS Code should fix the issue. Has something to do with the VSCode cache.

@BrettMN
Copy link
Contributor

BrettMN commented Oct 8, 2020

That workaround would mean restarting VS Code ever couple of minutes.

I'd end up spending more time waiting for things to save, not refresh the problems and re-opening VSCode than doing work.

This is only happening in an SFDX Project for me as well. Other projects, where the SFDX plugins are disabled, do not have this issue.

@lcampos
Copy link
Contributor

lcampos commented Oct 9, 2020

Hi thanks for opening this issue. Can you confirm if these lines in the Problems tab are a result of a failed deploy (specific to Apex code) ? If they are then this is working as designed since the list of errors is kept around until the next time a deploy happens. That is because it's currently not possible to evaluate if the error was actually fixed without re-deploying.

@robcowell
Copy link
Author

robcowell commented Oct 9, 2020 via email

@KoninosV2
Copy link

For me, the procedure to recreate the problem is:

  1. Write code with problems (that don't get picked up on save but on deploy e.g. wrong sobject name).
  2. Save the file
  3. Try to deploy the file (and fail)
    3.1. Now the problems get the red underline and shown in the Problems tab.
  4. Fix the problems.
  5. Save the file.

This way I can reproduce the bug every time. Enabling/Disabling the experimental Retrieve-Deploy doesn't impact this.
The problems stick around even after a successful deploy, resulting in them adding up and making the file filled with red lines and underlining.

@pogilvieCB
Copy link

I have the same problem when executing anonymous apex. Could we have a switch to turn off problem highlighting until this is fixed? I'm kind of OCD so it's making vscode almost unusable.

@lcampos
Copy link
Contributor

lcampos commented Oct 29, 2020

Closing this since the fix was released in version 50.3.0 of the Salesforce extensions for VSCode. Thanks for providing feedback.

@AndrewStopchenko-SO
Copy link

AndrewStopchenko-SO commented Jun 7, 2023

Hi, I am experiencing this same issue again.

Steps To Reproduce:

  1. Create new Project With Manifest (Empty template), create a scratch org.
  2. Create Test1 Apex class with code below and try pushing the source to default org:
    Result - push fails, "Illegal assignment from String to Decimal" problem gets added to the "Problems" panel.
public with sharing class Test1 {
    public static void foo() {
        Decimal i = '42';
        System.debug('i = ' + i);
    }
}
  1. Run "SFDX: Push Source to Default Org" command several more times.
    Result - the problem gets added to the "Problems" panel multiple times:
    image

  2. Update the Test1 class to fix the problematic assignment as Decimal i = 42;, and push the source to default org again:
    Result - push succeeds, but the problems from 3 Result are not removed from the "Problems" panel.
    image

Workarounds?

Additional information

VSCode version: 1.78.2
OS: Windows_NT x64 10.0.19044
Salesforce Extension Pack extension version: 58.0.1

SFDX CLI details:

sfdx-cli/7.203.6 win32-x64 node-v18.15.0
@oclif/plugin-autocomplete 2.2.0 (core)
@oclif/plugin-commands 2.2.15 (core)
@oclif/plugin-help 5.2.9 (core)
@oclif/plugin-not-found 2.3.23 (core)
@oclif/plugin-plugins 3.1.0 (core)
@oclif/plugin-search 0.0.17 (core)
@oclif/plugin-update 3.1.15 (core)
@oclif/plugin-version 1.3.4 (core)
@oclif/plugin-warn-if-update-available 2.0.37 (core)
@oclif/plugin-which 2.2.21 (core)
@salesforce/sfdx-scanner 3.12.0 (latest-pilot)
apex 2.2.21 (core)
auth 2.7.16 (core)
community 2.2.12 (core)
custom-metadata 2.1.22 (core)
data 2.3.19 (core)
deploy-retrieve 1.10.1 (core)
info 2.6.14 (core)
limits 2.3.17 (core)
org 2.9.1 (core)
packaging 1.17.1 (core)
schema 2.3.10 (core)
settings 1.4.9 (core)
sfdx-cli 7.203.6 (core)
signups 1.4.19 (core)
sobject 0.1.22 (0.1.8)
source 2.10.10 (core)
telemetry 2.2.0 (core)
templates 55.4.17 (core)
trust 2.4.19 (core)
user 2.3.14 (core)

@vnehess
Copy link

vnehess commented Jun 8, 2023

I am observing this issue again, today. as described above by AndrewStopchenko-SO

@lockholster
Copy link

Thanks @AndrewStopchenko-SO, I'd say you're correct here in your update:

reverting Salesforce CLI Integration extension to v57.15.0 solved the problem for me. Guess: this might be related to/caused by #4853.

I've been experiencing the same issue, and reverting the CLI integration to 57.15 worked for me too.

@simonhyphen8
Copy link

I am seeing this issue today as reported by @AndrewStopchenko-SO
Can someone confirm if the only solution is to revert the CLI integration to 57.15? Or is there a fix due? Thanks.

@kkoellner
Copy link

Also having the issue today. Totally pain as you can click on a Problem in the Problem pain to jump to the line of code but not in the Output pain. But, I'm having to wade through things I fixed an hour ago.

@ccalvomartinez
Copy link

@AndrewStopchenko-SO

This worked for me:

UPDATE: reverting Salesforce CLI Integration extension to v57.15.0 solved the problem for me. Guess: this might be related to/caused by #4853.

Thank you very much for the solution. This issue was driving me crazy.

@ram4ufriends
Copy link

Happening again. Not sure why this is getting repeated after every few releases..

@willvoyle
Copy link

Also, getting the same issue. Very inefficient, restarting VS code every time.

@simonhyphen8
Copy link

@ram4ufriends @willvoyle
Downgrading the CLI Plugin to V57.15 did work for me, but downgrading to an earlier version of the plugin doesn't seem like the best fix. Hopefully this will be fixed and we can use the most recent version of the CLI plugin.

@willvoyle
Copy link

willvoyle commented Jun 13, 2023

@simonhyphen8 It also worked for me, the exact name of the extension is "Salesforce CLI Integration". Steps are below:

  1. Open VS Code
  2. Extensions Tab
  3. Search for 'Salesforce CLI Integration'
  4. Click down arrow next to 'Uninstall'
  5. Click 'Install Another Version...'
  6. Select '57.15'
  7. Reload VS Code

@theperiscope
Copy link

@simonhyphen8 Happens for me as well with latest 58.2.0 extension packversion. The workaround for this issue worked.

@genpact-dev-kuldeep
Copy link

Ideally it should not break in latest release. Can someone fix this. This is a MAJOR BUG and it is hampering development directly. It is perfect in V 57.15 and i am working in lower version. Any one having update to current version - 58.3.1? as of today.

@lucas7005
Copy link

I have updated to v58.3.1 and this issue is still happening.

@AndrewStopchenko-SO
Copy link

It doesn't look like this closed issue is reviewed by the project's team.

There was a new issue #4904 tracked for similar problem - so, we should probably keep an eye on that open issue instead.

@GerbenRampaart
Copy link

This is such a long running problem, that version after version still exists.

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

No branches or pull requests