Error in SonarLint for IntelliJ: java.lang.IllegalStateException: Failed to initialize linter

Environment:

  • Java: JetBrains s.r.o. 17.0.10
  • OS: Windows 11 amd64
  • IDE: PhpStorm 2023.3.4
  • SonarLint: 10.4.0.77904

Failure during analysis

java.lang.IllegalStateException: Failed to initialize linter
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:354)
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:320)
	at o.s.pl.javascript.bridge.JsTsSensor.analyzeFiles(JsTsSensor.java:107)
	at o.s.pl.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at o.ss.sl.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at o.ss.sl.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at o.ss.sl.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at o.ss.sl.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)

Hello Andrei,

Thank you for your report. Does this issue happen more than once?
If it’s reproducible, please enable verbose logging and submit detailed logs here on this topic. It will really help to understand the reason.
If it happens too often and blocks the analysis I advise you to downgrade to version 10.3.

Best,

Following the procedure to install previous version, downloaded from the marketplace, failed with “Access Denied” error. Disabling plugin seems to be only workaround for the moment for me.

Hello,

yes, it happened every time I analyze a file. Finally I downgraded to a previous version but now I face this issue Sonarlint issue when using Windows, WSL2 and symlinks - #3 by bonner-earle. Will be wsl node path supported anytime soon?

Environment:

  • Java: JetBrains s.r.o. 17.0.10
  • OS: Windows 11 amd64
  • IDE: PhpStorm 2023.3.4
  • SonarLint: 10.4.0.77904

Failure during analysis

java.lang.IllegalStateException: Failed to initialize linter
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:354)
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:320)
	at o.s.pl.javascript.bridge.JsTsSensor.analyzeFiles(JsTsSensor.java:107)
	at o.s.pl.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at o.ss.sl.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at o.ss.sl.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at o.ss.sl.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at o.ss.sl.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)

2 posts were split to a new topic: Error in SonarLint for IntelliJ 10.4.1: java.lang.IllegalStateException: Failed to initialize linter

Environment:

  • Java: JetBrains s.r.o. 17.0.10
  • OS: Mac OS X x86_64
  • IDE: PhpStorm 2023.3.5
  • SonarLint: 10.4.1.77998

Failure during analysis

java.lang.IllegalStateException: Failed to initialize linter
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:354)
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:320)
	at o.s.pl.javascript.bridge.JsTsSensor.analyzeFiles(JsTsSensor.java:107)
	at o.s.pl.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at o.ss.sl.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at o.ss.sl.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at o.ss.sl.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at o.ss.sl.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)

Hello,

To investigate the issue better, could you please enable verbose logging and provide us with these logs?

Environment:

  • Java: JetBrains s.r.o. 17.0.10
  • OS: Windows 10 amd64
  • IDE: PhpStorm 2023.3.6
  • SonarLint: 10.4.1.77998

Failure during analysis

java.lang.IllegalStateException: Failed to initialize linter
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:354)
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:320)
	at o.s.pl.javascript.bridge.JsTsSensor.analyzeFiles(JsTsSensor.java:107)
	at o.s.pl.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at o.ss.sl.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at o.ss.sl.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at o.ss.sl.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at o.ss.sl.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)

Hey there.

Problem is, that there is no according option - at least it could nowhere be found in the settings for SonarLint.

Environment:

  • Java: JetBrains s.r.o. 17.0.9
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2023.3.1
  • SonarLint: 10.4.0.77904

Failure during analysis

java.lang.IllegalStateException: Failed to initialize linter
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:354)
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:320)
	at o.s.pl.javascript.bridge.HtmlSensor.analyzeFiles(HtmlSensor.java:76)
	at o.s.pl.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at o.ss.sl.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at o.ss.sl.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at o.ss.sl.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at o.ss.sl.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)

Hi @Rici,

There is an option icon with three vertical dots on the top right of the SonarLint tool window.
image

