Skip to content

Conversation

@khassel
Copy link
Collaborator

@khassel khassel commented Jan 2, 2026

If an error occurs during startup, we request system information from the user. The problem is that this information is displayed too late, for example, if the configuration check fails.

My initial idea was to use await Utils.logSystemInformation(global.version);, but this increased the startup time.

Therefore, the function is now called in a subprocess. This approach provides the information in all cases and does not increase the startup time.

Before this change:

node@9914e2eea3c7:~/magicmirror$ node --run server
[2026-01-02 22:48:38.508] [LOG]   [app] Starting MagicMirror: v2.35.0-develop
[2026-01-02 22:48:38.514] [LOG]   [app] Loading config ...
[2026-01-02 22:48:38.522] [LOG]   [app] config template file not exists, no envsubst
[2026-01-02 22:48:38.661] [INFO]  [check_config] Checking config file /home/node/magicmirror/config/config.js ...
[2026-01-02 22:48:38.693] [ERROR] [check_config] Your configuration file contains syntax errors :(
Line 43 column 5: Unexpected comma in middle of array.

After this change:

node@9914e2eea3c7:~/magicmirror$ node --run server
[2026-01-02 22:47:30.209] [LOG]   [app] Starting MagicMirror: v2.35.0-develop
[2026-01-02 22:47:30.213] [LOG]   [app] Loading config ...
[2026-01-02 22:47:30.222] [LOG]   [app] config template file not exists, no envsubst
[2026-01-02 22:47:30.358] [INFO]  [check_config] Checking config file /home/node/magicmirror/config/config.js ...
[2026-01-02 22:47:30.391] [ERROR] [check_config] Your configuration file contains syntax errors :(
Line 43 column 5: Unexpected comma in middle of array.
node@9914e2eea3c7:~/magicmirror$ [2026-01-02 22:47:30.566] [INFO]  [utils]
####  System Information  ####
- SYSTEM:   manufacturer: Microsoft; model: Docker Container; virtual: true; MM: v2.35.0-develop
- OS:       platform: linux; distro: Debian GNU/Linux; release: 13; arch: x64; kernel: 6.6.87.2-microsoft-standard-WSL2
- VERSIONS: electron: undefined; used node: 25.2.1; installed node: 25.2.1; npm: 11.7.0; pm2:
- ENV:      XDG_SESSION_TYPE: undefined; MM_CONFIG_FILE: undefined
            WAYLAND_DISPLAY:  wayland-0; DISPLAY: unix:0.0; ELECTRON_ENABLE_GPU: undefined
- RAM:      total: 14872.19 MB; free: 13091.86 MB; used: 1780.34 MB
- OTHERS:   uptime: 839 minutes; timeZone: UTC

Copy link
Collaborator

@KristjanESPERANTO KristjanESPERANTO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! And nice idea to move this output up 👍

@KristjanESPERANTO KristjanESPERANTO merged commit 241921b into MagicMirrorOrg:develop Jan 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants