From c3eb0677a2b548ebb44055fd84d70c37f95cc764 Mon Sep 17 00:00:00 2001 From: Karsten Hassel Date: Fri, 12 Jan 2024 20:09:55 +0100 Subject: [PATCH] ignore strange errors from systeminformation under aarch64 by excluding them from global error handling --- CHANGELOG.md | 2 +- js/app.js | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca3df69f3d..80b9137a51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ _This release is scheduled to be released on 2024-04-01._ ### Added -- Output of system information to the console for troubleshooting (#3328 and #3337) +- Output of system information to the console for troubleshooting (#3328 and #3337), ignore errors under aarch64 ### Updated diff --git a/js/app.js b/js/app.js index 06960c0b39..33db688233 100644 --- a/js/app.js +++ b/js/app.js @@ -40,10 +40,13 @@ if (process.env.MM_PORT) { // The next part is here to prevent a major exception when there // is no internet connection. This could probable be solved better. process.on("uncaughtException", function (err) { - Log.error("Whoops! There was an uncaught exception..."); - Log.error(err); - Log.error("MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?"); - Log.error("If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues"); + // ignore strange exceptions under aarch64 coming from systeminformation: + if (!err.stack.includes("node_modules/systeminformation")) { + Log.error("Whoops! There was an uncaught exception..."); + Log.error(err); + Log.error("MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?"); + Log.error("If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues"); + } }); /**