SonarQube for IDE keeps losing connection to SonarQube Cloud

  • Operating system: MacOS 15.5
  • SonarQube for VS Code plugin version: 4.23.0
  • Programming language you’re coding in: C++
  • Is connected mode used: SonarQube Cloud

SonarQube for IDE keeps losing connection to SonarQube Cloud, and shutting down the server because it cannot reconnect.

After I restart the extension host, things work normally for a while, until they break again.
In some instances, it would still not reconnect and I had to kill the Java process.

Log file attached.
Sonar.log (266.3 KB)

Today I start getting popups 10 minutes after restarting the extension host. Another restart gives me another 10 minutes. This is not sustainable.

Extra logging:

2025-06-15 17:17:18.663 [info] [Trace - 5:17:18 PM] Sending request 'textDocument/codeAction - (79)'.
2025-06-15 17:17:18.663 [info] Params: {
    "textDocument": {
        "uri": "file:///Users/oren/work/rpp-server-2/framework/grpc_manager/rpp_grpc_server_disp.h"
    },
    "range": {
        "start": {
            "line": 1772,
            "character": 79
        },
        "end": {
            "line": 1772,
            "character": 79
        }
    },
    "context": {
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 1772,
                        "character": 33
                    },
                    "end": {
                        "line": 1772,
                        "character": 96
                    }
                },
                "message": "Pass large object \"reqRespOverrideFn\" by reference to const.",
                "data": {
                    "entryKey": "a875203d-6490-4ce6-b31e-19bb604958c2"
                },
                "code": "cpp:S1238",
                "severity": 2,
                "source": "sonarqube"
            }
        ],
        "triggerKind": 2
    }
}


2025-06-15 17:17:19.097 [info] [Trace - 5:17:19 PM] Received notification 'window/logMessage'.
2025-06-15 17:17:19.097 [info] Params: {
    "type": 4,
    "message": "[Error - 17:17:19.097] [org.eclipse.lsp4j.jsonrpc.RemoteEndpoint : SonarLint Server RPC request executor] Internal error: org.sonarsource.sonarlint.core.serverapi.exception.UnexpectedBodyException: No issue found with key 'a875203d-6490-4ce6-b31e-19bb604958c2'"
}


2025-06-15 17:17:19.097 [info] [Error - 17:17:19.097] [org.eclipse.lsp4j.jsonrpc.RemoteEndpoint : SonarLint Server RPC request executor] Internal error: org.sonarsource.sonarlint.core.serverapi.exception.UnexpectedBodyException: No issue found with key 'a875203d-6490-4ce6-b31e-19bb604958c2'
2025-06-15 17:17:19.097 [info] [Trace - 5:17:19 PM] Received notification 'window/logMessage'.
2025-06-15 17:17:19.097 [info] Params: {
    "type": 4,
    "message": "[Error - 17:17:19.097] [org.eclipse.lsp4j.jsonrpc.RemoteEndpoint : SonarLint Server RPC request executor] java.util.concurrent.CompletionException: org.sonarsource.sonarlint.core.serverapi.exception.UnexpectedBodyException: No issue found with key 'a875203d-6490-4ce6-b31e-19bb604958c2'\n\tat java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)\n\tat java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)\n\tat java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)\n\tat java.base/java.util.concurrent.CompletableFuture$Completion.run(Unknown Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\n\tat java.base/java.lang.Thread.run(Unknown Source)\nCaused by: org.sonarsource.sonarlint.core.serverapi.exception.UnexpectedBodyException: No issue found with key 'a875203d-6490-4ce6-b31e-19bb604958c2'\n\tat org.sonarsource.sonarlint.core.serverapi.issue.IssueApi.searchByKey(IssueApi.java:247)\n\tat org.sonarsource.sonarlint.core.issue.IssueService.lambda$checkStatusChangePermitted$9(IssueService.java:208)\n\tat java.base/java.util.Optional.orElseGet(Unknown Source)\n\tat org.sonarsource.sonarlint.core.issue.IssueService.lambda$checkStatusChangePermitted$10(IssueService.java:207)\n\tat org.sonarsource.sonarlint.core.connection.SonarQubeClient.withClientApiAndReturn(SonarQubeClient.java:58)\n\tat org.sonarsource.sonarlint.core.issue.IssueService.checkStatusChangePermitted(IssueService.java:193)\n\tat org.sonarsource.sonarlint.core.rpc.impl.IssueRpcServiceDelegate.lambda$checkStatusChangePermitted$3(IssueRpcServiceDelegate.java:68)\n\tat org.sonarsource.sonarlint.core.rpc.impl.AbstractRpcServiceDelegate.lambda$requestAsync$0(AbstractRpcServiceDelegate.java:67)\n\tat org.sonarsource.sonarlint.core.rpc.impl.AbstractRpcServiceDelegate.computeWithLogger(AbstractRpcServiceDelegate.java:154)\n\tat org.sonarsource.sonarlint.core.rpc.impl.AbstractRpcServiceDelegate.lambda$requestAsync$1(AbstractRpcServiceDelegate.java:65)\n\t... 5 common frames omitted\n"
}


