And a thorough description of the problem / question:
This exception occurs when I save the file:
2025-07-04 12:28:49.086 [info] [Error - 12:28:49.085] [sonarlint : SonarLint Client RPC sequential executor] java.lang.IllegalStateException: Duplicate key 4a32e1a6-5070-4666-9da0-47d64fcba2ca (attempted merging values org.sonarsource.sonarlint.ls.connected.DelegatingIssue@36dd15fc and org.sonarsource.sonarlint.ls.connected.DelegatingIssue@4d471db7)
at java.base/java.util.stream.Collectors.duplicateKeyException(Unknown Source)
at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Unknown Source)
at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(Unknown Source)
at java.base/java.util.AbstractList$RandomAccessSpliterator.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.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
at org.sonarsource.sonarlint.ls.IssuesCache.lambda$reportIssues$3(IssuesCache.java:50)
at java.base/java.util.HashMap.forEach(Unknown Source)
at org.sonarsource.sonarlint.ls.IssuesCache.reportIssues(IssuesCache.java:45)
at org.sonarsource.sonarlint.ls.AnalysisHelper.handleIssues(AnalysisHelper.java:102)
at org.sonarsource.sonarlint.ls.clientapi.SonarLintVSCodeClient.raiseIssues(SonarLintVSCodeClient.java:629)
at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$raiseIssues$34(SonarLintRpcClientImpl.java:363)
at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$notify$4(SonarLintRpcClientImpl.java:150)
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)
When I downgrade the plugin it works as intended (i.e 4.11.1 as I read in this issue)
We’ve reviewed the exception you’re seeing regarding duplicate keys, and we understand this can be a frustrating issue to encounter. We’re actively trying to reproduce it on our end, but it’s not immediately trivial. The logs have given us some indicators of what might be causing it, and we’re currently digging deeper into those leads.
To assist us further in pinpointing the root cause, could you provide some additional 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 that you’ve observed? For example:
What’s the approximate size of the project (e.g., number of files, lines of code)?
Are there a very large number of issues reported in those specific projects?
Are there any particular file types or structures that seem to be consistently present when this issue occurs (like similar file/directory names)?
Any extra details you can provide about your project setup or the circumstances under which this exception appears would be greatly appreciated. Thanks for your patience as we work to resolve this!
I’m also facing this same issue on 4.25.1. I’m on CSharp though
At least for me, the issue seems to be for certain files only in the project.
I’m noticed it consistently with only 1 file so far and i think its either because the file is large(ish) (around 500 lines) or there are a lot of issues (10+). I have a lot of TODOs in this class at the moment, just to keep track of things.
I’ve noticed that if i remove a few of the todo’s then i don’t get this error or maybe because some of the TODO comments are the same.
Hope that is enough info for you to recreate this error?
Edit: I updated to latest 4.27.0 and still getting the same error
I wanted to share an update on this issue. I’ve successfully managed to reproduce the problem and have a better idea of what’s causing it.
The exception seems to be connected to our issue matching logic. Not long ago some changes were applied to improve performance, especially on larger files. These changes may have introduced this new issue.
I’ve created a new ticket in our system to track this bug. You can follow its progress here: Jira . I’ll also post updates directly in this thread so you don’t miss anything.
I’m checking with the team now to make sure we can prioritize and fix this as quickly as possible. My apologies for the slow response, the summer months have been quite busy.