I’m trying to set up my first sonar project using bitbucket cloud. I’m using the official bitbucket pipe version 4.0.0. I’m trying to scan a typescript project with around 200K lines of code. I’ve tried several different configurations but the pipeline seems to get stuck scanning one file then times out after 2 hours (it’s not always the same file).
I’ve tried to include a directory with only a few files and that works but I’m not able to scan the full project.
I’m using Sonar Qube Enterprise Edition v2025.1 (102418).
Note that I am able to scan the full project locally so it’s something to do with the pipeline.
here are the relevant parts of my bitbucket pipelines yaml
definitions:
caches:
nextcache: ./www/.next/cache
nodecache: ./www/node_modules
sonar: ~/.sonar
services:
docker:
memory: 2048
steps:
- step: &sonar-analysis
name: SonarQube analysis
size: 8x
script:
- pipe: sonarsource/sonarqube-scan:4.0.0
variables:
SONAR_HOST_URL: ${SONAR_HOST_URL} # Get the value from the repository/workspace variable.
SONAR_TOKEN: ${SONAR_TOKEN} # Get the value from the repository/workspace variable. You shouldn't set secret in clear text here.
SONAR_SCANNER_JAVA_OPTS: -Xmx4096m
DEBUG: "true"
EXTRA_ARGS:
- -Dsonar.verbose=true
pipelines:
pull-requests:
'**':
- step: *sonar-analysis
This is probably going to be about the resources available to analysis. Try bumping up the memory allocation and/or the sonar.javascript.node.maxspace.
I tried increasing upto 12GB and I still get errors, the latest one with 12GB
12:49:14.742 INFO Hit the cache for 0 out of 94
12:48:59.757 ERROR Failed to get response while analyzing file:///opt/atlassian/pipelines/agent/build/www/src/root/modules/features/guidedSelling/domain/models/GSBanner.ts
java.lang.IllegalStateException: The bridge server is unresponsive
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:435)
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.analyzeTypeScript(BridgeServerImpl.java:405)
at org.sonar.plugins.javascript.analysis.AbstractAnalysis.analyzeFile(AbstractAnalysis.java:128)
at org.sonar.plugins.javascript.analysis.AnalysisWithProgram.analyzeProgram(AnalysisWithProgram.java:135)
at org.sonar.plugins.javascript.analysis.AnalysisWithProgram.analyzeFiles(AnalysisWithProgram.java:87)
at org.sonar.plugins.javascript.analysis.JsTsSensor.analyzeFiles(JsTsSensor.java:82)
at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:71)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:201)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:197)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:170)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:350)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:142)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:151)
at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
Caused by: java.io.IOException: HTTP/1.1 header parser received no bytes
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(Unknown Source)
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(Unknown Source)
at org.sonar.plugins.javascript.bridge.Http$JdkHttp.post(Http.java:59)
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:428)
... 28 common frames omitted
Is there a way to share it with you privately? there shouldn’t be anything that sensitive in theory but I’m not sure about posting the full ci logs output publicly