Unable to install sonarlint plugin in my IntelliJ

Please provide

  • Operating system: Windows 10 Enterprise
  • SonarLint plugin version: 8.2.0.68615
  • Programming language you’re coding in: Java
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version): Not connected

And a thorough description of the problem / question: When trying to install sonarlint plugin in my intellij IDEA version 2022.3.1, installation getting failed with following error:

Plugin “SonarLint” was not installed: invalid END header (bad central directory offset)

Please suggest.

Hi @cpbablu,

It looks like the files from the SonarLint plugin got corrupted. By chance, do you have any stack trace of this issue? Is it reproducible? Do you use any proxy or firewall?

If it happens again, you could try to share us the logs by going to Help | Show Log in Files and finding the idea.log file.

Thanks Nicolas. I am not using any proxy. But, this is what i saw in idea.log:

2023-05-19 08:01:13,689 [1037709] INFO - #c.i.o.u.i.PluginDownloader - invalid END header (bad central directory offset)
java.util.zip.ZipException: invalid END header (bad central directory offset)
at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1598)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1492)
at java.base/java.util.zip.ZipFile$Source.(ZipFile.java:1315)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1277)
at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:709)
at java.base/java.util.zip.ZipFile.(ZipFile.java:243)
at java.base/java.util.zip.ZipFile.(ZipFile.java:172)
at java.base/java.util.zip.ZipFile.(ZipFile.java:186)
at com.intellij.ide.plugins.PluginInstaller.rootEntryName(PluginInstaller.java:207)
at com.intellij.ide.plugins.marketplace.MarketplacePluginDownloadService$Companion.renameFileToZipRoot(MarketplacePluginDownloadService.kt:53)
at com.intellij.ide.plugins.marketplace.MarketplacePluginDownloadService.downloadPlugin$lambda$0(MarketplacePluginDownloadService.kt:78)
at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:517)
at com.intellij.util.io.HttpRequests.process(HttpRequests.java:499)
at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:334)
at com.intellij.ide.plugins.marketplace.MarketplacePluginDownloadService.downloadPlugin(MarketplacePluginDownloadService.kt:73)
at com.intellij.openapi.updateSettings.impl.PluginDownloader.tryDownloadPlugin(PluginDownloader.java:358)
at com.intellij.openapi.updateSettings.impl.PluginDownloader.prepareToInstall(PluginDownloader.java:221)
at com.intellij.ide.plugins.PluginInstallOperation.prepareToInstall(PluginInstallOperation.java:246)
at com.intellij.ide.plugins.PluginInstallOperation.prepareToInstallWithCallback(PluginInstallOperation.java:213)
at com.intellij.ide.plugins.PluginInstallOperation.prepareToInstall(PluginInstallOperation.java:185)
at com.intellij.ide.plugins.PluginInstallOperation.run(PluginInstallOperation.java:125)
at com.intellij.ide.plugins.newui.MyPluginModel.runInstallOperation(MyPluginModel.java:442)
at com.intellij.ide.plugins.newui.MyPluginModel$1.run(MyPluginModel.java:410)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:423)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:474)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:589)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:664)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:620)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:588)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
2023-05-19 08:01:13,692 [1037712] INFO - #c.i.o.u.i.PluginDownloader - PluginDownloader error: invalid END header (bad central directory offset)
2023-05-19 08:01:50,669 [1074689] WARN - #c.i.o.o.e.ConfigurableCardPanel - auto-dispose ‘Plugins’ id=preferences.pluginManager
2023-05-19 08:01:55,311 [1079331] INFO - #c.i.c.ComponentStoreImpl - Saving appFileTypeManager took 13 ms
2023-05-19 08:01:55,437 [1079457] WARN - #c.i.u.x.Binding - no accessors for org.jetbrains.idea.perforce.perforce.ConnectionId
2023-05-19 08:02:08,716 [1092736] INFO - #c.i.c.ComponentStoreImpl - Saving appFileTypeManager took 20 ms, LafManager took 20 ms

Thank you for providing the stack trace.

This issue is unrelated to SonarLint, so our help will be limited. Clearing the cache and maybe reinstalling the IDE could be a solution. If not, you could create a ticket on JetBrains’ side.

Instead, I would suggest manually installing the plugin by going to our SonarLint plugin page and downloading the latest version.

Then, follow the JetBrains documentation to install it from the disk:

Install plugin from disk

  1. Download the plugin archive (ZIP or JAR).
  2. Press Ctrl+Alt+S to open the IDE settings and select Plugins.
  3. On the Plugins page, click The Settings button|16pxx16px and then click Install Plugin from Disk….
  4. Select the plugin archive file and click OK.
  5. Click OK to apply the changes and restart the IDE if prompted.

Thanks a lot for your help. Getting the same issue with manual installation too. I will raise ticket with jetbrains.