Permission Exceptions in SonarQube for IDE on startup, no TypeScript Analysis

Please provide

  • Operating system: Windows 10 enterprise
  • SonarQube for IntelliJ plugin version:10.22.0.81244
  • IntelliJ version: 2024.3.5
  • Programming language you’re coding in: Various including TypeScript
  • Is connected mode used: Yes
    • SonarQube Cloud, SonarQube Server, or SonarQube Community Build? (if one of the latter two, which version?): SonarQube Server - Version 9.9.4 (build 87374)

And a thorough description of the problem / question: Was able to successfully use Sonarqube for IDE to scan code in Intellij in connected mode using personal project token, however it only used the ‘standard’ set of languages, when analyzing TypeScript, no results were shown. Successfully scanning and pushing results to server via Jenkins via Maven goal, including now the TypeScript Code. Modified Server project to include Quality profile for TypeScript. Immediately after adding the TypeScript code started seeing TypeScript analysis results in IntellIJ sonar for IDE, ie. it was picking up the TS profile. A few days later, with no obvious changes began receiving errors when starting intellij (shown below) and the TypeScript analysis no longer works in Intellij. The token will not expire until next year. Summarized Exceptions:

[2025-04-30T14:20:37.232] [SonarLint Local Storage Synchronizer] ERROR sonarlint - Error while fetching new code definition
org.sonarsource.sonarlint.core.serverapi.exception.ForbiddenException: Insufficient privileges
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.handleError(ServerApiHelper.java:190)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.get(ServerApiHelper.java:86)
	at org.sonarsource.sonarlint.core.serverapi.newcode.NewCodeApi.getNewCodeDefinition(NewCodeApi.java:59)
	at org.sonarsource.sonarlint.core.serverconnection.LocalStorageSynchronizer.synchronizeAnalyzerConfig(LocalStorageSynchronizer.java:86)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeConnectionAndProjectsIfNeededSync$15(SynchronizationService.java:328)
	at java.base/java.util.HashMap.forEach(HashMap.java:1429)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.synchronizeConnectionAndProjectsIfNeededSync(SynchronizationService.java:325)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeConnectionAndProjectsIfNeededAsync$11(SynchronizationService.java:297)
	at org.sonarsource.sonarlint.core.connection.SonarQubeClient.withClientApi(SonarQubeClient.java:71)
	at org.sonarsource.sonarlint.core.SonarQubeClientManager.lambda$withActiveClient$1(SonarQubeClientManager.java:85)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.sonarsource.sonarlint.core.SonarQubeClientManager.withActiveClient(SonarQubeClientManager.java:85)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeConnectionAndProjectsIfNeededAsync$12(SynchronizationService.java:297)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

 [2025-04-30T14:20:37.257] [SonarLint Local Storage Synchronizer] INFO sonarlint - Synchronizing project branches for project 'REDACTED'
 [2025-04-30T14:20:37.907] [SonarLint Local Storage Synchronizer] INFO sonarlint - [SYNC] Synchronizing issues for project 'REDACTED' on branch 'main'
 [2025-04-30T14:20:37.923] [SonarLint Local Storage Synchronizer] ERROR sonarlint - Error during synchronization