2025-06-15 17:17:19.097 [info] [Error - 17:17:19.097] [org.eclipse.lsp4j.jsonrpc.RemoteEndpoint : SonarLint Server RPC request executor] java.util.concurrent.CompletionException: org.sonarsource.sonarlint.core.serverapi.exception.UnexpectedBodyException: No issue found with key 'a875203d-6490-4ce6-b31e-19bb604958c2'
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$Completion.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: org.sonarsource.sonarlint.core.serverapi.exception.UnexpectedBodyException: No issue found with key 'a875203d-6490-4ce6-b31e-19bb604958c2'
	at org.sonarsource.sonarlint.core.serverapi.issue.IssueApi.searchByKey(IssueApi.java:247)
	at org.sonarsource.sonarlint.core.issue.IssueService.lambda$checkStatusChangePermitted$9(IssueService.java:208)
	at java.base/java.util.Optional.orElseGet(Unknown Source)
	at org.sonarsource.sonarlint.core.issue.IssueService.lambda$checkStatusChangePermitted$10(IssueService.java:207)
	at org.sonarsource.sonarlint.core.connection.SonarQubeClient.withClientApiAndReturn(SonarQubeClient.java:58)
	at org.sonarsource.sonarlint.core.issue.IssueService.checkStatusChangePermitted(IssueService.java:193)
	at org.sonarsource.sonarlint.core.rpc.impl.IssueRpcServiceDelegate.lambda$checkStatusChangePermitted$3(IssueRpcServiceDelegate.java:68)
	at org.sonarsource.sonarlint.core.rpc.impl.AbstractRpcServiceDelegate.lambda$requestAsync$0(AbstractRpcServiceDelegate.java:67)
	at org.sonarsource.sonarlint.core.rpc.impl.AbstractRpcServiceDelegate.computeWithLogger(AbstractRpcServiceDelegate.java:154)
	at org.sonarsource.sonarlint.core.rpc.impl.AbstractRpcServiceDelegate.lambda$requestAsync$1(AbstractRpcServiceDelegate.java:65)
	... 5 common frames omitted

2025-06-15 17:17:19.098 [info] [Trace - 5:17:19 PM] Received notification 'window/logMessage'.
2025-06-15 17:17:19.098 [info] Params: {
    "type": 4,
    "message": "[Warn - 17:17:19.098] Future computation completed with an exception\njava.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.\n\tat java.base/java.util.concurrent.CompletableFuture.reportGet(Unknown Source)\n\tat java.base/java.util.concurrent.CompletableFuture.get(Unknown Source)\n\tat org.sonarsource.sonarlint.ls.util.Utils.safelyGetCompletableFuture(Utils.java:174)\n\tat org.sonarsource.sonarlint.ls.CommandManager.createResolveIssueCodeAction(CommandManager.java:250)\n\tat org.sonarsource.sonarlint.ls.CommandManager.computeCodeActionsForSonarLintIssues(CommandManager.java:225)\n\tat org.sonarsource.sonarlint.ls.CommandManager.computeCodeActions(CommandManager.java:171)\n\tat org.sonarsource.sonarlint.ls.SonarLintLanguageServer.lambda$codeAction$4(SonarLintLanguageServer.java:438)\n\tat java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)\n\tat java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)\n\tat java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)\n\tat java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)\n\tat java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)\n\tat java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)\n\tat java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)\nCaused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.\n\tat org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:220)\n\tat org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:204)\n\tat org.sonarsource.sonarlint.core.rpc.protocol.SingleThreadedMessageConsumer.lambda$new$0(SingleThreadedMessageConsumer.java:49)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\n\tat java.base/java.lang.Thread.run(Unknown Source)\n"
}


