Bug 1770473 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

In `TelemetrySend.jsm`, `_doPingRequest` takes an object, stringifies it, and then UTF-8 encodes it: https://searchfox.org/mozilla-central/rev/24c1cdc33ccce692612276cd0d3e9a44f6c22fd3/toolkit/components/telemetry/app/TelemetrySend.jsm#1311-1339.

However, `sendStandalonePing` takes a string and does not UTF-8 encode it: https://searchfox.org/mozilla-central/rev/24c1cdc33ccce692612276cd0d3e9a44f6c22fd3/toolkit/components/telemetry/app/TelemetrySend.jsm#201-233.

All consumers of `sendStandalonePing` are via `sendStructuredIngestionPing` (
https://searchfox.org/mozilla-central/rev/9f95c41a962c9228f569f8a6b2c30edbb50b65ae/browser/modules/PingCentre.jsm#126-145) which stringifies its input object but does *not* UTF-8 encode.

This leads to JSON parsing exceptions in the ingestion pipeline like
```
com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ...
```
When `pingsender2` was re-enabled in the second landing of Bug 1746983, essentially all `main` pings sent at shutdown witnessed this error because default theme names contain the string `System theme —`, and the Unicode dash variant trips this encoding error.

This is also, I think, the underlying cause of the difficult to diagnose Bug 1769013 and even the earlier Bug 1736524 which was, I believe, mis-diagnosed as being due to the test harness only.
In `TelemetrySend.jsm`, `_doPingRequest` takes an object, stringifies it, and then UTF-8 encodes it: https://searchfox.org/mozilla-central/rev/24c1cdc33ccce692612276cd0d3e9a44f6c22fd3/toolkit/components/telemetry/app/TelemetrySend.jsm#1311-1339.

However, `sendStandalonePing` takes a string and does not UTF-8 encode it: https://searchfox.org/mozilla-central/rev/24c1cdc33ccce692612276cd0d3e9a44f6c22fd3/toolkit/components/telemetry/app/TelemetrySend.jsm#201-233.

All consumers of `sendStandalonePing` are via `sendStructuredIngestionPing` (
https://searchfox.org/mozilla-central/rev/9f95c41a962c9228f569f8a6b2c30edbb50b65ae/browser/modules/PingCentre.jsm#126-145) which stringifies its input object but does *not* UTF-8 encode.

This leads to JSON parsing exceptions in the ingestion pipeline like
```
com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ...
```
When `pingsender2` was re-enabled in the second landing of Bug 1746983, essentially all `main` pings sent at shutdown witnessed this error because default theme names contain the string `System theme —`, and the Unicode dash variant trips this encoding error.  See [this STMO query](https://sql.telemetry.mozilla.org/queries/86068/source).

This is also, I think, the underlying cause of the difficult to diagnose Bug 1769013 and even the earlier Bug 1736524 which was, I believe, mis-diagnosed as being due to the test harness only.

Back to Bug 1770473 Comment 0