Read the statement by Michael Teeuw here.
Auto-restart after quitting
-
I just installed MM on Windows, followed all the instructions from the wiki. I can successfully run from the Git Bash prompt with npm start.
The problem is, when I use Alt+Space to bring up the context menu and select Close, the mirror closes and then immediately re-opens (reboots?). I can see in the Bash window that it seems to be restarting - this is the bash console output from starting it once and closing it once (trying to):$ npm start
https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics.
[2024-11-25 08:43:40.834] [INFO] Newsfeed-Fetcher: Broadcasting 26 items.
[2024-11-25 08:43:43.320] [INFO] System information:SYSTEM: manufacturer: Dell Inc.; model: XPS 8940; virtual: false
OS: platform: Windows; distro: Microsoft Windows 10 Pro; release: 10.0
.19045; arch: x64; kernel: 10.0.19045
VERSIONS: electron: 31.6.0; used node: 20.17.0; installed node: 22.11.0; npm
: 10.9.0; pm2: 5.4.2
OTHER: timeZone: America/Chicago; ELECTRON_ENABLE_GPU: undefined
[2024-11-25 08:44:02.407] [LOG] Use existing calendarfetcher for url: https://
ics.calendarlabs.com/76/mm3137/US_Holidays.ics
[2024-11-25 08:44:02.408] [INFO] Calendar-Fetcher: Broadcasting 13 events from
https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics.
[2024-11-25 08:44:02.413] [LOG] Use existing newsfetcher for url: https://rss.
nytimes.com/services/xml/rss/nyt/HomePage.xml
[2024-11-25 08:44:02.413] [INFO] Newsfeed-Fetcher: Broadcasting 26 items.
[2024-11-25 08:44:02.414] [INFO] updatenotification: Updater Class Loaded!
[2024-11-25 08:44:02.414] [INFO] updatenotification: Checking PM2 using…
[2024-11-25 08:44:02.426] [INFO] updatenotification: [PM2] You are not using pm
2
[2024-11-25 08:44:02.494] [INFO] Calendar-Fetcher: Broadcasting 13 events from
https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics.
[2024-11-25 08:44:02.502] [INFO] Newsfeed-Fetcher: Broadcasting 26 items.
[2024-11-25 08:44:34.436] [LOG] Use existing calendarfetcher for url: https://
ics.calendarlabs.com/76/mm3137/US_Holidays.ics
[2024-11-25 08:44:34.437] [INFO] Calendar-Fetcher: Broadcasting 13 events from
https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics.
[2024-11-25 08:44:34.442] [LOG] Use existing newsfetcher for url: https://rss.
nytimes.com/services/xml/rss/nyt/HomePage.xml
[2024-11-25 08:44:34.442] [INFO] Newsfeed-Fetcher: Broadcasting 26 items.
[2024-11-25 08:44:34.443] [INFO] updatenotification: Updater Class Loaded!
[2024-11-25 08:44:34.443] [INFO] updatenotification: Checking PM2 using…
[2024-11-25 08:44:34.449] [INFO] updatenotification: [PM2] You are not using pm
2
[2024-11-25 08:44:34.529] [INFO] Newsfeed-Fetcher: Broadcasting 26 items.
[2024-11-25 08:44:34.541] [INFO] Calendar-Fetcher: Broadcasting 13 events from
https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics.You can see the timestamps jump from 08:44:02 (first run) to 08:44:34 - after I closed MM and it restarted on its own.
So far the only way I found to stop this loop is to click on the Bash window and type Ctrl-C, which gives me this and closes the mirror:(path to my username)\MagicMirror\node_modules\electron\dist\electron.exe exited with signal SIGINT
Any ideas what the problem is?
-
@cpcode do you use pm2 to autostart MM at boot?
if so, pm2’s JOB is to keep the app running… if it crashes, it is restarted…
so, after you minimize (instead of close)
open a terminal window and dopm2 status
then
pm2 stop x
where x is the name or number of the row the app is onthen to restart without rebooting
pm2 start x -
@sdetweil I’m not using pm2 - I didn’t install it and the log I posted above has a row that says ‘You are not using pm2’. Is there a similar thing that would keep rebooting my mirror?
-
@cpcode can you show me how you start it? is there a bash script you created?
-
@sdetweil I open the Git Bash console, go to the MagicMirror folder, and type npm start
No flags or scripts. Is there a better way? -
@cpcode well, a script or pm2 with a script…
I’ve never heard of MM restarting if you use npm start and select close or use ctrl-q