2025-06-15 17:17:19.098 [info] [Warn - 17:17:19.098] Future computation completed with an exception
java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
	at java.base/java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.get(Unknown Source)
	at org.sonarsource.sonarlint.ls.util.Utils.safelyGetCompletableFuture(Utils.java:174)
	at org.sonarsource.sonarlint.ls.CommandManager.createResolveIssueCodeAction(CommandManager.java:250)
	at org.sonarsource.sonarlint.ls.CommandManager.computeCodeActionsForSonarLintIssues(CommandManager.java:225)
	at org.sonarsource.sonarlint.ls.CommandManager.computeCodeActions(CommandManager.java:171)
	at org.sonarsource.sonarlint.ls.SonarLintLanguageServer.lambda$codeAction$4(SonarLintLanguageServer.java:438)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:220)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:204)
	at org.sonarsource.sonarlint.core.rpc.protocol.SingleThreadedMessageConsumer.lambda$new$0(SingleThreadedMessageConsumer.java:49)
	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)

Here’s another one, a couple of seconds after killing the java processes and restarting the extension host:

2025-06-15 17:28:20.771 [info] [Trace - 5:28:20 PM] Received response 'textDocument/codeAction - (82)' in 12ms.
2025-06-15 17:28:20.771 [info] Result: [
    {
        "title": "SonarQube: Change to pointer-to-const",
        "kind": "quickfix",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 739,
                        "character": 27
                    },
                    "end": {
                        "line": 739,
                        "character": 55
                    }
                },
                "severity": 2,
                "code": "cpp:S995",
                "source": "sonarqube",
                "message": "Make the type of this parameter a pointer-to-const. The current type of \"rri\" is \"class rpp::ISrvGrpcReqRespInstance *\".",
                "data": {
                    "entryKey": "88296894-8cbf-4176-8f22-834794900cd0"
                }
            }
        ],
        "edit": {
            "changes": {},
            "documentChanges": [
                {
                    "textDocument": {
                        "version": null,
                        "uri": "file:///Users/oren/work/rpp-server-2/framework/grpc_manager/rpp_grpc_server_disp.h"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 739,
                                    "character": 50
                                },
                                "end": {
                                    "line": 739,
                                    "character": 50
                                }
                            },
                            "newText": " const"
                        }
                    ]
                }
            ]
        },
        "command": {
            "title": "Change to pointer-to-const",
            "command": "SonarLint.QuickFixApplied",
            "arguments": [
                "cpp:S995"
            ]
        }
    },
    {
        "title": "SonarQube: Show issue details for 'cpp:S995'",
        "kind": "quickfix",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 739,
                        "character": 27
                    },
                    "end": {
                        "line": 739,
                        "character": 55
                    }
                },
                "severity": 2,
                "code": "cpp:S995",
                "source": "sonarqube",
                "message": "Make the type of this parameter a pointer-to-const. The current type of \"rri\" is \"class rpp::ISrvGrpcReqRespInstance *\".",
                "data": {
                    "entryKey": "88296894-8cbf-4176-8f22-834794900cd0"
                }
            }
        ],
        "command": {
            "title": "Show issue details for 'cpp:S995'",
            "command": "SonarLint.ShowIssueDetailsCodeAction",
            "arguments": [
                "88296894-8cbf-4176-8f22-834794900cd0",
                "file:///Users/oren/work/rpp-server-2/framework/grpc_manager/rpp_grpc_server_disp.h"
            ]
        }
    }
]


2025-06-15 17:28:20.771 [info] [Trace - 5:28:20 PM] Received notification 'window/logMessage'.
2025-06-15 17:28:20.771 [info] Params: {
    "type": 4,
    "message": "[Error - 17:28:20.764] [com.sonar.cpp.analyzer.AnalysisExecutor : pool-21-thread-1] Exception in thread pool-21-thread-1"
}


2025-06-15 17:28:20.771 [info] [Error - 17:28:20.764] [com.sonar.cpp.analyzer.AnalysisExecutor : pool-21-thread-1] Exception in thread pool-21-thread-1
2025-06-15 17:28:20.772 [info] [Trace - 5:28:20 PM] Received notification 'window/logMessage'.
2025-06-15 17:28:20.772 [info] Params: {
    "type": 4,
    "message": "[Error - 17:28:20.764] [com.sonar.cpp.analyzer.AnalysisExecutor : pool-21-thread-1] com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code 143: /Users/oren/work/rpp-server-2/framework/grpc_manager/rpp_grpc_server_disp.h\n\tat com.sonar.cpp.plugin.SonarLintSensor.lambda$execute$10(SonarLintSensor.java:420)\n\tat com.sonar.cpp.analyzer.Subprocess.executeImpl(Subprocess.java:127)\n\tat com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:159)\n\tat com.sonar.cpp.plugin.SonarLintSensor.execute(SonarLintSensor.java:403)\n\tat com.sonar.cpp.plugin.SonarLintSensor.executeWithPreamble(SonarLintSensor.java:452)\n\tat com.sonar.cpp.plugin.SonarLintSensor.lambda$process$5(SonarLintSensor.java:388)\n\tat com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:58)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)\n\tat java.base/java.util.concurrent.FutureTask.run(Unknown Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\n\tat java.base/java.lang.Thread.run(Unknown Source)\n"
}


2025-06-15 17:28:20.772 [info] [Error - 17:28:20.764] [com.sonar.cpp.analyzer.AnalysisExecutor : pool-21-thread-1] com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code 143: /Users/oren/work/rpp-server-2/framework/grpc_manager/rpp_grpc_server_disp.h
	at com.sonar.cpp.plugin.SonarLintSensor.lambda$execute$10(SonarLintSensor.java:420)
	at com.sonar.cpp.analyzer.Subprocess.executeImpl(Subprocess.java:127)
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:159)
	at com.sonar.cpp.plugin.SonarLintSensor.execute(SonarLintSensor.java:403)
	at com.sonar.cpp.plugin.SonarLintSensor.executeWithPreamble(SonarLintSensor.java:452)
	at com.sonar.cpp.plugin.SonarLintSensor.lambda$process$5(SonarLintSensor.java:388)
	at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:58)
	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)

Hi,

The current version of SonarQube for VSCode (formerly SonarLint) is 4.24. Can you upgrade and see if this is still replicable?

 
Thx,
Ann

I am using 4.24 (the extension updated since I composed the first message).

Here is an excerpt from the output, with errors:

2025-06-16 14:41:05.942 [info] [Info - 14:41:05.941] [sonarlint : sonarlint-analysis-scheduler] Analysis detected 0 issues and 0 Security Hotspots in 1206ms
2025-06-16 14:41:05.951 [info] [Trace - 2:41:05 PM] Received notification 'textDocument/publishDiagnostics'.
2025-06-16 14:41:05.951 [info] Params: {
    "uri": "file:///Users/oren/Sonar/default-pl-sql.xml",
    "diagnostics": []
}


2025-06-16 14:41:05.951 [info] [Trace - 2:41:05 PM] Received notification 'textDocument/publishDiagnostics'.
2025-06-16 14:41:05.951 [info] Params: {
    "uri": "file:///Users/oren/Sonar/pl-sql.xml",
    "diagnostics": []
}


2025-06-16 14:41:05.952 [info] [Trace - 2:41:05 PM] Received notification '$/progress'.
2025-06-16 14:41:05.952 [info] Params: {
    "token": "c23d4bd6-dd77-46bf-a797-b82615c8ce9e",
    "value": {
        "kind": "end"
    }
}


