Insufficient privileges at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.handleError

I’m getting the error mentioned below while connecting the Sonarlint with my SonarQube Server using the token.

xecuting /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/jre/21.0.1-linux-x86_64.tar/bin/java -jar /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/server/sonarlint-ls.jar -stdio -analyzers /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/analyzers/sonargo.jar /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/analyzers/sonarjava.jar /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/analyzers/sonarjs.jar /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/analyzers/sonarphp.jar /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/analyzers/sonarpython.jar /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/analyzers/sonarhtml.jar /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/analyzers/sonarxml.jar /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/analyzers/sonarcfamily.jar /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/analyzers/sonartext.jar /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/analyzers/sonariac.jar /home/shoaib/.vscode-server/extensions/sonarsource.sonarlint-vscode-4.1.0-linux-x64/analyzers/sonarlintomnisharp.jar
[Info  - 12:39:02.693] Started embedded server on port 64120
[Info  - 12:39:03.881] Analyzing file "file:///home/shoaib/Sparrow/Sparrow/Core/Node/local_modules/connection.ts"...
[Warn  - 12:39:04.026] Unable to query node version
[Info  - 12:39:12.223] Found 0 issues
[Info  - 12:40:07.682] Analyzing file "file:///home/shoaib/Sparrow/Sparrow/Core/Node/local_modules/batch.ts"...
[Info  - 12:40:10.014] Found 0 issues
Received binding suggestions: {"suggestions":{"file:///home/shoaib/Sparrow/Sparrow/Core":[{"connectionId":"http-192-168-6-252-9000","sonarProjectKey":"Core-MobileMoney","sonarProjectName":"Core MobileMoney"},{"connectionId":"http-192-168-6-252-9000","sonarProjectKey":"Core-BillPayment","sonarProjectName":"Core BillPayment"},{"connectionId":"http-192-168-6-252-9000","sonarProjectKey":"Core-Sparrow","sonarProjectName":"Core Sparrow"},{"connectionId":"http-192-168-6-252-9000","sonarProjectKey":"Core-PGW","sonarProjectName":"Core PGW"},{"connectionId":"http-192-168-6-252-9000","sonarProjectKey":"Core-DigitalBanking","sonarProjectName":"Core DigitalBanking"},{"connectionId":"http-192-168-6-252-9000","sonarProjectKey":"Core-CMS","sonarProjectName":"Core CMS"}]}}
[Warn  - 12:42:00.365] Illegal state. File "file:///home/shoaib/Sparrow/Sparrow/Core/.vscode/settings.json" is reported changed but we missed the open notification
[Warn  - 12:42:00.778] Exception happened during initial sync with project Core-Sparrow
[Warn  - 12:42:00.778] java.lang.IllegalStateException: Insufficient privileges
    at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.handleError(ServerApiHelper.java:148)
    at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.processPage(ServerApiHelper.java:209)
    at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.lambda$getPaginated$5(ServerApiHelper.java:198)
    at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.lambda$consumeTimed$8(ServerApiHelper.java:274)
    at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.processTimed(ServerApiHelper.java:249)
    at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.consumeTimed(ServerApiHelper.java:273)
    at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.getPaginated(ServerApiHelper.java:196)
    at org.sonarsource.sonarlint.core.serverapi.component.ComponentApi.getAllFileKeys(ComponentApi.java:45)
    at org.sonarsource.sonarlint.core.serverconnection.ProjectFileListDownloader.get(ProjectFileListDownloader.java:29)
    at org.sonarsource.sonarlint.core.serverconnection.ProjectStorageUpdateExecutor.updateComponents(ProjectStorageUpdateExecutor.java:59)
    at org.sonarsource.sonarlint.core.serverconnection.ProjectStorageUpdateExecutor.lambda$update$0(ProjectStorageUpdateExecutor.java:52)
    at org.sonarsource.sonarlint.core.serverconnection.FileUtils.replaceDir(FileUtils.java:113)
    at org.sonarsource.sonarlint.core.serverconnection.ProjectStorageUpdateExecutor.update(ProjectStorageUpdateExecutor.java:52)
    at org.sonarsource.sonarlint.core.serverconnection.ServerConnection.updateProject(ServerConnection.java:266)
    at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.updateProject(ConnectedSonarLintEngineImpl.java:517)
    at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.syncAtStartup(ProjectBindingManager.java:234)
    at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.computeProjectBinding(ProjectBindingManager.java:219)
    at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.lambda$getBinding$0(ProjectBindingManager.java:185)
    at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Unknown Source)
    at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.getBinding(ProjectBindingManager.java:178)
    at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.getBinding(ProjectBindingManager.java:146)
    at org.sonarsource.sonarlint.ls.AnalysisTaskExecutor.analyze(AnalysisTaskExecutor.java:190)
    at org.sonarsource.sonarlint.ls.AnalysisTaskExecutor.lambda$analyze$2(AnalysisTaskExecutor.java:159)
    at java.base/java.util.HashMap.forEach(Unknown Source)
    at org.sonarsource.sonarlint.ls.AnalysisTaskExecutor.analyze(AnalysisTaskExecutor.java:159)
    at org.sonarsource.sonarlint.ls.AnalysisTaskExecutor.run(AnalysisTaskExecutor.java:131)
    at org.sonarsource.sonarlint.ls.AnalysisScheduler.lambda$analyzeAsync$1(AnalysisScheduler.java:239)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
 
