@sdetweil I’m sorry, but I don’t understand. What exactly is mm
? (MagicMirror is running.)
What does npm run server
do? (I can visit the IP address of the Pi on my phone or laptop on my home network.)
@sdetweil I’m sorry, but I don’t understand. What exactly is mm
? (MagicMirror is running.)
What does npm run server
do? (I can visit the IP address of the Pi on my phone or laptop on my home network.)
@sdetweil Okay. Next issue is that MagicMirror-out.log
is always empty. I recall that I could find lots of information in there the last time I was setting up a MM, but this time it’s always just blank. (The MagicMirror-error.log
file is, sadly, useless because it’s just filled with tens of thousands of lines of Error: Cannot find module 'electron'
.)
Any idea why MagicMirror-out.log
is always empty?
@sdetweil Oh. So just close that Terminal window and ssh into it again, you mean?
installers/mm.sh &
That doesn’t seem to work:
~/MagicMirror $ installers/mm.sh &
[1] 11788
> magicmirror@2.28.0 start
> ./run-start.sh $1
[2024-08-04 16:01:09.618] [LOG] Starting MagicMirror: v2.28.0
[2024-08-04 16:01:10.764] [LOG] Loading config ...
[2024-08-04 16:01:10.845] [LOG] config template file not exists, no envsubst
[2024-08-04 16:01:17.539] [LOG] Loading module helpers ...
[2024-08-04 16:01:17.705] [LOG] No helper found for module: alert.
[2024-08-04 16:01:19.196] [LOG] Initializing new module helper ...
[2024-08-04 16:01:19.283] [LOG] Module helper loaded: updatenotification
[2024-08-04 16:01:19.535] [LOG] No helper found for module: clock.
[2024-08-04 16:01:20.029] [LOG] Initializing new module helper ...
[2024-08-04 16:01:20.278] [LOG] Module helper loaded: mmm-systemtemperature
[2024-08-04 16:01:20.396] [LOG] No helper found for module: weather.
[2024-08-04 16:01:20.554] [LOG] No helper found for module: weather.
[2024-08-04 16:01:27.632] [LOG] Initializing new module helper ...
[2024-08-04 16:01:27.767] [LOG] Module helper loaded: MMM-ThemeParkWaitTimes
[2024-08-04 16:01:30.552] [LOG] Initializing new module helper ...
[2024-08-04 16:01:30.603] [LOG] Module helper loaded: MMM-birthdays
[2024-08-04 16:01:30.714] [LOG] No helper found for module: MMM-CloneWarsQuotes.
[2024-08-04 16:01:30.761] [LOG] Initializing new module helper ...
[2024-08-04 16:01:30.854] [LOG] Module helper loaded: MMM-ThemeParkWaitTimes
[2024-08-04 16:01:31.469] [LOG] Initializing new module helper ...
[2024-08-04 16:01:31.526] [LOG] Module helper loaded: MMM-ImagesPhotos
[2024-08-04 16:01:31.561] [LOG] All module helpers loaded.
[2024-08-04 16:01:32.866] [LOG] Starting server on port 8080 ...
[2024-08-04 16:01:33.567] [WARN] You're using a full whitelist configuration to allow for all IPs
[2024-08-04 16:01:35.645] [LOG] Server started ...
It is still returning all the reporting to Terminal.
@sdetweil Yes. I think something is wrong with pm2 itself, because (a) calling the standard pm2 start MagicMirror
will appear to work, but it does not actually launch the MagicMirror. This is the output it yields:
~/MagicMirror/modules $ pm2 start MagicMirror
[PM2] Applying action restartProcessId on app [MagicMirror](ids: [ 1 ])
[PM2] [MagicMirror](1) ✓
[PM2] Process successfully started
┌────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 1 │ MagicMirror │ default │ 2.28.0 │ fork │ 2816 │ 1s │ 57 │ online │ 0% │ 29.0mb │ dvg │ disabled │
│ 0 │ pm2 │ default │ 2.28.0 │ fork │ N/A │ 0 │ 0 │ stopped │ 0% │ 0b │ dvg │ enabled │
└────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
And (b) it shows pm2 as stopped
which doesn’t make any sense. I thought pm2 was supposed to always be running.
Calling /installers/mm.sh
will launch the MagicMirror, but then I am stuck with it reporting everything back to the ssh
Terminal window and I can’t so anything else until/unless I ctrl-z it, which is annoying.
Can anyone help me understand why my .pm2/pm2.log
file is filled with the below errors?
2024-08-03T18:30:09: PM2 log: App [MagicMirror:1] online
2024-08-03T18:30:15: PM2 log: App [MagicMirror:1] exited with code [1] via signal [SIGINT]
2024-08-03T18:30:15: PM2 log: App [MagicMirror:1] starting in -fork mode-
2024-08-03T18:30:15: PM2 log: App [MagicMirror:1] online
2024-08-03T18:30:20: PM2 log: App [MagicMirror:1] exited with code [1] via signal [SIGINT]
2024-08-03T18:30:20: PM2 log: App [MagicMirror:1] starting in -fork mode-
@sdetweil If electron hasn’t been required for years, then why does a fresh install of everything generate tens of thousands of “can’t find electron” lines in MagicMirror-error.log
?
@sdetweil Here’s the entire mm.sh
file:
#!/bin/bash
# This file is still here to keep PM2 working on older installations.
cd ~/MagicMirror
export external_browser=firefox
DISPLAY=:0 npm start