2025-06-16 14:41:05.972 [info] [Trace - 2:41:05 PM] Received notification 'window/logMessage'.
2025-06-16 14:41:05.972 [info] Params: {
    "type": 4,
    "message": "[Info - 14:41:05.971] [org.sonar.iac.kubernetes.plugin.SonarLintFileListener : sonarlint-analysis-scheduler] Module file event for CREATED for file [uri=file:///Users/oren/work/rpp-server/rpp_client_gateway_server/client_gateway_service.h] has been ignored because it's not a Kubernetes file."
}


2025-06-16 14:41:05.972 [info] [Info - 14:41:05.971] [org.sonar.iac.kubernetes.plugin.SonarLintFileListener : sonarlint-analysis-scheduler] Module file event for CREATED for file [uri=file:///Users/oren/work/rpp-server/rpp_client_gateway_server/client_gateway_service.h] has been ignored because it's not a Kubernetes file.
2025-06-16 14:41:05.973 [info] [Trace - 2:41:05 PM] Received notification 'sonarlint/reportConnectionCheckResult'.
2025-06-16 14:41:05.973 [info] Params: {
    "connectionId": "rio-rmg",
    "success": true
}


2025-06-16 14:41:06.348 [info] [Trace - 2:41:06 PM] Received notification 'window/logMessage'.
2025-06-16 14:41:06.348 [info] Params: {
    "type": 4,
    "message": "[Info - 14:41:06.348] [sonarlint : SonarLint Local Storage Synchronizer] Downloaded 'textenterprise' in 877ms"
}


2025-06-16 14:41:06.348 [info] [Info - 14:41:06.348] [sonarlint : SonarLint Local Storage Synchronizer] Downloaded 'textenterprise' in 877ms
2025-06-16 14:41:06.362 [info] [Trace - 2:41:06 PM] Received notification 'window/logMessage'.
2025-06-16 14:41:06.362 [info] Params: {
    "type": 4,
    "message": "[Error - 14:41:06.361] [sonarlint : sonarlint-analysis-scheduler] Error during analysis"
}


2025-06-16 14:41:06.362 [info] [Error - 14:41:06.361] [sonarlint : sonarlint-analysis-scheduler] Error during analysis
2025-06-16 14:41:06.362 [info] [Trace - 2:41:06 PM] Received notification 'window/logMessage'.
2025-06-16 14:41:06.362 [info] Params: {
    "type": 4,
    "message": "[Error - 14:41:06.361] [sonarlint : sonarlint-analysis-scheduler] java.lang.IllegalStateException: Unable to extract rules metadata\n\tat org.sonarsource.sonarlint.core.rule.extractor.RulesDefinitionExtractor.extractRules(RulesDefinitionExtractor.java:42)\n\tat org.sonarsource.sonarlint.core.rules.RulesExtractionHelper.extractRulesForConnection(RulesExtractionHelper.java:55)\n\tat org.sonarsource.sonarlint.core.repository.rules.RulesRepository.lazyInit(RulesRepository.java:81)\n\tat org.sonarsource.sonarlint.core.repository.rules.RulesRepository.getRule(RulesRepository.java:72)\n\tat org.sonarsource.sonarlint.core.analysis.AnalysisService.tryConvertDeprecatedKeys(AnalysisService.java:396)\n\tat org.sonarsource.sonarlint.core.analysis.AnalysisService.lambda$buildConnectedActiveRules$7(AnalysisService.java:326)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)\n\tat java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)\n\tat java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source)\n\tat java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)\n\tat java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)\n\tat java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)\n\tat java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)\n\tat org.sonarsource.sonarlint.core.analysis.AnalysisService.buildConnectedActiveRules(AnalysisService.java:319)\n\tat org.sonarsource.sonarlint.core.analysis.AnalysisService.lambda$getAnalysisConfig$2(AnalysisService.java:283)\n\tat java.base/java.util.Optional.map(Unknown Source)\n\tat org.sonarsource.sonarlint.core.analysis.AnalysisService.getAnalysisConfig(AnalysisService.java:279)\n\tat org.sonarsource.sonarlint.core.analysis.AnalysisService.getAnalysisConfigForEngine(AnalysisService.java:249)\n\tat org.sonarsource.sonarlint.core.analysis.AnalysisService.lambda$getAnalyzeCommand$36(AnalysisService.java:768)\n\tat org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:122)\n\tat org.sonarsource.sonarlint.core.analysis.AnalysisScheduler.executeQueuedCommands(AnalysisScheduler.java:75)\n\tat java.base/java.lang.Thread.run(Unknown Source)\nCaused by: java.lang.IllegalStateException: Unable to load component class org.sonarsource.sonarlint.core.rule.extractor.RuleDefinitionsLoader\n\tat org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.getComponentByType(SpringComponentContainer.java:130)\n\tat org.sonarsource.sonarlint.core.rule.extractor.RulesDefinitionExtractorContainer.doAfterStart(RulesDefinitionExtractorContainer.java:79)\n\tat org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:180)\n\tat org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:159)\n\tat org.sonarsource.sonarlint.core.rule.extractor.RulesDefinitionExtractor.extractRules(RulesDefinitionExtractor.java:39)\n\t... 23 more\nCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@1e2e2406-org.sonarsource.sonarlint.core.rule.extractor.RuleDefinitionsLoader': Failed to instantiate [org.sonarsource.sonarlint.core.rule.extractor.RuleDefinitionsLoader]: Constructor threw exception\n\tat org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:321)\n\tat org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:309)\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1395)\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1232)\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:569)\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529)\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339)\n\tat org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373)\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337)\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:227)\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1598)\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1556)\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:563)\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:392)\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:385)\n\tat org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1290)\n\tat org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.getComponentByType(SpringComponentContainer.java:128)\n\t... 27 more\nCaused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonarsource.sonarlint.core.rule.extractor.RuleDefinitionsLoader]: Constructor threw exception\n\tat org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:222)\n\tat org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:145)\n\tat org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:318)\n\t... 43 more\nCaused by: java.lang.NoClassDefFoundError: org/sonar/iac/terraform/checks/azure/SubscriptionRoleAssignmentCheck\n\tat org.sonar.iac.terraform.checks.TerraformCheckList.checks(TerraformCheckList.java:55)\n\tat org.sonar.iac.terraform.plugin.TerraformRulesDefinition.checks(TerraformRulesDefinition.java:37)\n\tat org.sonar.iac.common.extension.IacRulesDefinition.define(IacRulesDefinition.java:42)\n\tat org.sonarsource.sonarlint.core.rule.extractor.RuleDefinitionsLoader.<init>(RuleDefinitionsLoader.java:38)\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(Unknown Source)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)\n\tat java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)\n\tat org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:209)\n\t... 45 more\nCaused by: java.lang.ClassNotFoundException: org.sonar.iac.terraform.checks.azure.SubscriptionRoleAssignmentCheck\n\tat org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)\n\tat org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)\n\tat org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)\n\t... 53 more\n"
}


2025-06-16 14:41:06.362 [info] [Error - 14:41:06.361] [sonarlint : sonarlint-analysis-scheduler] java.lang.IllegalStateException: Unable to extract rules metadata
	at org.sonarsource.sonarlint.core.rule.extractor.RulesDefinitionExtractor.extractRules(RulesDefinitionExtractor.java:42)
	at org.sonarsource.sonarlint.core.rules.RulesExtractionHelper.extractRulesForConnection(RulesExtractionHelper.java:55)
	at org.sonarsource.sonarlint.core.repository.rules.RulesRepository.lazyInit(RulesRepository.java:81)
	at org.sonarsource.sonarlint.core.repository.rules.RulesRepository.getRule(RulesRepository.java:72)
	at org.sonarsource.sonarlint.core.analysis.AnalysisService.tryConvertDeprecatedKeys(AnalysisService.java:396)
	at org.sonarsource.sonarlint.core.analysis.AnalysisService.lambda$buildConnectedActiveRules$7(AnalysisService.java:326)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
	at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
	at org.sonarsource.sonarlint.core.analysis.AnalysisService.buildConnectedActiveRules(AnalysisService.java:319)
	at org.sonarsource.sonarlint.core.analysis.AnalysisService.lambda$getAnalysisConfig$2(AnalysisService.java:283)
	at java.base/java.util.Optional.map(Unknown Source)
	at org.sonarsource.sonarlint.core.analysis.AnalysisService.getAnalysisConfig(AnalysisService.java:279)
	at org.sonarsource.sonarlint.core.analysis.AnalysisService.getAnalysisConfigForEngine(AnalysisService.java:249)
	at org.sonarsource.sonarlint.core.analysis.AnalysisService.lambda$getAnalyzeCommand$36(AnalysisService.java:768)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:122)
	at org.sonarsource.sonarlint.core.analysis.AnalysisScheduler.executeQueuedCommands(AnalysisScheduler.java:75)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonarsource.sonarlint.core.rule.extractor.RuleDefinitionsLoader
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.getComponentByType(SpringComponentContainer.java:130)
	at org.sonarsource.sonarlint.core.rule.extractor.RulesDefinitionExtractorContainer.doAfterStart(RulesDefinitionExtractorContainer.java:79)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:180)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:159)
	at org.sonarsource.sonarlint.core.rule.extractor.RulesDefinitionExtractor.extractRules(RulesDefinitionExtractor.java:39)
	... 23 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@1e2e2406-org.sonarsource.sonarlint.core.rule.extractor.RuleDefinitionsLoader': Failed to instantiate [org.sonarsource.sonarlint.core.rule.extractor.RuleDefinitionsLoader]: Constructor threw exception
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:321)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:309)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1395)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1232)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:569)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:227)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1598)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1556)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:563)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:392)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:385)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1290)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.getComponentByType(SpringComponentContainer.java:128)
	... 27 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonarsource.sonarlint.core.rule.extractor.RuleDefinitionsLoader]: Constructor threw exception
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:222)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:145)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:318)
	... 43 more
