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

Error binding solution when checking if a project contains JS/TS files #3305

Closed
duncanp-sonar opened this issue Nov 11, 2022 · 0 comments
Closed

Comments

@duncanp-sonar
Copy link
Contributor

duncanp-sonar commented Nov 11, 2022

Description

A null-ref exception occurs during binding, preventing the binding operation from succeeding.

Source: this community forum thread.

Error logs

Note: these error logs were produced using a special build of SLVS, with the kind assistance of the user who reported the issue.

Log 1

SonarLint.VisualStudio.Integration.ErrorListInfoBarController: Unexpected error: System.NullReferenceException: Object reference not set to an instance of an object.
   at SonarLint.VisualStudio.Integration.Binding.JsTsProjectTypeIndicator.HasJsTsFileInProject(ProjectItems projectItems)
   at SonarLint.VisualStudio.Integration.Binding.JsTsProjectTypeIndicator.IsJsTs(Project dteProject)
   at SonarLint.VisualStudio.Integration.ProjectToLanguageMapper.GetLanguagesInProject(Project dteProject)
   at SonarLint.VisualStudio.Integration.ProjectToLanguageMapper.GetAllBindingLanguagesForProject(Project dteProject)
   at SonarLint.VisualStudio.Integration.ProjectToLanguageMapper.HasSupportedLanguage(Project project)
   at SonarLint.VisualStudio.Integration.ProjectSystemHelper.<GetSolutionProjects>d__15.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at SonarLint.VisualStudio.Integration.UnboundProjectFinder.<>c__DisplayClass10_0.<GetFilteredSolutionProjectsAsync>b__0()

Log 2
This same problem also affects the telemetry manager:

DEBUG: [CFamilyTelemetryManager] Failed to calculate cfamily project types: System.NullReferenceException: Object reference not set to an instance of an object.
   at SonarLint.VisualStudio.Integration.Binding.JsTsProjectTypeIndicator.HasJsTsFileInProject(ProjectItems projectItems)
   at SonarLint.VisualStudio.Integration.Binding.JsTsProjectTypeIndicator.IsJsTs(Project dteProject)
   at SonarLint.VisualStudio.Integration.ProjectToLanguageMapper.GetLanguagesInProject(Project dteProject)
   at SonarLint.VisualStudio.Integration.ProjectToLanguageMapper.GetAllBindingLanguagesForProject(Project dteProject)
   at SonarLint.VisualStudio.Integration.ProjectToLanguageMapper.HasSupportedLanguage(Project project)
   at SonarLint.VisualStudio.Integration.ProjectSystemHelper.<GetSolutionProjects>d__15.MoveNext()
   at SonarLint.VisualStudio.Integration.Vsix.CFamily.VcxProject.VcxProjectTypeIndicator.GetProjectTypes()
   at SonarLint.VisualStudio.Integration.Telemetry.CFamilyTelemetryManager.CollectVcxUsage()
   at SonarLint.VisualStudio.Integration.Telemetry.CFamilyTelemetryManager.UpdateTelemetry()
@duncanp-sonar duncanp-sonar added this to To do in Hardening via automation Nov 14, 2022
@rita-gorokhod rita-gorokhod moved this from To do to In progress in Hardening Nov 15, 2022
@rita-gorokhod rita-gorokhod self-assigned this Nov 15, 2022
@rita-gorokhod rita-gorokhod moved this from In progress to Review in progress in Hardening Nov 18, 2022
@rita-gorokhod rita-gorokhod moved this from Review in progress to In progress in Hardening Nov 21, 2022
@rita-gorokhod rita-gorokhod moved this from In progress to Review in progress in Hardening Nov 22, 2022
@rita-gorokhod rita-gorokhod changed the title Error binding solution containing JS/TS project Error binding solution when checking if a project contains JS/TS files Nov 22, 2022
Hardening automation moved this from Review in progress to Done Nov 23, 2022
@duncanp-sonar duncanp-sonar added this to the Update analyzers milestone Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

2 participants