org.sonarsource.sonarlint.core.serverapi.exception.ForbiddenException: Insufficient privileges
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.handleError(ServerApiHelper.java:190)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.get(ServerApiHelper.java:86)
	at org.sonarsource.sonarlint.core.serverapi.issue.IssueApi.lambda$pullIssues$7(IssueApi.java:175)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.processTimed(ServerApiHelper.java:290)
	at org.sonarsource.sonarlint.core.serverapi.issue.IssueApi.pullIssues(IssueApi.java:174)
	at org.sonarsource.sonarlint.core.serverconnection.IssueDownloader.downloadFromPull(IssueDownloader.java:101)
	at org.sonarsource.sonarlint.core.serverconnection.ServerIssueUpdater.sync(ServerIssueUpdater.java:65)
	at org.sonarsource.sonarlint.core.sync.IssueSynchronizationService.syncServerIssuesForProject(IssueSynchronizationService.java:59)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeProjectWithProgress$5(SynchronizationService.java:204)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeProjectWithProgress$6(SynchronizationService.java:199)
	at java.base/java.util.HashMap.forEach(HashMap.java:1429)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.synchronizeProjectWithProgress(SynchronizationService.java:199)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeProjectsOfTheSameConnection$3(SynchronizationService.java:187)
	at org.sonarsource.sonarlint.core.connection.SonarQubeClient.withClientApi(SonarQubeClient.java:71)
	at org.sonarsource.sonarlint.core.SonarQubeClientManager.lambda$withActiveClient$1(SonarQubeClientManager.java:85)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.sonarsource.sonarlint.core.SonarQubeClientManager.withActiveClient(SonarQubeClientManager.java:85)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.synchronizeProjectsOfTheSameConnection(SynchronizationService.java:183)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeProjectsSync$2(SynchronizationService.java:168)
	at org.sonarsource.sonarlint.core.commons.progress.TaskManager.runTask(TaskManager.java:36)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.synchronizeProjectsSync(SynchronizationService.java:160)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.synchronizeConnectionAndProjectsIfNeededSync(SynchronizationService.java:337)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeConnectionAndProjectsIfNeededAsync$11(SynchronizationService.java:297)
	at org.sonarsource.sonarlint.core.connection.SonarQubeClient.withClientApi(SonarQubeClient.java:71)
	at org.sonarsource.sonarlint.core.SonarQubeClientManager.lambda$withActiveClient$1(SonarQubeClientManager.java:85)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.sonarsource.sonarlint.core.SonarQubeClientManager.withActiveClient(SonarQubeClientManager.java:85)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeConnectionAndProjectsIfNeededAsync$12(SynchronizationService.java:297)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

 [2025-04-30T14:20:37.924] [SonarLint Local Storage Synchronizer] ERROR sonarlint - An error occurred while executing a scheduled task in SonarLint Local Storage Synchronizer
org.sonarsource.sonarlint.core.serverapi.exception.ForbiddenException: Insufficient privileges
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.handleError(ServerApiHelper.java:190)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.get(ServerApiHelper.java:86)
	at org.sonarsource.sonarlint.core.serverapi.issue.IssueApi.lambda$pullIssues$7(IssueApi.java:175)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.processTimed(ServerApiHelper.java:290)
	at org.sonarsource.sonarlint.core.serverapi.issue.IssueApi.pullIssues(IssueApi.java:174)
	at org.sonarsource.sonarlint.core.serverconnection.IssueDownloader.downloadFromPull(IssueDownloader.java:101)
	at org.sonarsource.sonarlint.core.serverconnection.ServerIssueUpdater.sync(ServerIssueUpdater.java:65)
	at org.sonarsource.sonarlint.core.sync.IssueSynchronizationService.syncServerIssuesForProject(IssueSynchronizationService.java:59)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeProjectWithProgress$5(SynchronizationService.java:204)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeProjectWithProgress$6(SynchronizationService.java:199)
	at java.base/java.util.HashMap.forEach(HashMap.java:1429)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.synchronizeProjectWithProgress(SynchronizationService.java:199)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeProjectsOfTheSameConnection$3(SynchronizationService.java:187)
	at org.sonarsource.sonarlint.core.connection.SonarQubeClient.withClientApi(SonarQubeClient.java:71)
	at org.sonarsource.sonarlint.core.SonarQubeClientManager.lambda$withActiveClient$1(SonarQubeClientManager.java:85)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.sonarsource.sonarlint.core.SonarQubeClientManager.withActiveClient(SonarQubeClientManager.java:85)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.synchronizeProjectsOfTheSameConnection(SynchronizationService.java:183)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeProjectsSync$2(SynchronizationService.java:168)
	at org.sonarsource.sonarlint.core.commons.progress.TaskManager.runTask(TaskManager.java:36)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.synchronizeProjectsSync(SynchronizationService.java:160)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.synchronizeConnectionAndProjectsIfNeededSync(SynchronizationService.java:337)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeConnectionAndProjectsIfNeededAsync$11(SynchronizationService.java:297)
	at org.sonarsource.sonarlint.core.connection.SonarQubeClient.withClientApi(SonarQubeClient.java:71)
	at org.sonarsource.sonarlint.core.SonarQubeClientManager.lambda$withActiveClient$1(SonarQubeClientManager.java:85)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.sonarsource.sonarlint.core.SonarQubeClientManager.withActiveClient(SonarQubeClientManager.java:85)
	at org.sonarsource.sonarlint.core.sync.SynchronizationService.lambda$synchronizeConnectionAndProjectsIfNeededAsync$12(SynchronizationService.java:297)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)

I also noticed that when starting up Intellij I get this pop up: “SonarQube for IDE requires Node.js runtime version 18.17.0 or later to analyze TypeScript code. Current version is 16.13.2.
Please configure the Node.js path in the SonarQube for IDE settings.” even though, I have configured the plugin scan to use node at: xxx/nvm\v20.15.1\node.exe

