Error in SonarLint for IntelliJ

Environment:

  • Java: JetBrains s.r.o. 21.0.4
  • OS: Linux amd64
  • IDE: WebStorm 2024.2.3
  • SonarLint: 10.11.1.79663
java.lang.IllegalStateException: Missing header Content-Length in input "
"
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:114)
	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.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)

Hello @jhonix22,

Do you have more information about how this issue happened? Did you take any actions that led to it? If it ever happens again, please enable the logs and check for more details.

By chance, are you using nx-console? We were aware of a similar issue from their side, which should have been fixed on more recent versions.

Hi Nicolas,

Yes, I am using nx-console and I wasn’t doing anything unusual, just opened the project from webstorm. And I think it’s the same issue with the one you shared however, I have just recently installed nx-console, so it should be the latest where a fixed was included?

I have the logs below, the error is just popping up randomly:

Starting the SonarLint service process...
Listing SonarLint service files:
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonar-plugin-api-10.11.0.2468.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/kotlin-logging-1.7.9.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-plugin-commons-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/commons-codec-1.15.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/httpcore5-5.2.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/javax.annotation-api-1.3.2.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/xodus-entity-store-2.0.1.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/spring-core-5.3.39.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/guava-32.1.1-jre.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/logback-classic-1.2.13.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-http-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sslcontext-kickstart-8.3.4.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/xodus-compress-2.0.1.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/commons-lang3-3.12.0.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/jul-to-slf4j-1.7.36.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/xodus-vfs-2.0.1.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonar-markdown-9.4.0.54424.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/picocli-4.7.3.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-backend-cli-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/xodus-openAPI-2.0.1.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/commons-compress-1.26.1.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/commons-io-2.16.1.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-commons-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/httpclient5-5.2.1.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/protobuf-java-4.28.2.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-rpc-protocol-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/git-files-blame-1.0.3.1673.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/kotlin-stdlib-1.6.21.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-core-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonar-classloader-1.0.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-rpc-impl-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonar-scanner-protocol-9.9.0.65466.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-server-api-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/checker-qual-3.33.0.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/org.eclipse.lsp4j.jsonrpc-0.22.0.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/error_prone_annotations-2.18.0.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/org.eclipse.jgit-6.9.0.202403050737-r.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/spring-aop-5.3.39.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/JavaEWAH-1.2.3.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-server-connection-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/failureaccess-1.0.1.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/httpcore5-h2-5.2.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/xodus-environment-2.0.1.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/jsr305-3.0.2.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/logback-core-1.2.13.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/commons-csv-1.10.0.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/spring-beans-5.3.39.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/j2objc-annotations-2.8.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/commons-lang-2.6.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/kotlin-stdlib-common-1.6.21.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/xodus-utils-2.0.1.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-telemetry-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-rule-extractor-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/annotations-13.0.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-plugin-api-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/spring-expression-5.3.39.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/javax.inject-1.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/spring-jcl-5.3.39.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonar-channel-4.2.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/sonarlint-analysis-engine-10.7.1.79146.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/slf4j-api-1.7.36.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/spring-context-5.3.39.jar
/home/rteano/.local/share/JetBrains/WebStorm2024.2/sonarlint-intellij/sloop/lib/gson-2.10.jar
 [2024-10-17T14:15:10.563045199] [ApplicationImpl pooled thread 3] INFO org.sonarsource.sonarlint.core.rpc.client.SloopLauncher - Using JRE from /home/rteano/.local/share/JetBrains/Toolbox/apps/webstorm/jbr
Migrating the storage...
Listening for SonarLint service exit...
Initializing the SonarLint service...
 [2024-10-17T14:15:11.628] [main] INFO org.sonarsource.sonarlint.core.rpc.impl.SonarLintRpcServerImpl - SonarLint backend started, instance=org.sonarsource.sonarlint.core.rpc.impl.SonarLintRpcServerImpl@3bd323e9
 [2024-10-17T14:15:13.093] [SonarLint Server RPC sequential executor] INFO sonarlint - Started embedded server on port 64120
