SonarCloudAnalyse started to fail constantly

Our sonarcloud yaml build has started to fail constantly on the SonarCloudAnalyze step with the only error shown below

We’re using the following yaml to build :

# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:

name: $(majorVersion).$(minorVersion).$(Year:yy)$(DayOfYear).$(rev:r)

   vmImage: 'windows-2022'

  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'
  majorVersion: '1'
  minorVersion: '8'
  targetStagingDirectory: '$(Build.ArtifactStagingDirectory)/develop'
  solution: '**/Solution.sln'
  NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
  sourceDirectory: $(Build.SourcesDirectory)

  - stage: Build
    displayName: 'Build and Test the API Projects' 
    - job: BuildJob
      displayName: 'Build API'

        - task: DotNetCoreCLI@2
          displayName: 'Restore'
              command: 'restore'
              projects: $(solution)
              feedsToUse: 'config'
              nugetConfigPath: 'nuget.config'
              verbosityRestore: 'Normal'
        - task: SonarCloudPrepare@1
              SonarCloud: '***)'
              organization: '***'
              scannerMode: 'MSBuild'
              projectKey: '***'
              projectName: '***'
              extraProperties: |
        - task: DotNetCoreCLI@2
          displayName: 'Build the project - $(buildConfiguration)'
            projects: '$(solution)'
            arguments: '--configuration $(BuildConfiguration) --no-restore /p:Version=$(Build.BuildNumber) /p:SolutionDir=$(sourceDirectory)'

        - task: DotNetCoreCLI@2
          displayName: 'Run unit tests - $(buildConfiguration)'
              command: test
              projects: '$(solution)'
              arguments: '--configuration $(BuildConfiguration) --no-build /p:SolutionDir=$(sourceDirectory)'

        - task: SonarCloudAnalyze@1
        - task: SonarCloudPublish@1
           pollingTimeoutSec: '300'

Any help would be greatly appreciated

Hey there.

Screenshots of lots are tough to decipher, and we can’t see where in the scanning process the error occurs. Can you provider a broader scope of text-based logs?

Here’s the full raw log, but there’s no mention of any error until the 3 lines screenshotted previously

rawlog.txt (881.4 KB)

You’re right – that’s not too revealing (and based on the little bit of logs I see in your screenshot, failing at a different place!)

Can you add sonar.verbose=true to the extraProperties of SonarCloudPrepare@1 and see if we find more details? This enables DEBUG logging.