Sonarlint connection to SonarQube via VSCODE No storage for connection MalformedJsonException


-I am trying to connect sonarlint on VS code to my sonarqube server.
When I run the ‘Update all project bindings’ I get the following errors:

[Error - 11:53:09.669] Error updating the local storage of the connection with id '<default>'
[Error - 11:53:09.673] Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $
    at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.tryParseAsJsonError(
    at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.handleError(
    at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.lambda$getAsync$0(
    at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(
    at java.base/java.util.concurrent.CompletableFuture.postComplete(
    at java.base/java.util.concurrent.CompletableFuture.complete(
    at org.apache.hc.core5.concurrent.BasicFuture.completed(
    at org.apache.hc.core5.concurrent.ComplexFuture.completed(
    at org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient$1$3$1.completed(
    at org.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityConsumer.completed(
    at org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer.streamEnd(
    at org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec$1.streamEnd(
    at org.apache.hc.core5.http.impl.nio.ClientHttp1StreamHandler.dataEnd(
    at org.apache.hc.core5.http.impl.nio.ClientHttp1StreamDuplexer.dataEnd(
    at org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onInput(
    at org.apache.hc.core5.http.impl.nio.AbstractHttp1IOEventHandler.inputReady(
    at org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler.inputReady(
    at org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(
    at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(
    at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(
    at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(
    at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(
    at java.base/

-I am using VSCode version 1.62.3 and SonarLint version 3.1.0
The project is Apex language based so establishing the connection to the server is a necessity.

-I already added

                  "serverUrl": "http://sonarqube.mut....",
                  "token": "59382a2d82..."

to user settings

       "projectKey": "CLI-al..."

to my project workspace.

I also added the sonar server certificate to my local java cacerts.

I also get the following response :
When I access myserver/api/system/status on the web.

Any suggestion?

Hello, welcome to the community! And thanks for your question.

Are you using a proxy to reach your SonarQube server?

We got similar reports in the past, where the HTTP client used to initialize connected mode tries to parse as JSON a response that is definitely not JSON - usually, it’s a HTML page with the proxy authentication error.

It can also happen if the SonarQube server is unreachable (e.g during a system update) and behind a reverse proxy: the reverse proxy answers with a 503 that is usually not in JSON.

Also, I notice that your server URL is in plain HTTP; since you mention that you added the “sonar server certificate” to your Java trusted certificates, I assume that this should be HTTPS?

Hello and thank you for your fast response !

Indeed, we are using a proxy server but the problem was solved after I replaced the http with https (my bad).

Thanks again for your help and have a sonarful day :slight_smile:


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