Client Certificate not working since 8.5.0.75082

  • Operating system: Xubuntu 22.04
  • SonarLint plugin version: 8.5.0.75082 - 10.4.2.78113
  • Programming language you’re coding in: Not relevant
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version): SonarQube Enterprise Edition Version 10.4.1 (build 88267)

And a thorough description of the problem / question:

Trying to add our SonarQube instance (which requires a client certificate) to IntelliJ gives the following error:

Failed to connect to the server. Please check the configuration. Cause: org.sonarsource.sonarlint.shaded.com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 2 column 2 path $

The last version that worked was 8.4.0.73538. I found this out by trying older versions until I found one that worked.

This is the content of my idea64.vmoptions:

-Xmx3966m
-Dsonarlint.ssl.trustStorePassword=xxxx
-Dsonarlint.ssl.keyStore=/home/xxxx/key.p12
-Dsonarlint.ssl.keyStorePassword=xxxx
-Dsonarlint.ssl.keyStoreType=pkcs12
-Djavax.net.ssl.trustStorePassword=xxxx
-Djavax.net.ssl.keyStore=/home/xxxx/key.p12
-Djavax.net.ssl.keyStorePassword=xxxx
-Djavax.net.ssl.keyStoreType=pkcs12

Hi @fvclaus,

Failed to connect to the server. Please check the configuration. Cause: org.sonarsource.sonarlint.shaded.com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 2 column 2 path $

This error typically happens when the HTTP client tries to parse as JSON a response that is definitely not JSON - usually, it’s a HTML page with the proxy authentication error.

We have this documentation for anything related to SSL.

The issue I see is that you defined

-Dsonarlint.ssl.keyStore=/home/xxxx/key.p12

instead of

-Dsonarlint.ssl.keyStorePath=/home/xxxx/key.p12

Could you please make the necessary changes and try again?

Thanks

Hi Nicolas,

that worked. Thanks for your support.

1 Like