[Error - 12:42:01.243] Analysis failed
org.sonarsource.sonarlint.core.serverconnection.storage.StorageException: Failed to read file: /home/shoaib/.sonarlint/storage/687474702d3139322d3136382d362d3235322d39303030/projects/436f72652d53706172726f77/component_list.pb
    at org.sonarsource.sonarlint.core.serverconnection.storage.ProtobufFileUtil.readFile(ProtobufFileUtil.java:37)
    at org.sonarsource.sonarlint.core.serverconnection.ComponentsStorage.read(ComponentsStorage.java:35)
    at org.sonarsource.sonarlint.core.serverconnection.ServerConnection.calculatePathPrefixes(ServerConnection.java:140)
    at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.calculatePathPrefixes(ConnectedSonarLintEngineImpl.java:508)
    at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.computeProjectBinding(ProjectBindingManager.java:222)
    at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.lambda$getBinding$0(ProjectBindingManager.java:185)
    at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Unknown Source)
    at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.getBinding(ProjectBindingManager.java:178)
    at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.getBinding(ProjectBindingManager.java:146)
    at org.sonarsource.sonarlint.ls.AnalysisTaskExecutor.analyze(AnalysisTaskExecutor.java:190)
    at org.sonarsource.sonarlint.ls.AnalysisTaskExecutor.lambda$analyze$2(AnalysisTaskExecutor.java:159)
    at java.base/java.util.HashMap.forEach(Unknown Source)
    at org.sonarsource.sonarlint.ls.AnalysisTaskExecutor.analyze(AnalysisTaskExecutor.java:159)
    at org.sonarsource.sonarlint.ls.AnalysisTaskExecutor.run(AnalysisTaskExecutor.java:131)
    at org.sonarsource.sonarlint.ls.AnalysisScheduler.lambda$analyzeAsync$1(AnalysisScheduler.java:239)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.nio.file.NoSuchFileException: /home/shoaib/.sonarlint/storage/687474702d3139322d3136382d362d3235322d39303030/projects/436f72652d53706172726f77/component_list.pb
    at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
    at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(Unknown Source)
    at java.base/java.nio.file.Files.newByteChannel(Unknown Source)
    at java.base/java.nio.file.Files.newByteChannel(Unknown Source)
    at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(Unknown Source)
    at java.base/java.nio.file.Files.newInputStream(Unknown Source)
    at org.sonarsource.sonarlint.core.serverconnection.storage.ProtobufFileUtil.readFile(ProtobufFileUtil.java:34)
    ... 19 more
 

Note: I’m using the global analysis token with all permission assigned to it.

Solved by Exception happened during initial sync with project - #8 by sophio.japharidze

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