SonarJS bridge server 300s startup timeout on self-hosted Bitbucket runner aborts entire analysis (also fails with all JS/TS/CSS excluded)
Versions and env
Analysis: sonarsource/sonarcloud-scan:4.1.0 Bitbucket pipe. SonarScanner CLI 7.1.0.4889, engine Java 21.0.9.
- JavaScript/TypeScript analyzer plugin: 13.0.0.42526
- Bitbucket Pipelines self-hosted runner (Linux, Docker), runner 5.7.0.
- Host: AWS m5.xlarge — 16 GB RAM, 4 vCPU, RHEL 8 (kernel 4.18.0-553 el8_10).
- Analyzer reports:
Memory configuration: OS (15465 MB), Node.js (4288 MB)(embedded Node).
What we’re trying to do
Run our normal PR/branch analysis (mostly a large PHP project, plus legacy JS). This used to
complete fully (PHP + JS) in ~20–30 min. Recently the JS step began failing and it aborts the
whole scan.
Error observed
INFO Sensor JavaScript/TypeScript/CSS analysis [javascript]
INFO Using embedded Node.js runtime.
INFO Memory configuration: OS (15465 MB), Node.js (4288 MB).
(~5 min of silence)
ERROR Failed to start the bridge server (300s timeout)
org.sonar.plugins.javascript.bridge.BridgeServerImpl.startServer(BridgeServerImpl.java:224)
org.sonar.plugins.javascript.bridge.BridgeServerImpl.startServerLazily(BridgeServerImpl.java:435)
org.sonar.plugins.javascript.analysis.WebSensor.execute(WebSensor.java:177)
ERROR Error during SonarScanner Engine execution
java.lang.IllegalStateException: Error while running Node.js. …
INFO EXECUTION FAILURE
Because the scanner then exits with code 3, the entire analysis is aborted — our PHP
analysis, which finished successfully just before, is never submitted.
(On some runs we do see gRPC analyze-project server listening on 127.0.0.1:<port> before it
still times out; on others nothing is logged after the memory line.)
What we already ruled out
- Not memory: 16 GB host, Node auto-sized to 4288 MB, PHP security sensor peaks ~2.6 GB and
completes. (On a previous 8 GB host the step was OOM-killed; 16 GB fixed the OOM and now
everything completes except this bridge startup.) - Independent of the analyzed files: we excluded all JS/TS/CSS via
sonar.exclusions
(**/*.js,**/*.cjs,**/*.mjs,**/*.jsx,**/*.ts,**/*.tsx,**/*.vue,**/*.css,**/*.scss,**/*.less).
Confirmed effective (“9 languages detected” vs 12; js/ts/css profiles no longer load). Yet
the WebSensor still starts the bridge and still times out, aborting the scan. - Intermittent: ~1 success out of 5 runs on the 16 GB host.
sonar.javascript.detectBundles=falseis set (it fixed a separate ~56 min preprocessing
slowness on our large legacy JS surface); no effect on the bridge startup.
Questions
- Known bridge-startup regression in analyzer 13.0.0.42526 on RHEL 8?
- Is the 300s bridge-startup timeout configurable?
- Why does the WebSensor start the bridge even when all JS/TS/CSS files are excluded, and how
can we skip the JS/TS/CSS sensor so its failure doesn’t abort the PHP submission? - Is
sonar.nodejs.executable(system Node) the recommended workaround, and which Node
version for 13.0.0.42526? - Can the JS bridge failure be made non-fatal so the rest of the analysis is still submitted?
Debug logs: I can attach a full sonar.verbose=true run on request.