SonarCloud Bitbucket timing out


I am facing an issue where my pipelines are timing out because of SonarCloud. The logs show a NodeJS exception. How can this issue be resolved? Details are below!

Greetings Niek

ERROR: Failed to start server (300s timeout)
org.sonarsource.nodejs.NodeCommandException: Failed to start server (300s timeout)
	at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.startServer(
	at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.startServerLazily(
	at org.sonar.plugins.javascript.eslint.AbstractEslintSensor.execute(
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(
	at org.sonar.core.platform.ComponentContainer.startComponents(
	at org.sonar.core.platform.ComponentContainer.execute(
	at org.sonar.scanner.scan.ProjectScanContainer.scan(
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(
	at org.sonar.core.platform.ComponentContainer.startComponents(
	at org.sonar.core.platform.ComponentContainer.execute(
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(
	at org.sonar.core.platform.ComponentContainer.startComponents(
	at org.sonar.core.platform.ComponentContainer.execute(
	at org.sonar.batch.bootstrapper.Batch.doExecute(
	at org.sonar.batch.bootstrapper.Batch.execute(
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.base/java.lang.reflect.Method.invoke(
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(
	at org.sonarsource.scanner.cli.Main.execute(
	at org.sonarsource.scanner.cli.Main.execute(
	at org.sonarsource.scanner.cli.Main.main(
  • ALM used: Bitbucket Cloud
  • CI system used: Bitbucket Cloud
  • Languages of the repository: Python

Full log available here:
pipelineLog-{54b5905d-9939-48ac-8a23-7cece0144dbb}.txt (17.2 KB)

Bitbucket pipeline config:
bitbucket-pipelines.txt (1.0 KB)

Hey there.

Thanks for the report.

This is an interesting case:

  • You’re using the python:3.9 image, where I don’t expect NodeJS to be installed
  • You only have JSON, Python, and YAML files indexed by the scanner
  • The timeout is at Sensor JavaScript inside YAML analysis [javascript] (recently we started analyzing Javascript inside YAML files)

What kind of YAML files are in your repository? Just pipeline configuration, Infrastructure as Code (IAC), or something else?

In any case, I’ll flag this thread for some expert attention. You could probably get past the timeout (and the sensor triggering at all) by adding -Dsonar.exclusions=**/*.yml,**/*.yaml


Thanks for the quick response. This repo is pure Python with some JSON and YAML config files. I added an exclusion for indexing YAML files, will report back in a few days if this solves the issue!

PS: the .yaml file in question is a pre-commit-config.yaml file:

  - repo:
    rev: v4.2.0
      - id: check-docstring-first # Checks for a common error of placing code before the docstring.
      - id: double-quote-string-fixer # Replaces double quoted strings with single quoted strings.
      - id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
  - repo:
    rev: 3.9.2
      - id: flake8

Hello Niek,

We recently introduced the support of JavaScript code analysis inside YAML files for AWS. We will do the same for Python sometime in the future.

In any case, given the feedback you shared, it seems that we need to refine our detection of inline JavaScript code in AWS configuration files.

I created this ticket to address this issue as soon as possible. In the meantime, you can indeed apply the workaround suggested by Colin.

Hope this helps,

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.