Error when trying to add SonarQube Server connection MalformedJSONException

Please provide

  • Operating system: Windows 11
  • SonarQube for IntelliJ plugin version: SonarQube for IDE 11.2.0.82481
  • IntelliJ version: IntelliJ IDEA 2025.2 (Ultimate Edition), Build #IU-252.23892.409, built on August 1, 2025
  • Programming language you’re coding in: Java
  • Is connected mode used: SonarQube Server 9.9.2.77730
    • SonarQube Cloud, SonarQube Server, or SonarQube Community Build? (if one of the latter two, which version?):

And a thorough description of the problem / question:

When I go to Settings → Tools → SonarQube for IDE and select “Add a New Connection”

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

I read the issues at

Here is the output of https://sonarqube.example.com/sonar/api/system/status
{“id”:“6XXXXXXX-XXXXXXXXXXXXXXXX”,“version”:“9.9.2.77730”,“status”:“UP”}

Also of note:
I tried finding and disabling any proxies that I could in IntelliJ and Windows and I don’t appear to be using any.

Can you give me some more things to try? It might help to get a more complete error message/server response. I checked the intellij logs and didn’t see an error.

Hello @supersonic , thanks for reaching out!

As mentioned in the link you shared, this error usually happens when the HTTP client tries to parse as JSON a response that is not JSON such as an HTML page displaying an error.

What I could suggest:

  • Verify that your token is valid, if possible, try generating your token using the Create token button from the SQ:IDE connection wizard (it has to be a USER token)
  • Try validating your token: curl -u “YOUR_TOKEN:” “https://sonarqube.example.com/sonar/api/authentication/validate”
  • Does your SonarQube Server instance has a SSO page when you access it?
  • Make sure the IntelliJ proxy settings are set correctly
  • Perhaps try with https://sonarqube.example.com (without /sonar)
  • If you can try to track the request via WireShark, for example, that would be the best to investigate what happens

Let me know how it goes, I know you already tried some of these steps but I want to enforce some of them. Thanks!