MaxListenersExceededWarning: Possible EventEmitter memory leak detected

Hi,

I’m using the sonar task “SonarCloudAnalyze@3” in my Azure Devops yaml pipeline:

  • task: SonarCloudAnalyze@3

On the 9th of July we started to see the following error in the log for the task:

INFO: Found 1 tsconfig.json file(s): [C:\Users\VSSADM~1\AppData\Local\Temp\tsconfig-CYstgk.json]

##[error]ERROR: (node:2804) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit

ERROR: (node:2804) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit

##[error]ERROR: (Use node --trace-warnings ... to show where the warning was created)

ERROR: (Use node --trace-warnings ... to show where the warning was created)

INFO: 1 source file to be analyzed

Task log.txt (1.4 MB)

It seems like the task is still working as expected despite of the error.

Have anybody seen the same and know how to get rid of the error?

Best Regards,
Anders Havn

SonarCloudAnalyze (3.3.0)
SonarScanner for MSBuild 10.1.2

Hello @vedion,

thanks for reporting this. Could you please share the debug logs of the analysis, please? We are not able to reproduce those messages.

Thanks!
Victor

Sorry for the late reply. Here is the log.
Log1.txt (1.4 MB)

Looks like it is fixed now.

1 Like

HI

In which version of the scanner was the problem fixed?

We use
SonarScanner for .NET 10.4.1
Using the .NET Framework version of the Scanner for .NET
with Java 17.0.15 on windows agnet and have this error in logs

Hey @marcin.bebas

Are you using SonarQube Server or SonarQube Cloud?

SonarQube Server
SonarQube v2025.4.2.112048

Hey @marcin.bebas

The version that was deployed on SonarQube Cloud when @vedion noted the problem was fixed came after SonarQube 2025.4.2. It should be available in 2025.5.