Error in SonarLint for IntelliJ

Environment:

  • Java: JetBrains s.r.o. 21.0.4
  • OS: Windows 10 amd64
  • IDE: PhpStorm 2024.2.3
  • SonarLint: 10.11.1.79663
java.lang.IllegalStateException: There is no ProgressIndicator or Job in this thread, the current job is not cancellable.
	at c.ij.oa.progress.CoroutinesKt$runBlockingCancellable$1.invoke(coroutines.kt:141)
	at c.ij.oa.progress.CoroutinesKt$runBlockingCancellable$1.invoke(coroutines.kt:139)
	at c.ij.oa.progress.ContextKt.prepareThreadContext(context.kt:85)
	at c.ij.oa.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:139)
	at c.ij.oa.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:122)
	at c.ij.execution.wsl.WslIjentUtil.fetchLoginShellEnv(WslIjentUtil.kt:36)
	at c.ij.execution.wsl.WSLDistribution.getEnvironmentVariable(WSLDistribution.java:795)
	at git4idea.config.GitExecutableKt.computeWslSupportedLocaleKey(GitExecutable.kt:204)
	at git4idea.config.GitExecutableKt.access$computeWslSupportedLocaleKey(GitExecutable.kt:1)
	at git4idea.config.GitExecutable$Wsl$getLocaleEnv$envMap$1.invoke(GitExecutable.kt:165)
	at git4idea.config.GitExecutable$Wsl$getLocaleEnv$envMap$1.invoke(GitExecutable.kt:164)
	at git4idea.repo.GitConfigurationCacheBase.computeCachedValue(GitConfigurationCache.kt:105)
	at git4idea.config.GitExecutable$Wsl.getLocaleEnv(GitExecutable.kt:164)
	at git4idea.commands.GitHandler.prepareEnvironment(GitHandler.java:490)
	at git4idea.commands.GitHandler.start(GitHandler.java:464)
	at git4idea.commands.GitHandler.runInCurrentThread(GitHandler.java:408)
	at git4idea.commands.GitImplBase.doRun(GitImplBase.java:199)
	at git4idea.commands.GitImplBase.run(GitImplBase.java:162)
	at git4idea.commands.GitImplBase.runCommand(GitImplBase.java:62)
	at git4idea.history.GitHistoryUtils.getMergeBase(GitHistoryUtils.java:291)
	at o.sl.ij.git.GitRepo.distance(GitRepo.kt:77)
	at o.sl.ij.git.GitRepo.electBestMatchingServerBranchForCurrentHead(GitRepo.kt:45)
	at o.sl.ij.SonarLintIntelliJClient.matchSonarProjectBranch(SonarLintIntelliJClient.kt:629)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$matchSonarProjectBranch$27(SonarLintRpcClientImpl.java:308)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$requestAsync$1(SonarLintRpcClientImpl.java:124)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	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)

Hi,

Welcome to the community and thanks for this report!

Could you share what you were doing when this happened?

 
Thx,
Ann

Hello @rohit-jalmi_pacol, thank you for notifying us about that.

We are already aware of this, and a fix will be provided on our next release; here is the bug ticket for reference. Also, please note that this should primarily be a loud error, and can be safely ignored.