Add sonarqube connection is not working in vs code

Please provide

  • Operating system:
    windows 10
  • SonarLint plugin version:
  • Programming language you’re coding in:
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version):
      I am trying to add new sonar qube connection from vs code, it is not opening, due to that i am not able to add new connections from vscode

And a thorough description of the problem / question:

Hello @anand_mohan_reddy, and welcome to Sonar Community! :sonar: :wave:

Unfortunately, I am not able to reproduce this behavior. Could you please provide more details on the steps that you are taking and what exactly do you observe? And, if the issue persists, please provide us with logs from SonarLint output.

All the best,
Sophio :sonarlint:

I’m also having the same issue.

Version: sonarsource.sonarlint-vscode-3.19.0-darwin-arm64/jre/17.0.7-macosx-aarch64.tar/bin/java
OS: Mac OS

[Error - 21:41:15.188] Failed to get project list
[Error - 21:41:15.188] java.lang.IllegalStateException: Unable to parse WS response: Protocol message contained an invalid tag (zero).
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.processTimed(
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.consumeTimed(
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.getPaginated(
	at org.sonarsource.sonarlint.core.serverapi.component.ComponentApi.getAllProjects(
	at org.sonarsource.sonarlint.core.serverconnection.ServerConnection.downloadAllProjects(
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$downloadAllProjects$12(
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.wrapErrors(
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.downloadAllProjects(
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(
	at java.base/java.util.concurrent.Executors$ Source)
	at java.base/ Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)
	at java.base/ Source)

Hello Ivan,

Thank you for the logs. This looks strange but I cannot reproduce it. Which version of SonarQube are you using?


10.1 and 10.0 have the same behavior.

Hi Ivan, please also kindly specify which SonarQube edition you use? I want to try reproducing the behavior you describe.


Developer Edition

1 Like

Unfortunately, I cannot reproduce this with SonarQube Version 10.1 (build 73491) and SonarLint for VSCode v3.19. If it helps, as a workaround, you can create binding by editing your /project/.vscode/settings.json file as in the example below, specifying the connectionId and projectKey.

All the best,

@pragmaticivan did you happen to recently update your SonarQube version? If so, from which version did you upgrade once you started seeing this error? Also, would it be possible for you to provide logs from SonarQube when you try to create binding?

Thank you,

1 Like

Hi, I figured out the problem.

Both SonarQube Github Actions and SonarLint don’t work well when an ingress proxy has compression enabled.

We had Traefik in front of SonarQube and it was not able to work well with that enabled.

I disabled compression just for SQ and it all started working again.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.