• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Auto-restart after quitting

Scheduled Pinned Locked Moved Unsolved Troubleshooting
6 Posts 2 Posters 291 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    cpcode
    last edited by Nov 25, 2024, 3:19 PM

    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?

    S 1 Reply Last reply Nov 25, 2024, 3:44 PM Reply Quote 0
    • S Offline
      sdetweil @cpcode
      last edited by sdetweil Nov 25, 2024, 3:44 PM Nov 25, 2024, 3:44 PM

      @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 do

      pm2 status
      then
      pm2 stop x
      where x is the name or number of the row the app is on

      then to restart without rebooting
      pm2 start x

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      C 1 Reply Last reply Nov 25, 2024, 3:56 PM Reply Quote 0
      • C Offline
        cpcode @sdetweil
        last edited by Nov 25, 2024, 3:56 PM

        @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?

        S 1 Reply Last reply Nov 25, 2024, 4:08 PM Reply Quote 0
        • S Offline
          sdetweil @cpcode
          last edited by Nov 25, 2024, 4:08 PM

          @cpcode can you show me how you start it? is there a bash script you created?

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          C 1 Reply Last reply Nov 25, 2024, 4:16 PM Reply Quote 0
          • C Offline
            cpcode @sdetweil
            last edited by Nov 25, 2024, 4:16 PM

            @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?

            S 1 Reply Last reply Nov 25, 2024, 4:17 PM Reply Quote 0
            • S Offline
              sdetweil @cpcode
              last edited by Nov 25, 2024, 4:17 PM

              @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

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                6/6
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy