SonarCloud first integration with GitLab - "Fail to download plugin [abap]"

Hi team,
It’s my first time using SonarCloud with GitLab and doing step by step adding the “.gitlab-ci.yml” with

sonarcloud-check:
  stage: sonar
  image:
    name: sonarsource/sonar-scanner-cli:latest
    entrypoint: [""]
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - .sonar/cache
  script:
    - sonar-scanner
  only:
    - merge_requests
    - master
  dependencies:
    - build

and, when it runs the pipeline I have the following error:

16:05:21.853 DEBUG: Execution execute
16:05:22.103 DEBUG: SonarCloud 9.0.1.46107
16:05:22.313 INFO: Load global settings
16:05:22.668 DEBUG: GET 200 https://sonarcloud.io/api/settings/values.protobuf | time=353ms
16:05:22.674 INFO: Load global settings (done) | time=361ms
16:05:22.678 INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
16:05:22.690 DEBUG: Create : /builds/stratio2/qa/calculator-test/.sonar/_tmp
16:05:22.690 INFO: User cache: /builds/stratio2/qa/calculator-test/.sonar/cache
16:05:22.694 INFO: Load/download plugins
16:05:22.694 INFO: Load plugins index
16:05:22.750 DEBUG: GET 200 https://sonarcloud.io/api/plugins/installed | time=56ms
16:05:22.786 INFO: Load plugins index (done) | time=92ms
16:05:22.788 DEBUG: Download plugin 'abap' to '/builds/stratio2/qa/calculator-test/.sonar/_tmp/fileCache16535598965752054210.tmp'
16:05:22.843 DEBUG: GET 200 https://sonarcloud.io/api/plugins/download?plugin=abap&acceptCompressions=pack200 | time=55ms
16:05:23.045 DEBUG: Unpacking plugin abap
16:05:23.286 INFO: Load/download plugins (done) | time=592ms
16:05:23.292 INFO: ------------------------------------------------------------------------
16:05:23.292 INFO: EXECUTION FAILURE
16:05:23.292 INFO: ------------------------------------------------------------------------
16:05:23.292 INFO: Total time: 3.436s
16:05:23.308 INFO: Final Memory: 5M/27M
16:05:23.308 INFO: ------------------------------------------------------------------------
16:05:23.308 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Fail to download plugin [abap]. Pack200 error.
	at org.sonar.scanner.bootstrap.PluginFiles.unpack200(PluginFiles.java:173)
	at org.sonar.scanner.bootstrap.PluginFiles.download(PluginFiles.java:114)
	at org.sonar.scanner.bootstrap.PluginFiles.get(PluginFiles.java:75)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.loadPlugins(ScannerPluginInstaller.java:70)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installRemotes(ScannerPluginInstaller.java:52)
	at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:45)
	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:26)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:122)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
	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(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	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)
Caused by: java.util.zip.ZipException: Corrupt GZIP trailer
	at java.base/java.util.zip.GZIPInputStream.readTrailer(GZIPInputStream.java:226)
	at java.base/java.util.zip.GZIPInputStream.read(GZIPInputStream.java:120)
	at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:290)
	at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
	at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
	at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
	at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
	at java.base/com.sun.java.util.jar.pack.Utils.readMagic(Utils.java:291)
	at java.base/com.sun.java.util.jar.pack.NativeUnpack.run(NativeUnpack.java:237)
	at java.base/com.sun.java.util.jar.pack.NativeUnpack.run(NativeUnpack.java:248)
	at java.base/com.sun.java.util.jar.pack.UnpackerImpl.unpack(UnpackerImpl.java:115)
	at org.sonar.scanner.bootstrap.PluginFiles.unpack200(PluginFiles.java:171)
	... 29 more

what could be the issue here? something fail to download properly the abap plugin?
Thanks
Emanuel

Hi,

What version of Java is analysis running with?

 
Ann

@ganncamp I didn’t change, and it should be from latest image from sonar-scanner-cli, which is java-11-openjdk and seems SONAR_SCANNER_VERSION=4.7.0.2747

https://hub.docker.com/layers/sonar-scanner-cli/sonarsource/sonar-scanner-cli/latest/images/sha256-ad8b565955b49172d4f3e852594f61f49f760c03adcd9a1994acfa9bf9768510?context=explore

Hi,

I guess you’re using the Docker scanner version? There’s a problem with 4.7, and falling back to 4.6 will make your error go away.

And, we’re struggling a bit to isolate the problem in the 4.7 image. I may need to come back to you with some more questions about how you’ve been analyzing. I hope that’ll be okay.

 
Ann

Hey @Emanuel_Teixeira

See this update here:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.