“The bridge server is unresponsive” error while scanning PHP project

I’m using SonarCloud to analyze a PHP project and I got the “The bridge server is unresponsive” error really often recently. I tried to look it up but no solution found yet. Could you please support me with this case?

  • CI system used: Bitbucket Cloud (size 2x)
  • Scanner command used: sonarsource/sonarcloud-scan:2.0.0 (SONAR_SCANNER_OPTS: “-Xmx8192m”)
  • Languages of the repository: PHP
  • Error observed
20:14:20.406 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:14:30.406 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:14:40.407 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:14:50.407 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:15:00.407 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:15:10.407 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:15:20.408 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:15:30.411 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:15:40.412 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:15:50.416 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:16:00.422 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:16:10.422 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:16:20.423 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:16:30.423 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:16:40.423 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:16:50.423 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:17:00.423 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:17:10.424 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:17:20.424 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:17:30.424 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:17:40.428 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:17:50.428 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:18:00.428 INFO: 7/2786 files analyzed, current file: /opt/atlassian/pipelines/agent/build/wwwroot/jsincludes/extjs/packages/sencha-core/test/specs/data/Store.js
20:18:08.448 DEBUG: The bridge server shut down
20:18:08.451 ERROR: Failure during analysis
java.lang.IllegalStateException: The bridge server is unresponsive
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:403)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.analyzeJavaScript(BridgeServerImpl.java:361)
	at org.sonar.plugins.javascript.bridge.AnalysisWithProgram.analyze(AnalysisWithProgram.java:176)
	at org.sonar.plugins.javascript.bridge.AnalysisWithProgram.analyzeProgram(AnalysisWithProgram.java:147)
	at org.sonar.plugins.javascript.bridge.AnalysisWithProgram.analyzeFiles(AnalysisWithProgram.java:100)
	at org.sonar.plugins.javascript.bridge.JsTsSensor.analyzeFiles(JsTsSensor.java:132)
	at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:192)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:188)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:159)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:397)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:125)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:57)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.net.http.HttpTimeoutException: request timed out
	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:571)
	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:398)
	... 39 common frames omitted
20:18:08.452 INFO: Hit the cache for 0 out of 7
20:18:08.452 INFO: Miss the cache for 7 out of 7: ANALYSIS_MODE_INELIGIBLE [7/7]
20:18:08.923 INFO: ------------------------------------------------------------------------
20:18:08.923 INFO: EXECUTION FAILURE
20:18:08.923 INFO: ------------------------------------------------------------------------
20:18:08.923 INFO: Total time: 8:07.814s
20:18:09.034 INFO: Final Memory: 141M/514M
20:18:09.034 INFO: ------------------------------------------------------------------------
20:18:09.034 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Analysis of JS/TS files failed
	at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:102)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:192)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:188)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:159)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:397)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:125)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:57)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.lang.IllegalStateException: The bridge server is unresponsive
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:403)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.analyzeJavaScript(BridgeServerImpl.java:361)
	at org.sonar.plugins.javascript.bridge.AnalysisWithProgram.analyze(AnalysisWithProgram.java:176)
	at org.sonar.plugins.javascript.bridge.AnalysisWithProgram.analyzeProgram(AnalysisWithProgram.java:147)
	at org.sonar.plugins.javascript.bridge.AnalysisWithProgram.analyzeFiles(AnalysisWithProgram.java:100)
	at org.sonar.plugins.javascript.bridge.JsTsSensor.analyzeFiles(JsTsSensor.java:132)
	at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:79)
	... 33 more
Caused by: java.net.http.HttpTimeoutException: request timed out
	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:571)
	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:398)
	... 39 more
20:18:09.034 ERROR: 
20:18:09.035 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
✖ SonarCloud analysis failed. (exit code = 1)

Hi,

Welcome to the community!

This error is happening in the analysis of the JavaScript components in your project. Specifically, it looks like the JS analyzer is getting hung up in analyzing a sencha-core framework file.

Our general recommendation is to exclude libraries/frameworks and generated code from analysis. So your best bet here is to add an exclusion - through the UI or in your properties file - for **/sencha-core/**/*.

 
HTH,
Ann

Thanks for the help on this. Just had one more questions, why would the analysis on the JavaScript components be failing? Is something I need to add to my build on the pipeline yml file.

Hi,

You can set exclusions from the UI, which is my general recommendation, or from the analysis side.

Not being an expert on the JS analyzer, I can’t give you a precise answer, but I would guess it’s related to size, complexity, or perhaps external dependencies not being available.

 
HTH,
Ann