# SonarLint with Visual Studio 2019 Fails to Connect

**URL:** <https://community.sonarsource.com/t/sonarlint-with-visual-studio-2019-fails-to-connect/24815>\
**Category:** Visual Studio\
**Tags:** visualstudio, connected\_mode, sonarqube, sonarqube-ide\
**Created:** [May 18, 2020, 12:03pm UTC](https://community.sonarsource.com/t/sonarlint-with-visual-studio-2019-fails-to-connect/24815 "2020-05-18T12:03:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Will](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@Will](https://community.sonarsource.com/u/Will)\
**Post date:** [May 18, 2020, 12:03pm UTC](https://community.sonarsource.com/t/sonarlint-with-visual-studio-2019-fails-to-connect/24815/1 "2020-05-18T12:03:13Z")

</div>

Hello,

Attempting to connect from Visual Studio 2019 with SonarLint to our SonarQube 8.2 instance produces the following.

```
Connecting to SonarQube server: https://<removed>/
Connecting to SonarQube server: Validating credentials
Connecting to 'https://<removed>/'.
SonarQube request failed: Input string was not in a correct format. 
Connecting to SonarQube server: Failed
Disconnecting...

```

Have tried with both token and credentials and against two servers but the response is the same. The servers use ldap connections in the background.

With thanks for any help you can offer.

Will

---

<div class="post-metadata">

**Author:** ![rita.g](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rita.g/32/7273_2.png) [@rita.g](https://community.sonarsource.com/u/rita.g)\
**Post date:** [May 19, 2020, 10:17am UTC](https://community.sonarsource.com/t/sonarlint-with-visual-studio-2019-fails-to-connect/24815/2 "2020-05-19T10:17:02Z")

</div>

Hi @Will, thanks for reporting this issue to us.

May I ask what is your SonarLint version?

Based on the logs that you provided, it’s possible that we are unable to fetch the version of the SonarQube server.  
Can you please help us check this, by making a GET request to `https://<removed>/api/server/version`, along with `Authorization` header set to Basic Authentication?  
Please post the response that you get.

---

<div class="post-metadata">

**Author:** ![Will](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@Will](https://community.sonarsource.com/u/Will)\
**Post date:** [May 19, 2020, 10:23pm UTC](https://community.sonarsource.com/t/sonarlint-with-visual-studio-2019-fails-to-connect/24815/3 "2020-05-19T22:23:27Z")

</div>

Hi Rita,

Thanks for the response.

It was the latest version of sonarlint installed from the sonarlint website yesterday

Because we build from source, the version is the snapshot. Parsing of the version was the cause as you suspected - removing this extra string and rebuilding successfully resolves this.

8.2-SNAPSHOT

It does not occur with the released version from the website.

Thanks

Will

---

<div class="post-metadata">

**Author:** ![rita.g](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rita.g/32/7273_2.png) [@rita.g](https://community.sonarsource.com/u/rita.g)\
**Post date:** [May 20, 2020, 8:22am UTC](https://community.sonarsource.com/t/sonarlint-with-visual-studio-2019-fails-to-connect/24815/4 "2020-05-20T08:22:17Z")

</div>

Great, I’m glad it works now 🙂

---

<div class="post-metadata">

**Author:** ![duncanp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/duncanp/32/293_2.png) [@duncanp](https://community.sonarsource.com/u/duncanp)\
**Post date:** [May 29, 2020, 5:34pm UTC](https://community.sonarsource.com/t/sonarlint-with-visual-studio-2019-fails-to-connect/24815/5 "2020-05-29T17:34:19Z")

</div>