It seems the exceptions may be a red herring. What I’ve found is that if I use nvm to switch to node version 20.x, running the TS scan works, even after I restart IntellIJ. If i switch back to 16 it stops working. The plugin doesnt seem to be properly picking up the configuration pointing to node 20.x, but my angular code requires to stay for now on v16.x.

Hi @NPlot,

From the exception it looks like your token might be either expired or you might not have the access right to that project. Could you try re-create the token and make sure you have access rights for that specific project. For the node, can you share what you see in this part of the settings:

Hi - thanks for the response - my original question had to do with the exceptions but my 2 subsequent posts have made me realize that while the exceptions may be causing an issue, the TypeScript is related to the node version not being picked up by the plugin. Here’s the plugin setting:

I tried this again: I restarted intellij when my global node is 16 and the typescript wont work. If i close intellij and change my node to 20.x and then restart intellij, it starts working. but then switching back to 16 causes the scan to stop working again.

i have tried also revoking the token and creating a new one, this doesnt fix the exceptions or resolve the typescript issue. as far as project permissions, i dont have full project access so i cannot easily change it back and forth but yesterday i did have the admin give me ‘execute analysis’ permissions (which seemed to be the only thing missing aside from Browse, View Source and Administer issue, but this didnt seem to stop the exceptions…

I noticed also just now in the log:

[2025-05-02T10:40:42.838] [sonarlint-analysis-scheduler] INFO org.sonar.plugins.javascript.bridge.BridgeServerImpl - 'sonar.nodejs.executable' is set. Skipping embedded Node.js runtime deployment.
 [2025-05-02T10:40:42.839] [sonarlint-analysis-scheduler] INFO org.sonar.plugins.javascript.bridge.BridgeServerImpl - Running in SonarLint context, metrics will not be computed.
 [2025-05-02T10:40:42.84] [sonarlint-analysis-scheduler] INFO org.sonar.plugins.javascript.nodejs.NodeCommandBuilderImpl - Using Node.js executable C:\Users\nplotnik\nvmlink\node.exe from property sonar.nodejs.executable.

so i manually overrode this by setting a property. those INFO lines go away when i restarted and instead seeing this (truncated for brevity)

[2025-05-02T12:14:56.996] [sonarlint-analysis-scheduler]

INFO sonarlint - Starting analysis with configuration: [
  baseDir: C:\REDACTED
  extraProperties: {sonar.nodejs.executable=C:\Users\nplotnik\AppData\Roaming\nvm\v20.15.1\node.exe

but typescript scan still not working…and I still get the error

Hello @NPlot, what you need is a User Token, if you use a Project Analysis Token it will not work with SonarQube for IDE.

Regarding your Node.js issue, our setting works as follows:

  • If you have manually set a Node.js in the SonarQube for IDE settings, it will always use this value
  • Else:
    • If you are using WebStorm and you have a Node.js set in the IDE settings, it will use this one
    • Else, it will automatically use the Node.js from your path

What I suggest is that you manually select the path of the Node.js you want to use with SonarQube for IDE:

so i manually overrode this by setting a property

I suggest not overriding such properties. If you still notice any issue, please send us the full SQ:IDE logs from the startup of the IDE. You should see the following:

 [2025-05-05T14:50:42.402] [SonarLint Server RPC request executor] DEBUG sonarlint - Node.js path provided by configuration: /home/nicolas.quinquenel/.nvm/versions/node/v22.15.0/bin/node
 [2025-05-05T14:50:42.402] [SonarLint Server RPC request executor] DEBUG sonarlint - Checking node version...
 [2025-05-05T14:50:42.402] [SonarLint Server RPC request executor] DEBUG sonarlint - Execute command '/home/nicolas.quinquenel/.nvm/versions/node/v22.15.0/bin/node -v'...
 [2025-05-05T14:50:42.406] [SonarLint Server RPC request executor] DEBUG sonarlint - Command '/home/nicolas.quinquenel/.nvm/versions/node/v22.15.0/bin/node -v' exited with 0
stdout: v22.15.0
 [2025-05-05T14:50:42.407] [SonarLint Server RPC request executor] DEBUG sonarlint - Detected node version: 22.15.0
 [2025-05-05T14:50:42.407] [SonarLint Server RPC request executor] DEBUG sonarlint - Node.js path set to: /home/nicolas.quinquenel/.nvm/versions/node/v22.15.0/bin/node (version 22.15.0)

The usage of User Token has resolved the Exceptions, thanks!

still looking at the typescript…

here are the relevant logs from IDE startup.
Also here is the plugin config:

Listed 6 files for cppEar in 7 ms
 [2025-05-05T14:27:29.208] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Binding suggestion computation queued for config scopes 'cppCore,cpp,cppEmbeddedDb,cppBase,cppWS,cppNg,cppBatch,cppEar'...
 [2025-05-05T14:27:29.21] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Synchronizing new configuration scopes: [cppCore, cpp, cppEmbeddedDb, cppBase, cppWS, cppNg, cppBatch, cppEar]
 [2025-05-05T14:27:29.217] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Node.js path provided by configuration: C:\Users\nplotnik\nvmlink\node.exe
 [2025-05-05T14:27:29.217] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Checking node version...
 [2025-05-05T14:27:29.221] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Execute command 'C:\Users\nplotnik\nvmlink\node.exe -v'...
 [2025-05-05T14:27:29.251] [Binding Suggestion Provider] DEBUG sonarlint - Configuration scope 'cppCore' has binding suggestions disabled.
 [2025-05-05T14:27:29.251] [Binding Suggestion Provider] DEBUG sonarlint - Configuration scope 'cpp' has binding suggestions disabled.
 [2025-05-05T14:27:29.251] [Binding Suggestion Provider] DEBUG sonarlint - Configuration scope 'cppEmbeddedDb' has binding suggestions disabled.
 [2025-05-05T14:27:29.251] [Binding Suggestion Provider] DEBUG sonarlint - Configuration scope 'cppBase' has binding suggestions disabled.
 [2025-05-05T14:27:29.251] [Binding Suggestion Provider] DEBUG sonarlint - Configuration scope 'cppWS' has binding suggestions disabled.
 [2025-05-05T14:27:29.251] [Binding Suggestion Provider] DEBUG sonarlint - Configuration scope 'cppNg' has binding suggestions disabled.
 [2025-05-05T14:27:29.251] [Binding Suggestion Provider] DEBUG sonarlint - Configuration scope 'cppBatch' has binding suggestions disabled.
 [2025-05-05T14:27:29.251] [Binding Suggestion Provider] DEBUG sonarlint - Configuration scope 'cppEar' has binding suggestions disabled.
 [2025-05-05T14:27:29.514] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Command 'C:\Users\nplotnik\nvmlink\node.exe -v' exited with 0
stdout: v16.20.2
 [2025-05-05T14:27:29.514] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Detected node version: 16.20.2
 [2025-05-05T14:27:29.515] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Node.js path set to: C:\Users\nplotnik\nvmlink\node.exe (version 16.20.2)
 [2025-05-05T14:27:29.579] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Plugin 'JavaScript/TypeScript/CSS Code Quality and Security' requires Node.js 18.17.0 while current is 16.20.2. Skip loading it.

I am noticing one interesting thing and will post in my next reply to keep it clean

So after startup, i then go to the plugin and just view the configuration, but i dont make any changes. The logs then show this (abbreviated to show relevant):

 [2025-05-05T14:40:09.86] [SonarLint Server RPC request executor] DEBUG sonarlint - Node.js path provided by configuration: C:\Users\nplotnik\AppData\Roaming\nvm\v20.15.1\node.exe
 [2025-05-05T14:40:09.86] [SonarLint Server RPC request executor] DEBUG sonarlint - Checking node version...
 [2025-05-05T14:40:09.86] [SonarLint Server RPC request executor] DEBUG sonarlint - Execute command 'C:\Users\nplotnik\AppData\Roaming\nvm\v20.15.1\node.exe -v'...
 [2025-05-05T14:40:09.945] [SonarLint Server RPC request executor] DEBUG sonarlint - Command 'C:\Users\nplotnik\AppData\Roaming\nvm\v20.15.1\node.exe -v' exited with 0
stdout: v20.15.1
 [2025-05-05T14:40:09.945] [SonarLint Server RPC request executor] DEBUG sonarlint - Detected node version: 20.15.1
 [2025-05-05T14:40:09.945] [SonarLint Server RPC request executor] DEBUG sonarlint - Node.js path set to: C:\Users\nplotnik\AppData\Roaming\nvm\v20.15.1\node.exe (version 20.15.1)

and then i run a scan on the .ts file and it has the logs shown in the uploaded file.
new 2.log (105.7 KB)

the scan still doesnt show any of the issues.

If you like i can change my nvm active version to 20.x and then try again and show the logs.

Hey @NPlot, I apologize for the late reply on our side.

I managed to reproduce the issue you described, and you were effectively right. It seems that we still use the default Node.js and not the one saved in the settings upon restart.

I created this bug ticket that we will tackle ASAP, thanks for your help.

1 Like

Thank you so much for finding this and letting me know.

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