Once you click on it, you will see the related options
image

No workDir in SonarLint
Error executing sensor: 'JavaScript/TypeScript analysis'
java.lang.IllegalStateException: Analysis of JS/TS files failed
	at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:102)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at org.sonarsource.sonarlint.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.IllegalStateException: Failed to initialize linter
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:354)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:320)
	at org.sonar.plugins.javascript.bridge.JsTsSensor.analyzeFiles(JsTsSensor.java:107)
	at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	... 12 more

'JavaScript inside YAML analysis' skipped because there is no related files in the current project
Execute Sensor: JavaScript inside HTML analysis
Error executing sensor: 'JavaScript inside HTML analysis'
java.lang.IllegalStateException: Analysis of JS in HTML files failed
	at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:102)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at org.sonarsource.sonarlint.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.IllegalStateException: Failed to initialize linter
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:354)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:320)
	at org.sonar.plugins.javascript.bridge.HtmlSensor.analyzeFiles(HtmlSensor.java:76)
	at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	... 12 more

Execute Sensor: CSS Rules
'Ruby Sensor' skipped because there is no related files in the current project
Execute Sensor: IaC Docker Sensor
0 source files to be analyzed
0/0 source files have been analyzed
Done in 29412ms

Processed 4 issues
Found 4 issues and 0 hotspots
Persisting all findings
Start analysis
Index files
Language of file "..." is detected to be "TS"
Language of file "..." is detected to be "HTML"
Language of file "..." is detected to be "TS"
Language of file "..." is detected to be "HTML"
4 files indexed
'Python Sensor' skipped because there is no related files in the current project
'IPython Notebooks Sensor' skipped because there is no related files in the current project
Execute Sensor: HTML
Initializing metadata of file ...
'XML Sensor' skipped because there is no related files in the current project
'Kotlin Sensor' skipped because there is no related files in the current project
'Gradle Sensor' skipped because there is no related files in the current project
'PHP sensor' skipped because there is no related files in the current project
'Analyzer for "php.ini" files' skipped because there is no related files in the current project
'IaC Terraform Sensor' skipped because there is no related files in the current project
'IaC CloudFormation Sensor' skipped because there is no related files in the current project
'IaC Kubernetes Sensor' skipped because there is no related files in the current project
'IaC AzureResourceManager Sensor' skipped because there is no related files in the current project
Execute Sensor: TextAndSecretsSensor
4 source files to be analyzed
Persisting all findings
4/4 source files have been analyzed
Execute Sensor: JavaScript/TypeScript analysis
Error executing sensor: 'JavaScript/TypeScript analysis'
java.lang.IllegalStateException: Analysis of JS/TS files failed
	at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:102)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at org.sonarsource.sonarlint.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.IllegalStateException: Failed to initialize linter
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:354)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:320)
	at org.sonar.plugins.javascript.bridge.JsTsSensor.analyzeFiles(JsTsSensor.java:107)
	at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	... 12 more

'JavaScript inside YAML analysis' skipped because there is no related files in the current project
Execute Sensor: JavaScript inside HTML analysis
Error executing sensor: 'JavaScript inside HTML analysis'
java.lang.IllegalStateException: Analysis of JS in HTML files failed
	at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:102)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at org.sonarsource.sonarlint.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.IllegalStateException: Failed to initialize linter
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:354)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:320)
	at org.sonar.plugins.javascript.bridge.HtmlSensor.analyzeFiles(HtmlSensor.java:76)
	at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	... 12 more

Execute Sensor: CSS Rules
'Ruby Sensor' skipped because there is no related files in the current project
Execute Sensor: IaC Docker Sensor
0 source files to be analyzed
0/0 source files have been analyzed
Done in 29677ms

