Getting error on sonar scan for my javascript project


Getting error on sonar scan for my javascript project.
I am getting error on my javascript projecct(using azure build pipeline),i have added tasks for sonar in my pipeline.but getting error at the sonar scan step. (1.1 MB)


The analysis fails with OutOfMemoryError when what seems to be a SQL script creating a database is being analyzed:

2021-01-19T14:46:15.3814363Z INFO: 2170/3246 files analyzed so far, currently analyzing: E:/WKApps/45/s/Source/Repository/MDSCommonDB_CreateDB.sql

Such scripts are typically very big in size and auto-generated. They should be excluded from the analysis.


Thanks Michal for your help ,do you know a way to this I using azure pipeline.
is there a way i can ignore files with .sql extension or some other.

Below is my pipeline for javascript proj

I have exculded the .sql files by excluding the folder itself


can i ignore all .sql files itself

moving ahead on the exclusions i have added exclusion in sonar scanner


Moving ahead i have exclude some folders and files


I’m glad you addressed the issue. The pattern you added **/*.sql will indeed exclude all the SQL files form the analysis. It is a good practice to exclude from the analysis scope all the files which are not of interest.

Excluding image extensions (.png, .jpg) is not necessary - these extensions are not mapped to any of the analyzers and will not be taken into account during analysis.


Hi Michal ,

Well I am seeing new error for the sonar scanner.
PFA the error log below. (3.6 MB)

The analysis finished successfully:

2021-01-20T13:50:36.8902334Z 13:50:36.878 INFO: ANALYSIS SUCCESSFUL, you can browse
2021-01-20T13:50:36.8902868Z 13:50:36.878 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
2021-01-20T13:50:36.8903377Z 13:50:36.878 INFO: More about the report processing at

The failure happen in the 3rd party post job Quality Gate Breaker:

2021-01-20T13:50:36.8939335Z 13:50:36.878 DEBUG: Post-jobs : Forbidden Configuration Breaker -> Quality Gate Breaker
2021-01-20T13:50:36.8940053Z 13:50:36.878 INFO: Executing post-job 'Forbidden Configuration Breaker'
2021-01-20T13:50:36.8940403Z 13:50:36.878 INFO: Executing post-job 'Quality Gate Breaker'
2021-01-20T13:50:36.8943311Z 13:50:36.893 DEBUG: Loading report task properties from E:\WKApps\_temp\sonar\213850\1d980cee-d14b-c2d7-546e-2ed24b005af7\report-task.txt
2021-01-20T13:50:37.6981354Z 13:50:37.689 INFO: Waiting for report processing to complete...
2021-01-20T13:50:47.8301344Z 13:50:47.822 INFO: Waiting for report processing to complete...
2021-01-20T13:50:58.0034656Z 13:50:58.001 INFO: Waiting for report processing to complete...
2021-01-20T13:51:08.1476160Z 13:51:08.134 INFO: Waiting for report processing to complete...
2021-01-20T13:51:18.2648679Z 13:51:18.262 INFO: Waiting for report processing to complete...
2021-01-20T13:51:28.3511640Z 13:51:28.349 INFO: Waiting for report processing to complete...
2021-01-20T13:51:38.4310946Z 13:51:38.421 INFO: Waiting for report processing to complete...
2021-01-20T13:51:48.5057746Z 13:51:48.505 INFO: Waiting for report processing to complete...
2021-01-20T13:51:58.6117159Z 13:51:58.598 DEBUG: eslint-bridge server will shutdown
2021-01-20T13:52:07.6649877Z 13:52:07.664 DEBUG: stylelint-bridge server will shutdown
2021-01-20T13:52:07.6864290Z 13:52:07.685 INFO: ------------------------------------------------------------------------
2021-01-20T13:52:07.6864853Z 13:52:07.685 INFO: EXECUTION FAILURE
2021-01-20T13:52:07.6865215Z 13:52:07.685 INFO: ------------------------------------------------------------------------
2021-01-20T13:52:07.6865656Z 13:52:07.685 INFO: Total time: 16:21.752s
2021-01-20T13:52:07.8192670Z 13:52:07.811 INFO: Final Memory: 28M/107M
2021-01-20T13:52:07.8193332Z 13:52:07.811 INFO: ------------------------------------------------------------------------
2021-01-20T13:52:07.8235017Z ##[error]13:52:07.811 ERROR: Error during SonarScanner execution
2021-01-20T13:52:07.8242509Z 13:52:07.811 ERROR: Error during SonarScanner execution
2021-01-20T13:52:07.8252309Z ##[error]java.lang.IllegalStateException: Report processing did not complete successfully: FAILED
	at org.sonar.plugins.buildbreaker.QualityGateBreaker.getAnalysisId(
	at org.sonar.plugins.buildbreaker.QualityGateBreaker.execute(
	at org.sonar.scanner.postjob.PostJobWrapper.execute(
	at org.sonar.scanner.postjob.PostJobsExecutor.execute(
	at org.sonar.scanner.postjob.PostJobsExecutor.execute(
	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(
13:52:07.811 ERROR: 
13:52:07.811 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

It seems that the report processing on the SonarQube side failed for some reason. You may check it on the Background Task page of this project. This post job is not provided by SonarSource, it might be that it fails because of the state of the Quality Gate of the project.