ERROR: Error during SonarQube Scanner execution java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found empty

Hi @The_Cempion,

please do not mix things like make and MSBuild.exe, please concentrate in one environment, set a successful build without analysis and once you have it you can share how you build it and we can then setup the analysis.

for my understanding: When is the build-wrapper supposed to write something in the .json file?

Hi @The_Cempion,

during build phase, build-wrapper must wrap the build command to capture compiler invocations to build analysis configuration.

so if

  • .sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory ./scripts/ . /tools/Xilinx/SDK/2018.3/bin
    is the command in the bitbucket pipeline right before the actual sonar scan, and that build is succesfully built, then the build-wrapper should write in the .json, right?
    That´s what I´ve understood so far.

Hi @The_Cempion,

if the correct build command is ./scripts/ . /tools/Xilinx/SDK/2018.3/bin then build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory ./scripts/ . /tools/Xilinx/SDK/2018.3/bin should be ok.

Yes it is. Is a nonsuccesful/incorrect build the only reason for the .json file to be empty, so my build wasn´t correct even if my buildcheck says it was?

Hi @The_Cempion,

it is hard for me to tell if you don’t provide me build output logs and build-wrapper files. Would you be able to share them? If you want to share them privately I can send you a PM.

You have to excuse me: How can I send you a PM?

When skipping the last step in my bitbucket Pipelines (which is the scan and analysis) and saving the build_wrapper_output_directory folder then the .json file isn´t empty end the exit code in the .log file is 0. Therefore my build should be correct, I think.
I can´t figure out, why then the .json file should be empty?
In addition, do you know, why the scanner needs to load my repositories? (see first picture on top) Does this have something to do with that change you´ve made?

Could you share build-wrapper.log file?

I sent you a PM.

Hi , i am also facing same issue , was there a solution for this

Hi @Sneha_Agarwal ,

please open a new topic explaining your issue.