Processed 4 issues
Found 4 issues and 0 hotspots
Persisting all findings
Matching Sonar project branch
No binding for configuration scope
Computing paths translation for config scope 'cb949fbe-6bba-4d33-a2fe-b556287eebf0'...
Config scope 'cb949fbe-6bba-4d33-a2fe-b556287eebf0' does not exist or is not bound
Persisting all findings

Environment:

  • Java: JetBrains s.r.o. 17.0.10
  • OS: Mac OS X x86_64
  • IDE: IntelliJ IDEA 2023.3.6
  • SonarLint: 10.4.2.78113

Failure during analysis

java.lang.IllegalStateException: Failed to initialize linter
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:354)
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:320)
	at o.s.pl.javascript.bridge.JsTsSensor.analyzeFiles(JsTsSensor.java:107)
	at o.s.pl.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at o.ss.sl.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at o.ss.sl.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at o.ss.sl.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at o.ss.sl.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)

Environment:

  • Java: JetBrains s.r.o. 17.0.10
  • OS: Windows 11 amd64
  • IDE: WebStorm 2023.3.6
  • SonarLint: 10.4.2.78113
  • uname -r: 5.15.146.1-microsoft-standard-WSL2

Failure during analysis

java.lang.IllegalStateException: Failed to initialize linter
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:354)
	at o.s.pl.javascript.bridge.BridgeServerImpl.initLinter(BridgeServerImpl.java:320)
	at o.s.pl.javascript.bridge.JsTsSensor.analyzeFiles(JsTsSensor.java:107)
	at o.s.pl.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:95)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensors(SensorsExecutor.java:86)
	at o.ss.sl.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:76)
	at o.ss.sl.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at o.ss.sl.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at o.ss.sl.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at o.ss.sl.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at o.ss.sl.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at o.ss.sl.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)

Environment:

  • Java: JetBrains s.r.o. 17.0.5
  • OS: W11
  • IDE: IntelliJ IDEA 2024.1
  • SonarLint: 10.4.2.78113

