Error in SonarLint for IntelliJ: failed to read project_branches protobuf

Environment:

  • Java: JetBrains s.r.o. 17.0.4.1
  • OS: Mac OS X x86_64
  • IDE: IntelliJ IDEA 2022.2.3
  • SonarLint: 7.1.1.54565
o.ss.sl.core.serverconnection.storage.StorageException: Failed to read file: /Users/<username-redacted>/Library/Caches/JetBrains/IntelliJIdea2022.2/sonarlint/storage/6861707079/projects/6261636b656e642d7265706f72746170706c69636174696f6e/project_branches.pb
	at o.ss.sl.core.serverconnection.storage.ProtobufUtil.readFile(ProtobufUtil.java:42)
	at o.ss.sl.core.serverconnection.storage.ProjectStorage.lambda$getProjectBranches$3(ProjectStorage.java:73)
	at o.ss.sl.core.serverconnection.storage.RWLock.read(RWLock.java:32)
	at o.ss.sl.core.serverconnection.storage.ProjectStorage.getProjectBranches(ProjectStorage.java:73)
	at o.ss.sl.core.serverconnection.ServerConnection.getProjectBranches(ServerConnection.java:117)
	at o.ss.sl.core.ConnectedSonarLintEngineImpl.getServerBranches(ConnectedSonarLintEngineImpl.java:363)
	at o.sl.ij.vcs.DefaultVcsService.resolveServerBranchName(DefaultVcsService.kt:65)
	at o.sl.ij.vcs.DefaultVcsService.getServerBranchName(DefaultVcsService.kt:53)
	at o.sl.ij.issue.vulnerabilities.TaintVulnerabilitiesLoader.loadServerTaintVulnerabilitiesForFile(TaintVulnerabilitiesLoader.kt:62)
	at o.sl.ij.issue.vulnerabilities.TaintVulnerabilitiesLoader.getLocalTaintVulnerabilitiesForFile(TaintVulnerabilitiesLoader.kt:50)
	at o.sl.ij.issue.vulnerabilities.TaintVulnerabilitiesLoader.getTaintVulnerabilitiesByOpenedFiles(TaintVulnerabilitiesLoader.kt:44)
	at o.sl.ij.issue.vulnerabilities.TaintVulnerabilitiesPresenter$presentTaintVulnerabilitiesForOpenFiles$1.run(TaintVulnerabilitiesPresenter.kt:104)

There seem to be no project with id it states above (6261636b...)

Looks like i have managed it to work with re-checking the project key from the list.
Root cause: The key apparently have changed. But not clear why that happened, but maybe someone changed something in our settings.
Fix: Before the project key was just a project name, but now it is prefixed by organization name (organization_project). Checking it from the list in SonarLint configuration page seems have worked.

Additional context: Update local storage button was also returning a 404 error when the old project key was used, which i believe is related.

1 Like

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