IllegalStateException Unable to read plugin manifest from detekt jar

What Sonarqube version I’m using
Using SonarQube community edition 8.9.8 (build 54436)

What am I trying to achieve

  • Run sonar scanner as part of a travis build for golang based project.
  • The travis build config script has cache enabled for sonar plugins that get downloaded every time from the sonarqube server.
cache:
  directories:
  - $HOME/.sonar/cache

What issue am I facing?
Things were working fine for many days until today when a build failed due to below error

INFO: SonarScanner 4.7.0.2747
INFO: Java 11.0.2 Oracle Corporation (64-bit)
INFO: Linux 4.15.0-1098-gcp amd64
INFO: User cache: /home/travis/.sonar/cache
INFO: Scanner configuration file: /home/travis/.sonarscanner/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: /home/travis/gopath/src/abc/xyz/sonar.properties
INFO: Analyzing on SonarQube server 8.9.8
INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=436ms
INFO: Server id: abc
INFO: User cache: /home/travis/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=1032ms
INFO: Load/download plugins (done) | time=1121ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 4.224s
INFO: Final Memory: 5M/20M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Unable to read plugin manifest from jar : /home/travis/.sonar/cache/abc/sonar-detekt-plugin.jar
....
....
Caused by: java.util.zip.ZipException: zip END header not found

Any idea why this might be happening? Thanks for any help in advance.

Hey there.

You’ll probably want to reach out to the maintainers of GitHub - detekt/sonar-kotlin: SonarQube plugin for Kotlin