SonarLint service initialized...
Analysing 'nx.json' (ID 98cbcbc7-c55f-4bbc-b907-a4094b685f8a)...
 [2024-10-17T14:15:40.327] [SonarLint Server RPC request executor] INFO sonarlint - Triggering analysis with configuration: [
  baseDir: /home/rteano/Desktop/Arcanys/training/teamone
  extraProperties: {}
  activeRules: [14 kubernetes, 214 python, 24 css, 109 kotlin, 90 secrets, 265 javascript, 26 docker, 28 ruby, 46 Web, 15 xml, 155 php, 7 terraform, 267 typescript, 7 cloudformation]
  inputFiles: [
    file:///home/rteano/Desktop/Arcanys/training/teamone/nx.json (UTF-8)
  ]
]

 [2024-10-17T14:15:40.897] [sonarlint-analysis-engine] INFO sonarlint - Index files
 [2024-10-17T14:15:40.905] [Report about progress of file indexation] INFO sonarlint - 1 file indexed
 [2024-10-17T14:15:42.153] [Progress of the CloudFormation analysis] INFO sonarlint - 0 source files to be analyzed
 [2024-10-17T14:15:42.16] [Progress of the CloudFormation analysis] INFO sonarlint - 0/0 source files have been analyzed
 [2024-10-17T14:15:42.253] [Progress of the AzureResourceManager analysis] INFO sonarlint - 0 source files to be analyzed
 [2024-10-17T14:15:42.253] [Progress of the AzureResourceManager analysis] INFO sonarlint - 0/0 source files have been analyzed
 [2024-10-17T14:15:42.254] [sonarlint-analysis-engine] INFO sonarlint - No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
 [2024-10-17T14:15:42.294] [Progress of the Docker analysis] INFO sonarlint - 0 source files to be analyzed
 [2024-10-17T14:15:42.294] [Progress of the Docker analysis] INFO sonarlint - 0/0 source files have been analyzed
 [2024-10-17T14:15:42.296] [sonarlint-analysis-engine] INFO sonarlint - Available processors: 16
 [2024-10-17T14:15:42.296] [sonarlint-analysis-engine] INFO sonarlint - Using 16 threads for analysis.
 [2024-10-17T14:15:42.735] [sonarlint-analysis-engine] INFO sonarlint - The property "sonar.tests" is not set. To improve the analysis accuracy, we categorize a file as a test file if any of the following is true:
  * The filename starts with "test"
  * The filename contains "test." or "tests."
  * Any directory in the file path is named: "doc", "docs", "test" or "tests"
  * Any directory in the file path has a name ending in "test" or "tests"

 [2024-10-17T14:15:42.752] [sonarlint-analysis-engine] INFO sonarlint - Analyzing all except non binary files
 [2024-10-17T14:15:42.759] [Progress of the text and secrets analysis] INFO sonarlint - 1 source file to be analyzed
 [2024-10-17T14:15:42.8] [Progress of the text and secrets analysis] INFO sonarlint - 1/1 source file has been analyzed
 [2024-10-17T14:15:42.803] [sonarlint-analysis-engine] INFO sonarlint - Analysis detected 0 issues and 0 Security Hotspots in 5124ms
Analysing 'nx.json' (ID eb08aadb-b6aa-44f8-b774-5fa4e0ef87b0)...
 [2024-10-17T14:15:44.932] [SonarLint Server RPC request executor] INFO sonarlint - Triggering analysis with configuration: [
  baseDir: /home/rteano/Desktop/Arcanys/training/teamone
  extraProperties: {}
  activeRules: [14 kubernetes, 214 python, 24 css, 109 kotlin, 90 secrets, 265 javascript, 26 docker, 28 ruby, 46 Web, 15 xml, 155 php, 7 terraform, 267 typescript, 7 cloudformation]
  inputFiles: [
    file:///home/rteano/Desktop/Arcanys/training/teamone/nx.json (UTF-8)
  ]
]

 [2024-10-17T14:15:45.074] [sonarlint-analysis-engine] INFO sonarlint - Index files
 [2024-10-17T14:15:45.075] [Report about progress of file indexation] INFO sonarlint - 1 file indexed
 [2024-10-17T14:15:45.19] [Progress of the CloudFormation analysis] INFO sonarlint - 0 source files to be analyzed
 [2024-10-17T14:15:45.19] [Progress of the CloudFormation analysis] INFO sonarlint - 0/0 source files have been analyzed
 [2024-10-17T14:15:45.192] [Progress of the AzureResourceManager analysis] INFO sonarlint - 0 source files to be analyzed
 [2024-10-17T14:15:45.192] [Progress of the AzureResourceManager analysis] INFO sonarlint - 0/0 source files have been analyzed
 [2024-10-17T14:15:45.192] [sonarlint-analysis-engine] INFO sonarlint - No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
 [2024-10-17T14:15:45.201] [Progress of the Docker analysis] INFO sonarlint - 0 source files to be analyzed
 [2024-10-17T14:15:45.201] [Progress of the Docker analysis] INFO sonarlint - 0/0 source files have been analyzed
 [2024-10-17T14:15:45.202] [sonarlint-analysis-engine] INFO sonarlint - Available processors: 16
 [2024-10-17T14:15:45.202] [sonarlint-analysis-engine] INFO sonarlint - Using 16 threads for analysis.
 [2024-10-17T14:15:45.342] [sonarlint-analysis-engine] INFO sonarlint - The property "sonar.tests" is not set. To improve the analysis accuracy, we categorize a file as a test file if any of the following is true:
  * The filename starts with "test"
  * The filename contains "test." or "tests."
  * Any directory in the file path is named: "doc", "docs", "test" or "tests"
  * Any directory in the file path has a name ending in "test" or "tests"

 [2024-10-17T14:15:45.348] [sonarlint-analysis-engine] INFO sonarlint - Analyzing all except non binary files
 [2024-10-17T14:15:45.351] [Progress of the text and secrets analysis] INFO sonarlint - 1 source file to be analyzed
 [2024-10-17T14:15:45.374] [Progress of the text and secrets analysis] INFO sonarlint - 1/1 source file has been analyzed
 [2024-10-17T14:15:45.375] [sonarlint-analysis-engine] INFO sonarlint - Analysis detected 0 issues and 0 Security Hotspots in 452ms
 [2024-10-17T14:17:16.373] [sonarlint-analysis-engine] INFO sonarlint - Module file event for CREATED for file [uri=file:///home/rteano/Desktop/Arcanys/training/teamone/apps/web/vite.config.mts.timestamp-1729145836235-b425c0d751fae.mjs] has been ignored because it's not a Kubernetes file.

I believe the error should not impact SonarLint. Have you noticed anything?

What version of nx-console are you using?

Hi Nicolas, sorry for the late response. I am using the latest nx-console plugin as far as I can see it. I am still getting this error from time to time whenever I am using webstorm. There’s nothing much to it in the error logs though, so I am not really sure what is happening.