I just updated my SonarQube for IDE VS Code extension from v6.0.1 to 6.1.0. Now, the extension fails to launch. Of course, I tried restarting my IDE, but I get the same error every time. Attaching the logs.
I also need to mention that this happens for only one project on my machine (the one I had open when I upgraded the extension). It seems the new Sonar extension is working fine for my other projects.
The issue points to a compatibility issue in the H2 database library updated in 6.1.0: it can fail to read some local database data created by the previous version, preventing the extension from starting.
If downgrading to the previous version doesn’t fix the issue, we recommend deleting the H2 database that SonarQube for IDE uses.
For Windows, the DB file is:
%USERPROFILE%.sonarlint\storage\h2\sq-ide.mv.db
On Linux/macOS:
~/.sonarlint/storage/h2/sq-ide.mv.db
We recommend saving a backup:
Close all IDE instances using this storage.
Rename the h2 folder to h2-backup.
Restart VS Code; the extension should create a fresh database.
This should bypass the incompatible stored pages, which are preventing SonarQube for IDE from starting.
Local issue resolutions and comments will no longer be available in the fresh database, the rest of the data will be fetched again on the next synchronization (every hour, or on manual actions); keeping the backup preserves the original data for investigation or possible recovery.
I posted some incorrect findings in this comment that I have since deleted. The file I shared also includes logs from before the extension upgrade (.vscode\extensions\sonarsource.sonarlint-vscode-6.0.1-win32-x64), which had me confused.
It was indeed a corrupted sq-ide.mv.db file. It didn’t even open in notepad. I proceeded with deleting the database because I did not want to get stuck on an older plugin version.
Thank you for confirming. We are working on a bug fix release that rolls back the H2 version to prevent this issue going forward. Please note that this update will not repair existing corruption, so affected users will still need to perform a manual clean-up.
For context, the issue appears to be related to this PR on the H2 repository.
To close the loop, we just released a bug fix version that reverts the H2 version bump that caused this DB corruption. The issue should not occur anymore, but for those who faced it, you will still need to delete the local DB of SonarQube for IDE. As mentioned above, it does not contain any critical or sensitive information, and it can be safely removed.