File 0001-ts-log-Avoid-log-spam-for-ResizeObserver-loop-limit-.patch of Package signal-desktop
From a28813331fde621782ba77fdd0d6d666c981786e Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
Date: Tue, 2 Nov 2021 09:18:18 +0100
Subject: [PATCH] ts:log: Avoid log spam for ResizeObserver loop limit exceeded
This fills up .config/Signal/logs/app.log with:
{"level":50,"time":"2021-11-02T08:12:00.710Z","pid":23028,"hostname":"magrathea","msg":"Top-level unhandled error: null"}
~50MB per hour
---
ts/logging/set_up_renderer_logging.ts | 2 ++
1 file changed, 2 insertions(+)
Index: Signal-Desktop-5.23.0/ts/logging/set_up_renderer_logging.ts
===================================================================
--- Signal-Desktop-5.23.0.orig/ts/logging/set_up_renderer_logging.ts
+++ Signal-Desktop-5.23.0/ts/logging/set_up_renderer_logging.ts
@@ -111,8 +111,12 @@ window.SignalContext.log = {
};
window.onerror = (_message, _script, _line, _col, error) => {
+ if (_message === "ResizeObserver loop limit exceeded")
+ return
const errorInfo = error && error.stack ? error.stack : JSON.stringify(error);
- log.error(`Top-level unhandled error: ${errorInfo}`);
+ if (errorInfo !== "null") {
+ log.error(`Top-level unhandled error: ${errorInfo}`);
+ }
};
window.addEventListener('unhandledrejection', rejectionEvent => {