microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.15k stars 28.53k forks source link

"Checking for quick fixes..." never solves on screen but response is on server #214771

Closed DougMidgley closed 2 weeks ago

DougMidgley commented 2 months ago

Does this issue occur when all extensions are disabled?: Yes/No

Steps to Reproduce:

  1. Install eslint plugin
  2. Setup eslint config
  3. Create .js file with autofix available
  4. Save file
  5. Issue shows up in issues bar below
  6. Hover over issue, and "Checking for quick fixes..." never resolves.
  7. Review log on service is following
[Trace - 11:50:50 AM] Sending request 'textDocument/codeAction - (52)'.
Params: {
    "textDocument": {
        "uri": "file:///c%3A/Users/USER/workspace/REPO/common/app/lwc/component/component.js"
    },
    "range": {
        "start": {
            "line": 657,
            "character": 8
        },
        "end": {
            "line": 657,
            "character": 69
        }
    },
    "context": {
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 657,
                        "character": 8
                    },
                    "end": {
                        "line": 657,
                        "character": 69
                    }
                },
                "message": "Invalid reassignment of public property \"records\"",
                "code": "@lwc/lwc/no-api-reassignments",
                "codeDescription": {
                    "href": "https://github.com/salesforce/eslint-plugin-lwc/blob/v1.8.1/docs/rules/no-api-reassignments.md"
                },
                "severity": 1,
                "source": "eslint"
            }
        ],
        "only": [
            "quickfix"
        ],
        "triggerKind": 1
    }
}

[Trace - 11:50:50 AM] Received response 'textDocument/codeAction - (52)' in 1ms.
Result: [
    {
        "title": "Disable @lwc/lwc/no-api-reassignments for this line",
        "command": {
            "title": "Disable @lwc/lwc/no-api-reassignments for this line",
            "command": "eslint.applyDisableLine",
            "arguments": [
                {
                    "uri": "file:///c%3A/Users/USER/workspace/REPO/common/app/lwc/component/component.js",
                    "version": 6,
                    "ruleId": "@lwc/lwc/no-api-reassignments"
                }
            ]
        },
        "kind": "quickfix"
    },
    {
        "title": "Disable @lwc/lwc/no-api-reassignments for the entire file",
        "command": {
            "title": "Disable @lwc/lwc/no-api-reassignments for the entire file",
            "command": "eslint.applyDisableFile",
            "arguments": [
                {
                    "uri": "file:///c%3A/Users/USER/workspace/REPO/common/app/lwc/component/component.js",
                    "version": 6,
                    "ruleId": "@lwc/lwc/no-api-reassignments"
                }
            ]
        },
        "kind": "quickfix"
    },
    {
        "title": "Show documentation for @lwc/lwc/no-api-reassignments",
        "command": {
            "title": "Show documentation for @lwc/lwc/no-api-reassignments",
            "command": "eslint.openRuleDoc",
            "arguments": [
                {
                    "uri": "file:///c%3A/Users/USER/workspace/REPO/common/app/lwc/component/component.js",
                    "version": 6,
                    "ruleId": "@lwc/lwc/no-api-reassignments"
                }
            ]
        },
        "kind": "quickfix"
    }
]

settings.json

{
  "search.exclude": {
    "**/node_modules": true,
    "**/bower_components": true,
    "**/.sfdx": true
  },
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "salesforcedx-vscode-core.show-cli-success-msg": false,
  "editor.bracketPairColorization.enabled": true,
  "editor.guides.bracketPairs": true,
  "files.eol": "\n",
  "editor.formatOnSave": true,
  "[xml]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[visualforce]": {
    "editor.defaultFormatter": "salesforce.salesforcedx-vscode-visualforce"
  },
  "apexPMD.enableCache": true,
  "apexPMD.priorityErrorThreshold": 3,
  "apexPMD.priorityWarnThreshold": 5,
  "apexPMD.runOnFileChange": true,
  "files.exclude": {
    "**/.git": false
  },
  "xml.validation.schema.enabled": "onValidSchema",
  "eslint.useESLintClass": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "always" 
  }
}
VSCodeTriageBot commented 2 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.90.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

DougMidgley commented 2 months ago

Updated and same result

justschen commented 2 months ago

cc. @dbaeumer seems like eslint is taking a lot of time here. do you have any insight on this?

dbaeumer commented 2 months ago

@DougMidgley correct me if I am wrong but what you are seeing is that the server delivered the response (in the trace above in 1ms) but the UI never resolves.

DougMidgley commented 2 months ago

@dbaeumer exactly :)

dbaeumer commented 2 months ago

@justschen the ESLint server delivered the result in 1ms :-)

DougMidgley commented 1 month ago

No updates? still happening unfortunately :(

justschen commented 1 month ago

@DougMidgley has updating to our latest Insiders and eslint extensions changed anything?

DougMidgley commented 3 weeks ago

Hey,

Updates came in but still not working - I could also replicate this on other projects, can anyone else?

VSCODE Version: 1.92.1 (system setup) Commit: eaa41d57266683296de7d118f574d0c2652e1fc4 Date: 2024-08-07T20:16:39.455Z Electron: 30.1.2 ElectronBuildId: 9870757 Chromium: 124.0.6367.243 Node.js: 20.14.0 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.22621

ESLINT Name: ESLint Id: dbaeumer.vscode-eslint Description: Integrates ESLint JavaScript into VS Code. Version: 3.0.10 Publisher: Microsoft VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint

dbaeumer commented 3 weeks ago

@DougMidgley can you provide us with a GitHub repository we can clone with a minimal setup that reproduce this. It is very hard to say what is going on without a repro case.

DougMidgley commented 3 weeks ago

Hey @dbaeumer - sure thing https://github.com/DougMidgley/214771-checking-for-quick-fixes is not working, as per the above error. Using only most basic setup.

dbaeumer commented 3 weeks ago

@DougMidgley actually, doesn't reproduce for me:

cast

Any additional steps, setup instructions?

DougMidgley commented 2 weeks ago

Tried full clean install and seems resolved. There was really nothing obvious causing it and uninstalling both extension and vscode app alone didnt work, only full clean reinstall. https://code.visualstudio.com/docs/setup/uninstall covers the clean uninstall process. Thanks for support in this one :)