Unable to connect SonarLint to SonarQube on VS Code

2.2k views Asked by At

I’m trying to connect my SonarLint Plugin with my SonarQube Server, but when i try to update bindings, this error appear in the SonarLint Output:

Failed to read file: /home/valentina/.sonarlint/storage/38364531464134442d41594f79334277794d7331626178675137786850/projects/486f7473706f74/project_branches.pb
...
Caused by: org.sonarsource.sonarlint.core.serverconnection.storage.StorageException: Failed to read file: /home/valentina/.sonarlint/storage/38364531464134442d41594f79334277794d7331626178675137786850/projects/486f7473706f74/project_branches.pb
...

Caused by: java.nio.file.NoSuchFileException: /home/valentina/.sonarlint/storage/38364531464134442d41594f79334277794d7331626178675137786850/projects/486f7473706f74/project_branches.pb

...

Settings file of SonarLint is the following:

{
    "sonarlint.connectedMode.connections.sonarqube": [
        {
            "serverUrl": "http://localhost:9000",
            "connectionId": "86E1FA4D-AYOy3BwyMs1baxgQ7xhP",
            "token": "squ_5e74e1ff17a56c1ae026df4663503bd1369f9966"
        }
    ],
    "sonarlint.connectedMode.project": {
    "connectionId": "86E1FA4D-AYOy3BwyMs1baxgQ7xhP",
    "projectKey": "Hotspot"
    }
}
1

There are 1 answers

0
Wirat Leenavonganan On

Edit SonarQube Connection in VSCode. Restart VS Code and then using VSCode Command Palette - SonarLint: Update all project binding to SonarQube.