Issue with SonarLint bindings

If your question is about SonarLint in the IntelliJ Platform, VS Code, Visual Studio, or Eclipse, please post it in that sub-category.

Otherwise, please provide:

  • Windows 10 Pro 19044.2251
  • Eclipse/STM32Cube IDE 1.10.0
    *SonarLint 7.5
    *SonarQube developer edition 9.7.0.61563

And a thorough description of the problem / question:

Hello

I am currently trying to use SonarLint to analyze c code. Installing the plugin and creating the binding works, but when I start analyzing I get the following error:

Unable to synchronize local storage for connection '10.10.174.42'
java.lang.IllegalStateException: Insufficient privileges
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.handleError(ServerApiHelper.java:125)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.get(ServerApiHelper.java:70)
	at org.sonarsource.sonarlint.core.serverapi.issue.IssueApi.lambda$pullIssues$6(IssueApi.java:180)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.processTimed(ServerApiHelper.java:225)
	at org.sonarsource.sonarlint.core.serverapi.issue.IssueApi.pullIssues(IssueApi.java:179)
	at org.sonarsource.sonarlint.core.serverconnection.IssueDownloader.downloadFromPull(IssueDownloader.java:88)
	at org.sonarsource.sonarlint.core.serverconnection.ServerIssueUpdater.sync(ServerIssueUpdater.java:58)
	at org.sonarsource.sonarlint.core.serverconnection.ServerConnection.syncServerIssuesForProject(ServerConnection.java:195)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.syncServerIssues(ConnectedSonarLintEngineImpl.java:444)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.lambda$40(ConnectedEngineFacade.java:642)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.syncProjectIssuesForCurrentBranch(ConnectedEngineFacade.java:641)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.lambda$39(ConnectedEngineFacade.java:628)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.doWithEngine(ConnectedEngineFacade.java:208)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.autoSync(ConnectedEngineFacade.java:626)
	at org.sonarlint.eclipse.ui.internal.job.PeriodicStoragesSynchronizerJob.run(PeriodicStoragesSynchronizerJob.java:60)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

SonarQube works properly on the server side.

This is all I get in the access log:

"GET /api/developers/search_events?projects=masimo&from=2022-12-12T14%3A15%3A14%2B0100 HTTP/1.1" 200 13 "-" "SonarLint Eclipse 7.5.0.54140" "AYUKxwmcNVANAQiGAAAi"

Hello @olofTerner,

Could you please check that:

  • the token you created to establish the binding is a “User token”.
  • your user has the “Browse” permission on the server. You can read more on permissions here.

Turn out I was using a global access token rather than a user token, changing to a user token worked. Thank you

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