Caused by: java.lang.NoClassDefFoundError: org/sonar/iac/terraform/checks/azure/SubscriptionRoleAssignmentCheck
	at org.sonar.iac.terraform.checks.TerraformCheckList.checks(TerraformCheckList.java:55)
	at org.sonar.iac.terraform.plugin.TerraformRulesDefinition.checks(TerraformRulesDefinition.java:37)
	at org.sonar.iac.common.extension.IacRulesDefinition.define(IacRulesDefinition.java:42)
	at org.sonarsource.sonarlint.core.rule.extractor.RuleDefinitionsLoader.<init>(RuleDefinitionsLoader.java:38)
	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:209)
	... 45 more
Caused by: java.lang.ClassNotFoundException: org.sonar.iac.terraform.checks.azure.SubscriptionRoleAssignmentCheck
	at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
	... 53 more

Hi,

Thanks for the log. This has been flagged for the experts.

 
Ann

Any news?
I have to restart the extension host every 10 minutes when using the add-on.

Hi Alex,

I understand how frustrating it must be to have the SonarQube extension causing the Extension Host to crash every 10 minutes. We’re actively looking into the exceptions you’re seeing that lead to the core server shutting down. This kind of issue can be tricky to pin down, especially if it’s not easily reproducible on our end.

To help us narrow down the root cause, could you provide a bit more information?

  • Does this issue occur with all projects you open in VS Code, or is it specific to one or a few particular projects?
  • If it’s project-specific, are there any unique characteristics of those projects (e.g., size, specific SonarQube rulesets enabled, or other extensions you’re using in that workspace)?

Any additional details you can share about your setup or the circumstances under which these crashes occur would be greatly appreciated. In the meantime, we’ll continue to dig through the logs and try to replicate the behavior on our side.

Thanks for your patience as we work to resolve this!

1 Like

I only work on one (large) project. Well, two technically, but they are clones.

After the error happens, and I restart the extension host, I notice that there is another instance of java running. I suspect that the java component hung and since the extension host could not communicate with it, it spun off another instance.

In that case, the VSCode log would likely not help since the java component would not get the chance to communicate the error to it.

The VSCode notification often pops up while I am in the middle of editing a C++ or a proto3 file, and the highlighting indicates a syntax error (which would happen when one is in the middle of typing), but that might just be a coincidence.