SonarQube scanner for MSBuild - end Step Error

SonarQube server version is 7.7 and SonarScanner.MSBuild.exe version is 4.6.1.2049

20:49:16.709 ERROR: Error during SonarQube Scanner execution
**java.lang.IllegalStateException: java.util.zip.ZipException: invalid stored block lengths**
        at com.sonar.cpp.plugin.AnalyzerUnpacker.unpack(AnalyzerUnpacker.java:77)
        at com.sonar.cpp.plugin.AnalyzerUnpacker.getSubprocessPath(AnalyzerUnpacker.java:85)
        at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:135)
        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:136)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
        at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:359)
        at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:354)
        at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:317)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
20:49:16.615 INFO: EXECUTION FAILURE
        at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
        at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
        at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at 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:185)
        at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
        at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.util.zip.ZipException: invalid stored block lengths
        at java.util.zip.InflaterInputStream.read(Unknown Source)
        at java.io.FilterInputStream.read(Unknown Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read1(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at org.apache.commons.compress.utils.CountingInputStream.read(CountingInputStream.java:51)
        at org.tukaani.xz.CountingInputStream.read(Unknown Source)
20:49:16.615 INFO: ------------------------------------------------------------------------
20:49:16.616 INFO: Total time: 2:30.069s
20:49:16.708 INFO: Final Memory: 29M/509M
20:49:16.708 INFO: ------------------------------------------------------------------------
        at java.io.DataInputStream.readFully(Unknown Source)
        at org.tukaani.xz.rangecoder.RangeDecoderFromBuffer.prepareInputBuffer(Unknown Source)
        at org.tukaani.xz.LZMA2InputStream.decodeChunkHeader(Unknown Source)
        at org.tukaani.xz.LZMA2InputStream.read(Unknown Source)
        at org.tukaani.xz.BlockInputStream.read(Unknown Source)
        at org.tukaani.xz.SingleXZInputStream.read(Unknown Source)
        at org.apache.commons.compress.compressors.xz.XZCompressorInputStream.read(XZCompressorInputStream.java:153)
        at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:608)
        at java.io.InputStream.read(Unknown Source)
        at java.nio.file.Files.copy(Unknown Source)
        at java.nio.file.Files.copy(Unknown Source)
        at com.sonar.cpp.analyzer.Unpacker.unpack(Unpacker.java:69)
        at com.sonar.cpp.analyzer.Unpacker.untxz(Unpacker.java:58)
        at com.sonar.cpp.analyzer.Unpacker.unpack(Unpacker.java:43)
        at com.sonar.cpp.plugin.AnalyzerUnpacker.unpack(AnalyzerUnpacker.java:63)
        ... 30 more
Process returned exit code 1
The SonarQube Scanner did not complete successfully
20:49:53.203  Post-processing failed. Exit code: 1

Hello @jong2bae,

you may have some files which are corrupted, could you please try to replace the sonar-cfamily-plugin-*jar in the extensions/plugins folder of your SonarQube server with https://binaries.sonarsource.com/CommercialDistribution/sonar-cfamily-plugin/sonar-cfamily-plugin-6.2.0.11201.jar ?

1 Like

@mpaladin
wow! wow!
I fixed the error thanks to your help. Thank you very much.
:+1:

1 Like