In IntelliJ 2024.1 a new possibly related exception is thrown

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Read access is allowed from inside read-action only (see Application.runReadAction()); see https://jb.gg/ij-platform-threading for details
Current thread: Thread[sonarlint-vfs-events-notifier,6,main] 260438041 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1137204208
	at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:180)
	at com.intellij.util.concurrency.ThreadingAssertions.softAssertReadAccess(ThreadingAssertions.java:131)
	at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:908)
	at com.intellij.psi.impl.source.tree.TreeElement.assertReadAccessAllowed(TreeElement.java:421)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:175)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:234)
	at com.intellij.psi.impl.source.tree.LazyParseablePsiElement.getFirstChild(LazyParseablePsiElement.java:82)
	at com.intellij.psi.PsiWalkingState$PsiTreeGuide.getFirstChild(PsiWalkingState.java:32)
	at com.intellij.psi.PsiWalkingState$PsiTreeGuide.getFirstChild(PsiWalkingState.java:14)
	at com.intellij.util.WalkingState.next(WalkingState.java:70)
	at com.intellij.util.WalkingState.walkChildren(WalkingState.java:49)
	at com.intellij.util.WalkingState.elementStarted(WalkingState.java:40)
	at com.intellij.psi.PsiWalkingState.elementStarted(PsiWalkingState.java:62)
	at com.intellij.lang.javascript.psi.JSRecursiveWalkingElementVisitor.visitElement(JSRecursiveWalkingElementVisitor.java:29)
	at com.intellij.lang.javascript.psi.JSElementVisitor.visitJSElement(JSElementVisitor.java:235)
	at com.intellij.lang.javascript.psi.JSElementVisitor.visitJSSourceElement(JSElementVisitor.java:239)
	at com.intellij.lang.javascript.psi.JSElementVisitor.visitJSStatement(JSElementVisitor.java:249)
	at com.intellij.lang.javascript.psi.JSElementVisitor.visitJSExpressionStatement(JSElementVisitor.java:203)
	at com.intellij.lang.javascript.psi.impl.JSExpressionStatementImpl.accept(JSExpressionStatementImpl.java:47)
	at com.intellij.psi.impl.source.tree.SharedImplUtil.acceptChildren(SharedImplUtil.java:183)
	at com.intellij.psi.impl.source.PsiFileImpl.acceptChildren(PsiFileImpl.java:753)
	at com.intellij.lang.javascript.index.JSFileCachedDataEvaluator.calculateReferencedPaths(JSFileCachedDataEvaluator.java:173)
	at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.getReferencedPaths(JSFileBaseImpl.java:218)
	at com.intellij.lang.javascript.psi.stubs.impl.JSFileStubImpl.<init>(JSFileStubImpl.java:29)
	at com.intellij.lang.javascript.psi.stubs.impl.JSFileStubBuilder.createStubForFile(JSFileStubBuilder.java:114)
	at com.intellij.lang.javascript.psi.stubs.impl.JSFileStubBuilder.doBuildStubTree(JSFileStubBuilder.java:65)
	at com.intellij.lang.javascript.psi.stubs.impl.JSFileStubBuilder.buildStubTree(JSFileStubBuilder.java:45)
	at com.intellij.psi.stubs.StubTreeBuilder.lambda$buildStubTree$1(StubTreeBuilder.java:142)
	at com.intellij.psi.stubs.StubTreeBuilder.handleStubBuilderException(StubTreeBuilder.java:98)
	at com.intellij.psi.stubs.StubTreeBuilder.lambda$buildStubTree$3(StubTreeBuilder.java:142)
	at com.intellij.psi.impl.PsiManagerImpl.runInBatchFilesMode(PsiManagerImpl.java:462)
	at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:132)
	at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:91)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.lambda$build$0(StubTreeLoaderImpl.java:70)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.lambda$build$1(StubTreeLoaderImpl.java:70)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.computeWithPreloadedContentHint(VirtualFileImpl.java:88)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.build(StubTreeLoaderImpl.java:59)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.readOrBuild(StubTreeLoaderImpl.java:50)
	at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:630)
	at com.intellij.psi.impl.source.PsiFileImpl.getGreenStubTree(PsiFileImpl.java:952)
	at com.intellij.psi.impl.source.PsiFileImpl.getGreenStub(PsiFileImpl.java:607)
	at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.getGreenJSFileStub(JSFileBaseImpl.java:65)
	at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.getCachedData(JSFileBaseImpl.java:52)
	at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.getTestFileType(JSFileBaseImpl.java:124)
	at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.isTestFile(JSFileBaseImpl.java:119)
	at com.intellij.javascript.testFramework.JsTestFileIndexingHandler.isTestFile(JsTestFileIndexingHandler.java:92)
	at com.intellij.javascript.testing.JsTestSourcesFilter.isTestSource(JsTestSourcesFilter.java:12)
	at com.intellij.openapi.roots.TestSourcesFilter.isTestSources(TestSourcesFilter.java:31)
	at org.sonarlint.intellij.fs.IdeaClientModuleFileEventBuilderKt.buildClientModuleFileEventToVirtual(IdeaClientModuleFileEventBuilder.kt:43)
	at org.sonarlint.intellij.fs.DefaultVirtualFileSystemEventsHandler.allEventsFor(DefaultVirtualFileSystemEventsHandler.kt:98)
	at org.sonarlint.intellij.fs.DefaultVirtualFileSystemEventsHandler.fileEventsByModules(DefaultVirtualFileSystemEventsHandler.kt:88)
	at org.sonarlint.intellij.fs.DefaultVirtualFileSystemEventsHandler.forwardEvents(DefaultVirtualFileSystemEventsHandler.kt:59)
	at org.sonarlint.intellij.fs.DefaultVirtualFileSystemEventsHandler.forwardEventsAsync$lambda$1(DefaultVirtualFileSystemEventsHandler.kt:49)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)