No protobuf reports found

Template for a good new topic, formatted with Markdown:

  • ALM used
    GitHub

  • CI system used
    GitHub Actions

  • Scanner command used when applicable (private details masked)

    - name: Install and run SonarScanner
      run: |
         export SONAR_SCANNER_VERSION=4.2.0.1873
         export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
         curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
         unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
         export PATH=$SONAR_SCANNER_HOME/bin:$PATH
         export SONAR_SCANNER_OPTS="-server"
         sonar-scanner -Dsonar.organization="REDACTED" -Dsonar.projectKey="REDACTED" -Dsonar.sources="REDACTED" -Dsonar.host.url="https://sonarcloud.io" -Dsonar.login="${{ secrets.REDACTED }}"
      env:
       GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  • Languages of the repository
    Javascript and C#.

  • Error observed

At 10.24AM we started getting this error accross all GitHub Action executions

INFO: ------------- Run sensors on project
INFO: Sensor C# [csharp]
WARN: No protobuf reports found - no metrics and highlighting will be imported.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 2:07.008s
ERROR: Error during SonarQube Scanner execution
INFO: Final Memory: 29M/100M
java.lang.IllegalStateException: No Roslyn issue reports were found.
	at org.sonarsource.dotnet.shared.plugins.DotNetSensor.executeInternal(DotNetSensor.java:101)
	at org.sonarsource.dotnet.shared.plugins.DotNetSensor.execute(DotNetSensor.java:71)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:45)
	at org.sonar.scanner.sensor.ProjectSensorsExecutor.execute(ProjectSensorsExecutor.java:38)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:378)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:122)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:108)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:126)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:122)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:108)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

For a commit in the same PR submitted 40 minutes earlier I had no error and this output instead:

INFO: ------------- Run sensors on project
INFO: Sensor C# [csharp]
INFO: Sensor C# [csharp] (done) | time=0ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=118ms

Could you please explain what the error message means?

2 Likes

We are also suddenly seeing the same error in our builds of a SSDT project.

It does not include any .net code.

1 Like

Hello :slight_smile:

Same for us on Azure DevOps with the SoanrQube task. Our Sitecore project is failing :frowning:

1 Like

We’re also seeing this error on our Run Code Analysis task within our Azure DevOps builds of .NET SQL applications however our .NET web application builds are running fine.
WARN: No protobuf reports found - no metrics and highlighting will be imported.

We’re also in the process of updating our Java version from 1.8.0_112:
##[warning]WARN: The version of Java (1.8.0_112) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.

2 Likes

@mickaelcaro just wanted to bring this to your attention as it seems several of us are seeing this on our environments, so maybe something which is widespread.

same here

@Vincent-FundApps @brett.postin @dlaureaux-accenture @current1 @slewis96 what scanner for msbuild version are you using?

did you previously not have the WARN: No protobuf reports found - no metrics and highlighting will be imported. warning?

@Andrei_Epure this is the version used:

I previously had this message in all the successful executions:

INFO: Sensor C# Properties [csharp]

WARN: Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.

WARN: No Roslyn issues report found for this project.

INFO: Sensor C# Properties [csharp] (done) | time=1ms

Now, in the GitHub actions which fail I have this message in lieu

INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=1ms

The version we are using:

INFO: SonarScanner 4.4.0.2170
INFO: Java 1.8.0_112 Oracle Corporation (64-bit)
MSBuild 14.0 x64

Previously ouput was:

INFO: No UCFGs have been included for analysis.
INFO: Sensor PythonSecuritySensor [security] (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor C# [csharp]
INFO: Sensor C# [csharp] (done) | time=0ms
INFO: Sensor C# Tests Coverage Report Import [csharp]
WARN: Could not find any coverage report file matching the pattern '**/*.coveragexml'.
INFO: Sensor C# Tests Coverage Report Import [csharp] (done) | time=1094ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=266ms

(Analysis would then execute successfully)

New output:

INFO: No UCFGs have been included for analysis.
INFO: Sensor PythonSecuritySensor [security] (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor C# [csharp]
WARN: No protobuf reports found - no metrics and highlighting will be imported.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1:05.907s
INFO: Final Memory: 41M/794M
INFO: ------------------------------------------------------------------------
##[error]ERROR: Error during SonarScanner execution

An explanation: We deployed a new version (8.13) of the C# and VB .NET plugins this morning (Europe timezone) . For issue #3593 we decided to fail the analysis in case the roslyn reports are not found (which means that msbuild didn’t run). It appears that there are usage scenarios we didn’t consider, and thanks a lot for your reactions.

What we’ll do: We are going to revert the C# and VB .NET plugin version ASAP to the previous one (8.12). I will give an update when the revert is done. And then follow up to understand your usage scenarios.


Thanks for the quick answers, @Vincent-FundApps @slewis96

In your cases it means that for the C# code you were never getting any analysis results in :sonarcloud: , right?

2 Likes

Thanks @Andrei_Epure, much appreciated.

In this action we’re using the msbuild scanner for analysis of .js (cf. GitHub Action yaml file at the top of my first message).
We have a separate action which uses dotnet sonarscanner for C# analysis.

1 Like

We are using the CLI scanner for a SSDT project containing only SQL.

INFO: SonarScanner 4.4.0.2170

Thanks that’s great.

We use the sonar-scanner to analyse both C#, XML, and SQL using the cs, XML, and tsql sensor/quality profile

Example configuration:

INFO: Project configuration:
INFO:   Excluded sources: **/*.bin, **/*.cd, **/*.css, **/packages/*.*, **/InstallerConfig/*.*, **/Properties/*.*, **/*.isproj
INFO: 735 files indexed
INFO: 15 files ignored because of inclusion/exclusion patterns
INFO: 92 files ignored because of scm ignore settings
INFO: Quality profile for cs: Sonar way
INFO: Quality profile for tsql: Sonar way
INFO: Quality profile for xml: Sonar way

Yeah we weren’t getting any results published to SonarCloud.

any update on when the roll back will happen

thanks

It should be fixed within the next hour. We apologize for the inconvenience.

Updates regarding the incident can be followed at https://sonarcloud.statuspage.io/

Thanks @Andrei_Epure @Vince
Also interested in knowing if there is a better (recommended?) way of using sonarcloud for our use cases.

I don’t think so. Your use case of analyzing only the JS code in a C# project is a valid one. I opened #3615 and we’ll do a bugfix. We’ll also add regression tests for your cases.

LE: @Vincent-FundApps also see this reply on a previous post of yours.

@slewis96 - to analyze the C# code, you need to use SonarScanner for MSBuild.


On a separate note and to understand better the scenarios: @current1 @Vincent-FundApps @brett.postin @dlaureaux-accenture - you’re all using the scanner-cli to do the analysis that was failing, right? Was any of you using SonarScanner for MSBuild for such a failed analysis?

LE: If you could detail your project setup it will be great, it will help us add regression tests for them and ensure this will never happen again.

The fix has been deployed. @current1 @Vincent-FundApps @slewis96 @brett.postin @dlaureaux-accenture please try again the analysis.

1 Like

Hey @Andrei_Epure I can confirm it’s working again.

Yes I was using the sonarscanner cli.
The sonarscanner for msbuild (dotnet sonarscanner) was working fine.

I’ll look again at the response from Duncan but I think that what he was suggesting didn’t work for me.

2 Likes