Error in Sonarlint for IntelliJ 2024.2.2 (Ultimate Edition)

Please provide

  • Operating system: macOS Sonoma version 14.6.1
  • SonarLint plugin version: 10.9.0.79423
  • IntelliJ version: 2024.2.2 (Ultimate Edition)
  • Programming language you’re coding in: Java
  • Is connected mode used: No
    • Connected to SonarCloud or SonarQube (and which version):

And a thorough description of the problem / question:
Starting the SonarLint service process…
Listing SonarLint service files:

[2024-09-19T22:37:01.515524] [ApplicationImpl pooled thread 1] INFO org.sonarsource.sonarlint.core.rpc.client.SloopLauncher - Using JRE from /Applications/IntelliJ IDEA.app/Contents/jbr/Contents/Home
Migrating the storage...
Listening for SonarLint service exit...
Initializing the SonarLint service...
Cannot start the SonarLint service
java.lang.NullPointerException
	at org.sonarlint.intellij.core.BackendService.toSonarCloudBackendConnection(BackendService.kt:489)
	at org.sonarlint.intellij.core.BackendService.initRpcServer(BackendService.kt:298)
	at org.sonarlint.intellij.core.BackendService.access$initRpcServer(BackendService.kt:159)
	at org.sonarlint.intellij.core.BackendService$createServiceStartingTask$1.run(BackendService.kt:237)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:477)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:133)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:528)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:249)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:221)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:49)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:220)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:249)
	at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:501)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:466)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:97)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:92)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:464)
	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.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
	at java.base/java.lang.Thread.run(Thread.java:1583)

 [2024-09-19T22:37:01.958] [main] INFO org.sonarsource.sonarlint.core.rpc.impl.SonarLintRpcServerImpl - SonarLint backend started, instance=org.sonarsource.sonarlint.core.rpc.impl.SonarLintRpcServerImpl@7d446ed1
Error when retrieving excluded files
java.util.concurrent.CompletionException: java.util.concurrent.CancellationException
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
	at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1177)
	at java.base/java.util.concurrent.CompletableFuture.thenComposeAsync(CompletableFuture.java:2346)
	at org.sonarlint.intellij.core.BackendService.requestFromBackend(BackendService.kt:204)
	at org.sonarlint.intellij.core.BackendService.getExcludedFiles(BackendService.kt:858)
	at org.sonarlint.intellij.ui.AutoTriggerStatusPanel.handleExcludedFiles(AutoTriggerStatusPanel.java:126)
	at org.sonarlint.intellij.ui.AutoTriggerStatusPanel.lambda$switchCards$2(AutoTriggerStatusPanel.java:113)
	at org.sonarlint.intellij.util.ThreadUtilsKt.runOnPooledThread$lambda$1(ThreadUtils.kt:38)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$1.run(AnyThreadWriteThreadingSupport.kt:134)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:32)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
	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.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.util.concurrent.CancellationException
	at java.base/java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:2510)
	at org.sonarlint.intellij.core.BackendService$createServiceStartingTask$1.run(BackendService.kt:250)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:477)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:133)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:528)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:249)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:221)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:49)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:220)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:249)
	at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:501)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:466)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:97)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:92)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:464)
	... 7 more

Analysis skipped as the engine is not ready yet
Analysis skipped as the engine is not ready yet
Analysis skipped as the engine is not ready yet
Could not load rules: java.util.concurrent.CancellationException

Hi @Le_Vu ,

Thank you for sharing this with us.

I created this ticket and should be fixed after it is merged:
https://sonarsource.atlassian.net/browse/SLI-1612

Hi folks ,

I can use the plugin now, but the solution here I have to remove all of the files that were related to Jetbrain and Sonarlint, then install back again.

Hi @Le_Vu, could it be that you had very old connections within your SonarLint and that you updated recently your SonarLint version?

This error is caused by having a SonarCloud connection without an organization, which used to be possible in SonarLint a long time ago.