- latest IntelliJ IDEA
- latest plugin version
- SQ instance (i.e. corporate network), non-cloud
- no proxy
Upon configuring the connection I see the following error dialog regardless of whether I choose token authentication or user/pw.
The server URL has the pattern https://sonar.company.com. It is “correct” as in I can navigate to it in the browser.
The IntelliJ logs contain no entries coming from this plugin.
I am also looking into this with the server admins. The main issue IMO here is the lack of (debugging) information.
May I ask you to open the SonarLint log tab, enable verbose logs, and retry. Please share with use the output.
Oh, great, that’s what I had been looking for. It was my first encounter with this plugin and I didn’t realize I could get those logs there, sorry.
Here’s my (redacted) log:
Connection test failed
java.lang.IllegalStateException: Unable to parse server infos from: <!DOCTYPE html>
<meta charset="UTF-8" />
<meta name="viewport" ...
Caused by: org.sonarsource.sonarlint.shaded.com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
This is the confirmation that some system in between my notebook and the SonarQube server intercepts the request and responds with some HTML. I now have a pretty good idea what this is. I suspected the plugin to call
https://sonar.company.com/web_api and tested with cURL as well.