Error in SonarLint for IntelliJ 2021.1.1 IU-211.7142.45

Environment:

  • Java version=11.0.10
  • Java vendor=JetBrains s.r.o.
  • OS name=Windows 10
  • OS architecture=amd64
  • IDE=IntelliJ IDEA 2021.1.1
  • SonarLint version=4.16.0.31683
java.lang.IllegalStateException: Failed to read issues
	at org.sonarlint.intellij.issue.persistence.IssuePersistence.lambda$new$0(IssuePersistence.java:56)
	at org.sonarlint.intellij.issue.persistence.IndexedObjectStore.read(IndexedObjectStore.java:65)
	at org.sonarlint.intellij.issue.persistence.IssuePersistence.read(IssuePersistence.java:85)
	at org.sonarlint.intellij.issue.IssueManager.getPreviousIssues(IssueManager.java:129)
	at org.sonarlint.intellij.analysis.SonarLintTask.lambda$null$5(SonarLintTask.java:218)
	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
	at org.sonarlint.intellij.analysis.SonarLintTask.lambda$collectPreviousIssuesPerFile$6(SonarLintTask.java:218)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at org.sonarlint.intellij.analysis.SonarLintTask.collectPreviousIssuesPerFile(SonarLintTask.java:218)
	at org.sonarlint.intellij.analysis.SonarLintTask.run(SonarLintTask.java:121)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:998)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:497)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:228)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:228)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
	at com.google.protobuf.InvalidProtocolBufferException.invalidTag(InvalidProtocolBufferException.java:102)
	at com.google.protobuf.CodedInputStream$StreamDecoder.readTag(CodedInputStream.java:2068)
	at org.sonarlint.intellij.proto.Sonarlint$Issues.<init>(Sonarlint.java:87)
	at org.sonarlint.intellij.proto.Sonarlint$Issues.<init>(Sonarlint.java:48)
	at org.sonarlint.intellij.proto.Sonarlint$Issues$1.parsePartialFrom(Sonarlint.java:2162)

Hello,

Welcome to the community!

It looks like your local issue storage is somehow corrupted, maybe a problem happened when writing to disk after the previous analysis.

I created a ticket to better handle this error. And I suggest you to delete the issue storage folder. It is usually located at:

<project_folder>/.idea/sonarlint/issuestore

Please keep us informed if it helped you resolve the issue,
Damien

You were right. I deleted the folder then restarted IntelliJ. No more problems. Why does the folder not “delete itself” if there is an error like this?

Thanks for keeping us informed!

Deleting the folder is indeed one possible solution that is listed in the linked ticket, along with other possibilities. Please note that we haven’t started working on the topic yet

Thanks.
Damien

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