Sonarcloud for azure devops yaml v3 "cannot read properties" js

What does this error actually mean?

09:14:04.012 DEBUG: Analyzing file: file:///D:/a/1/s/CISIWeb2/js/three.interaction.js

09:14:04.015 DEBUG: Analyzing file “D:/a/1/s/CISIWeb2/js/three.interaction.js” with linterId “default”

09:14:04.264 DEBUG: Parsing D:/a/1/s/CISIWeb2/js/three.interaction.js with @typescript-eslint/parser

09:14:04.265 DEBUG: Cache entry created for key ‘jssecurity:ucfgs:SEQ:10.16.0.27621:cisidevelopment_Bitmark_cisi:CISIWeb2/js/three.interaction.js’ containing 0 file(s)

##[error]09:14:04.265 ERROR: Failed to analyze file [CISIWeb2/js/three.interaction.js] from TypeScript: Cannot read properties of undefined (reading ‘parent’)\u000aOccurred while linting D:/a/1/s/CISIWeb2/js/three.interaction.js:1\u000aRule: “S1874”

##[debug]Processed: ##vso[task.logissue type=error;]09:14:04.265 ERROR: Failed to analyze file [CISIWeb2/js/three.interaction.js] from TypeScript: Cannot read properties of undefined (reading ‘parent’)\u000aOccurred while linting D:/a/1/s/CISIWeb2/js/three.interaction.js:1\u000aRule: “S1874”

09:14:04.265 ERROR: Failed to analyze file [CISIWeb2/js/three.interaction.js] from TypeScript: Cannot read properties of undefined (reading ‘parent’)\u000aOccurred while linting D:/a/1/s/CISIWeb2/js/three.interaction.js:1\u000aRule: “S1874”

09:14:04.266 DEBUG: Cache entry created for key ‘jssecurity:ucfgs:JSON:10.16.0.27621:cisidevelopment_Bitmark_cisi:CISIWeb2/js/three.interaction.js’

09:14:04.270 DEBUG: Cache entry created for key ‘js:filemetadata:10.16.0.27621:cisidevelopment_Bitmark_cisi:CISIWeb2/js/three.interaction.js’

using this yaml →

  - task: SonarCloudPrepare@3
    displayName: Prepare SonarCloud
    inputs:
      sonarCloud: SonarCloud
      organization: $(sonarCloudOrganization)
      scannerMode: dotnet
      projectKey: $(sonarCloudProjectKey)
      projectName: $(sonarCloudProjectName)
      extraProperties: |
        sonar.verbose=true
        sonar.sourceEncoding=UTF-8
        sonar.cs.opencover.reportsPaths=$(testCoverageOpencover)
        sonar.cs.xunit.reportsPaths=$(testResults)
        sonar.coverage.exclusions=**/css/less/**/*,**/css/common/**/*,**/js/common/**/*        sonar.exclusions=*.Test/*,**/*.jpg,**/*.jpeg,**/*.png,**/*.gif,**/*.mp4,**/*.pdf,**/*.sql,**/*.min.js,cisiweb2/**
        sonar.test.inclusions=*.Test/*


  - task: SonarCloudAnalyze@3
    displayName: SonarCloud Analysis

Hello @whiterabbit99 ,

This error is a bug in our analyzer, specifically in the implementation of rule S1874. Can you please confirm that three.interaction.js is coming from the three.js library?

As a quick workaround, you might want to exclude this file from the analysis. In general we don’t recommend to analyze 3rd party code, as it creates non actionable issues

well that’s a separate issue where exclusions don’t seem to work either.

It appears this v3 is very buggy and doesn’t really work so it would be best if this could actually be tested and fixed properly and then you update here that the v3 azure devops extensions are working properly

Hello @whiterabbit99,

sorry for the late response. We’ve managed to reproduce the issue and we opened an ticket to fix this.

Cheers,
Victor