Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS2019: Cannot connect SonarLint to SonarQube in 6.7.0.52071 #3219

Closed
pde-cds opened this issue Aug 25, 2022 · 4 comments
Closed

VS2019: Cannot connect SonarLint to SonarQube in 6.7.0.52071 #3219

pde-cds opened this issue Aug 25, 2022 · 4 comments

Comments

@pde-cds
Copy link

pde-cds commented Aug 25, 2022

With the latest version 6.7.0.52071 i cannot connect to SonarQube (8.9.9 LTS)
Output of SonarLint only shows "SonarQube request failed: Illegal characters in path."

Version 6.6.0.49766 of SonarLint works fine.

How can i resolve this issue with the latest version?

@pde-cds pde-cds changed the title Cannot conect SonarLint to SonarQube in 6.7.0.52071 Cannot connect SonarLint to SonarQube in 6.7.0.52071 Aug 25, 2022
@pde-cds pde-cds changed the title Cannot connect SonarLint to SonarQube in 6.7.0.52071 VS2019: Cannot connect SonarLint to SonarQube in 6.7.0.52071 Aug 25, 2022
@FeydCron
Copy link

FeydCron commented Aug 31, 2022

I have the same problem. First I thought it has something to do with my recently updated VS2019 to 16.11.18 but since I cannot say when the SonarLint extension update happened it could also be related to the new version of the SonarLint extension. The SonarQube I want to connect to is also Version 8.9.9 (build 56886)

Is there any way to roll back to the previous version of the SonarLint extension? It would also help to figure out whether the connect failure is related to the latest version.

@FeydCron
Copy link

FeydCron commented Aug 31, 2022

I have the same problem. First I thought it has something to do with my recently updated VS2019 to 16.11.18 but since I cannot say when the SonarLint extension update happened it could also be related to the new version of the SonarLint extension. The SonarQube I want to connect to is also Version 8.9.9 (build 56886)

Is there any way to roll back to the previous version of the SonarLint extension? It would also help to figure out whether the connect failure is related to the latest version.

Yes, it definitely is an issue with version 6.7.0.52071 of the SonarLint extension. My workaround was now:

  1. Uninstall the SonarLint extension from VS2019
  2. Download version 6.6 of the SonarLint extension (as vsix file) from the related GitHub site: https://github.com/SonarSource/sonarlint-visualstudio/releases/tag/v6.6.0.49766
  3. Turn off automatic update of extensions under Tools | Options | Environment | Extensions and Updates
  4. Install version 6.6 of the vsix file

If you don't perform step 3 then the extension is updated faster than you can turn of automatic update of the SonarLint extension.

@pde-cds
Copy link
Author

pde-cds commented Aug 31, 2022

I narrowed the issue down to SonarLint.VisualStudio.IssueVisualization.Editor.LanguageDetection.SonarLanguageRecognizer.GetNormalizedExtension(string fileName)
image

Stacktrace

SonarLint.VisualStudio.Infrastructure.VS.dll!SonarLint.VisualStudio.IssueVisualization.Editor.LanguageDetection.SonarLanguageRecognizer.GetNormalizedExtention(string fileName) Line 147
at D:\git\sonarlint-visualstudio\src\Infrastructure.VS\LanguageDetection\SonarLanguageRecognizer.cs(147)
SonarLint.VisualStudio.Infrastructure.VS.dll!SonarLint.VisualStudio.IssueVisualization.Editor.LanguageDetection.SonarLanguageRecognizer.GetAnalysisLanguageFromExtension(string fileName) Line 125
at D:\git\sonarlint-visualstudio\src\Infrastructure.VS\LanguageDetection\SonarLanguageRecognizer.cs(125)
SonarLint.VisualStudio.Integration.dll!SonarLint.VisualStudio.Integration.Binding.JsTsProjectTypeIndicator.IsFileJsTs(string fileName) Line 83
at D:\git\sonarlint-visualstudio\src\Integration\Binding\JsTsProjectTypeIndicator.cs(83)
SonarLint.VisualStudio.Integration.dll!SonarLint.VisualStudio.Integration.Binding.JsTsProjectTypeIndicator.HasJsTsFileInProject(EnvDTE.ProjectItems projectItems) Line 92
at D:\git\sonarlint-visualstudio\src\Integration\Binding\JsTsProjectTypeIndicator.cs(92)
SonarLint.VisualStudio.Integration.dll!SonarLint.VisualStudio.Integration.Binding.JsTsProjectTypeIndicator.IsJsTs(EnvDTE.Project dteProject) Line 68
at D:\git\sonarlint-visualstudio\src\Integration\Binding\JsTsProjectTypeIndicator.cs(68)
SonarLint.VisualStudio.Integration.dll!SonarLint.VisualStudio.Integration.ProjectToLanguageMapper.GetLanguagesInProject(EnvDTE.Project dteProject) Line 107
at D:\git\sonarlint-visualstudio\src\Integration\ProjectToLanguageMapper.cs(107)
SonarLint.VisualStudio.Integration.dll!SonarLint.VisualStudio.Integration.ProjectToLanguageMapper.GetAllBindingLanguagesForProject(EnvDTE.Project dteProject) Line 83
at D:\git\sonarlint-visualstudio\src\Integration\ProjectToLanguageMapper.cs(83)
SonarLint.VisualStudio.Integration.dll!SonarLint.VisualStudio.Integration.ProjectToLanguageMapper.HasSupportedLanguage(EnvDTE.Project project) Line 123
at D:\git\sonarlint-visualstudio\src\Integration\ProjectToLanguageMapper.cs(123)
SonarLint.VisualStudio.Integration.dll!SonarLint.VisualStudio.Integration.ProjectSystemHelper.GetSolutionProjects() Line 92
at D:\git\sonarlint-visualstudio\src\Integration\LocalServices\ProjectSystemHelper.cs(92)

The Project has a reference to a shared project which is called "APActivator".
Because i got no further infos on ProjectItems.Name than those of MSDN i can't propose a fix to this issue. But this might be enough infos to get a dev of this repo envolved.

@duncanp-sonar
Copy link
Contributor

@pde-cds thanks for the report and for the investigation.

We're in the process of releasing v6.8, so it won't be fixed in that release. However, I've added this ticket to the next hardening release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants