java.lang.IllegalStateException The "build-wrapper-dump.json" file was found empty

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    ** sonarqube 8.9.2
    ** build-wrapper-win-x86-64.exe 6.2
  • what are you trying to achieve
    **I try to analyse one of my project

Hello Community,

When trying to analyse one of my project I have this error

*09:43:49.903 INFO: PCH: unique=0 use=0 (forceInclude=0,throughHeader=0,firstInclude=0) out of 0 (forceInclude=0,throughHeader=0)
09:43:49.903 INFO: SE: 0 out of 0
09:43:49.903 INFO: Subprocess(es) done in 16ms
09:43:49.918 INFO: 0 compilation units analyzed
09:43:50.213 INFO: ------------------------------------------------------------------------
09:43:50.213 INFO: EXECUTION FAILURE
09:43:50.213 INFO: ------------------------------------------------------------------------
09:43:50.213 INFO: Total time: 51.045s
09:43:50.375 INFO: Final Memory: 20M/70M
09:43:50.375 INFO: ------------------------------------------------------------------------
09:43:50.375 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found empty. Please make sure that:
  * you are using the latest version of the build-wrapper and the CFamily analyzer
  * your compiler is supported
  * you are wrapping your build correctly
  * you are wrapping a full/clean build
  * if you are building your project inside a Docker container, build-wrapper is wrapping the build process inside the container and not wrapping the external Docker process
	at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:442)
	at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:175)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:392)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:388)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:357)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:150)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)

Build step ‘Execute Windows batch command’ marked build as failure

I build my project using this command
*`build-wrapper-win-x86-64.exe --out-dir “%WORKSPACE%\SonarOutput” “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv” “%WORKSPACE%\Utimaco.sln” /ReBuild “Release SDK 4.20+ KS_V01|Win32”

The content of the sonar output dire is the following :
*SonarOutput.zip (1.8 KB)

When I try to build my project with the command line `“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv” “%WORKSPACE%\Utimaco.sln” /ReBuild “Release SDK 4.20+ KS_V01|Win32”`` it works.

I don’t know what to check to solve this issue.

Thanks for your help.

Regards

Hi @Romain_Laffitte,

I think there are two devenv with different extensions and you should specify the extension that you want.
in your case try to add .com to devenv:

build-wrapper-win-x86-64.exe --out-dir “%WORKSPACE%\SonarOutput” “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.com” “%WORKSPACE%\Utimaco.sln” /ReBuild “Release SDK 4.20+ KS_V01|Win32

Thanks,