Environment
- SonarQube Cloud pull-request analysis of a private TypeScript/JavaScript monorepo
- SonarScanner CLI 8.2.0.6438
- SonarJS 14.3.0.46350, implementation build
822582ba4369505b8701de3c4a0029e7f769e93a - Node.js 22.23.4 on macOS arm64, explicitly selected by
sonar.nodejs.executable sonar.javascript.node.maxspace=8192; scanner reported Node memory 8240 MB- Engine Java 21.0.12.1
- 9,579 files indexed; 29 TypeScript configurations resolved
Observed behavior
The JavaScript/TypeScript/CSS sensor initialized successfully, started its gRPC analyze-project server, and resolved all 29 configurations. About 9 minutes 39 seconds after sensor start it logged the first of seven errors:
ERROR Failed to deserialize Protobuf message: Protocol message had invalid UTF-8.
The seven errors spanned about 97 seconds. The final scanner log line was the seventh error. Our external bounded-run watchdog stopped the still-running analysis about 63 seconds later at its predeclared 900-second wrapper deadline. Node and both Java processes were still present in the final retained observation. No report-task.txt, client report upload, or compute-engine task was produced.
Node RSS peaked at 1,701,840 KiB and was 970,080 KiB in the final observation, well below the configured 8,240 MB value. System free-memory samples never approached our 12% stop threshold (minimum 36%). There was no OOM or heap-limit message.
Three earlier scanner warnings naming invalid UTF-8 source lines were investigated separately. All three files strictly decode as UTF-8, and the named lines deliberately contain the literal U+FFFD replacement character encoded as valid EF BF BD. They predate the JavaScript sensor and do not appear to identify the Protobuf payload.
Minimal codec-component reproduction
We isolated the exact protobuf UTF-8 module from the retained SonarJS server.cjs without starting the analyzer server. The module writes a lone high surrogate U+D800 as ED A0 80, then its strict UTF-8 reader rejects those bytes. A literal U+FFFD writes as EF BF BD and round-trips successfully. This shows a codec-level mechanism but is not a full AST reproduction and does not identify which source file or protobuf field caused our seven errors.
We can provide the separately reviewed path-free synthetic codec reproduction and receipt, the plugin manifest, and a sanitized scanner log. We cannot provide private source code. The internal exact-bundle verification script contains local paths and source filenames and must not be attached. The path-free candidate mirrors the observed codec algorithm but does not execute the exact bundle, identify a failed payload, or prove a timeout cause.
Questions
- Is there a supported way in SonarJS 14.3 to correlate
Failed to deserialize Protobuf messagewith a source path, AST type, or protobuf field without exposing source code? - Does SonarJS 14.3 deliberately skip an AST after this exception and continue, making the message non-fatal, or can it leave the sensor unable to finish?
- Is the bundled writer’s handling of lone UTF-16 surrogates a known issue, and is there a fixed SonarJS build or supported configuration?
- What supported progress diagnostics can distinguish a slow but healthy analysis from a stalled one in this phase?
- Is there any server-side record available when no client report was uploaded and no
report-task.txtwas created?
Available sanitized evidence
-
Sanitized scanner log SHA-256:
0e76f2aa3638136334cbddc96c9b15ca4d81d8077875ede34833e8754ec65611 -
SonarJS plugin JAR SHA-256:
dfcdc925ca7d42711ef263a2472f48d08630d7c454aa4242b50980e62f9c1f25 -
Bundled
server.cjsSHA-256:2cf40006fa7369cee554d1ed8e51e094b1fe7355b47ac409047b0c3879728795 -
Isolated codec module SHA-256:
38402270e8e10a227c2b3e5f43f65f967569cd2edb9f52110b28cc54fe683a39 -
Reproduction source SHA-256:
c5614897509ef40a1e21c93ecf4be57a1faf91163da4a60f0470211449432a4b -
Path-free synthetic attachment SHA-256:
f4957faf1babac76c1a50bb07945ce93ab1878c54819cb30c385ee402a4ae100 -
Path-free synthetic receipt SHA-256:
525fe15064c4bcb8b8752aa1d80545ab25794f34ceac27904dd2d69ec77d3215SONARSOURCE-CODEC-REPRO.zip (1.1 KB)