WebSocket client error: RangeError: Max payload size exceeded

Template for a good new topic, formatted with Markdown:

  • ALM used:
    Azure DevOps
  • CI system used:
    Azure DevOps
  • Scanner command used when applicable (private details masked)
    SonarCloudAnalyze@3 task
  • Languages of the repository
    Typescript / Javascript etc
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
ERROR: WebSocket client error: RangeError: Max payload size exceeded
##[error]ERROR: Failure during analysis
java.util.concurrent.CompletionException: java.lang.IllegalStateException: WebSocket connection closed abnormally: 
	at java.base/java.util.concurrent.CompletableFuture.reportJoin(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.join(Unknown Source)
	at org.sonar.plugins.javascript.bridge.BridgeServerImpl.analyzeProject(BridgeServerImpl.java:427)
	at org.sonar.plugins.javascript.analysis.JsTsSensor.analyzeFiles(JsTsSensor.java:119)
	at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:75)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:68)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:190)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:186)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:183)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:157)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:416)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  • Steps to reproduce
    N/A
  • Potential workaround
    N/A

Hello,
This error started to pop up a few days ago. I can’t find any information of what the size limit might be or how to configure it.
I guess SonarCloudAnalyze@3 is running in a container that we do not control.
Our repo is less than 1M rows.

Does anyone have information on what the limits are? Or how to find out how big our payload is.

Thanks
Martin

Template for a good new topic, formatted with Markdown:

  • ALM used (Azure DevOps)

  • CI system used (Azure DevOps)

  • Scanner command used when applicable (Sonar Analysis)

  • Languages of the repository - TypeScript, JS, CSS, react, view components

  • Error observed (ERROR: WebSocket client error: RangeError: Max payload size exceeded)

  • Steps to reproduce
    The Frontend CI pipeline Sonar Analysis step is failing

  • Potential workaround - No workaround except to disable the Sonar Analyis task on azure devops ci pipeline

  • Logs

ERROR: WebSocket client error: RangeError: Max payload size exceeded
##[error]ERROR: Failure during analysis
java.util.concurrent.CompletionException: java.lang.IllegalStateException: WebSocket connection closed abnormally:
at java.base/java.util.concurrent.CompletableFuture.reportJoin(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.join(Unknown Source)
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.analyzeProject(BridgeServerImpl.java:427)
at org.sonar.plugins.javascript.analysis.JsTsSensor.analyzeFiles(JsTsSensor.java:119)
at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:75)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:68)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)```

Hey @twing0 @santhoshicp

Are you two working together or are these two seperately reported issues?

Hi,

Together, just separate initiatives.

Thanks. :slight_smile: We worry more if 2 users report the same thing in quick succession. We worry less if it’s the same thing. In any case, I’ve flagged this for attention, as I’ve never seen this error before.

1 Like

Hello,

can you please share full debug logs for the analysis?

Thanks!

Do you mean the entire log from the devops task?
Or is there a debug mode for the SonarCloudAnalyze@3 task?

You can add system.debug=true to your pipeline, or just sonar.verbose=true to the extraProperties block of the SonarQubePrepare task. :slight_smile:

2 Likes

Thanks.
Seems, like my colleague found a solution for us.
He changed the scanner mode from dotnet to cli.