I don’t control the management of my SonarQube server and it was recently upgraded to 8.3. I’m running my builds in a windows-based Jenkins server and I upgraded Sonarscanner for MSBuild from 4.6 to 4.9 and the error did not clear. Running VS Build Tools 2019. Since the upgrade I’m getting plugin update error that I assume is related to the server upgrade.
When I run a scan I get the following (verbose) sequence in the log:
18:25:33.718 Processing plugin: csharp version 22.214.171.12483 18:25:33.791 Cache miss: plugin files were not found in the local cache 18:25:33.792 Fetching resource for plugin: csharp, version 126.96.36.19983. Resource: SonarAnalyzer-188.8.131.5283.zip 18:25:33.793 Downloading SonarAnalyzer-184.108.40.20683.zip from https://sonarqube[redacted]/static/csharp/SonarAnalyzer-220.127.116.1183.zip to C:\Users\****\AppData\Local\Temp\.sonarqube\resources\0 18:25:33.794 Downloading file from https://sonarqube.[redacted]/static/csharp/SonarAnalyzer-18.104.22.16883.zip to C:\Users\****\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer-22.214.171.12483.zip... 18:25:33.86 Extracting files to C:\Users\****\AppData\Local\Temp\.sonarqube\resources\0... Unhandled Exception: System.IO.InvalidDataException: End of Central Directory record could not be found. at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()
What appears to be happening is that when sonarscanner reaches out my hosted server and requests /static/csharp/SonarAnalyzer-126.96.36.19983.zip, it’s getting the server’s login page, saving that as the .zip file and then failing to unzip it (because it received html).
Is this something my SQ host messed up in their upgrade by not making the /static directory public? Is there a usual way this is handled? Secondarily, since I can download SonarAnalyzer-188.8.131.5283.zip I’m ok with just adding it to my Jenkins config if someone can point to where the DLLs in that zip file should go.