From f890f14df7cd2f0fe3d60163b34b84d41d88ca5a Mon Sep 17 00:00:00 2001 From: Karsten Hassel Date: Sun, 14 Jan 2024 09:13:01 +0100 Subject: [PATCH] ignore strange errors from systeminformation under aarch64 (#3349) by excluding them from global error handling, see discussions in https://github.com/MagicMirrorOrg/MagicMirror/pull/3337 --- CHANGELOG.md | 2 +- js/app.js | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9904dc1d31..468cc9ba48 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"); + } }); /**