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.

    Brand New Install works until I enable PM2 Autostart

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    9 Posts 3 Posters 1.3k Views 3 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
      cowlam @sdetweil
      last edited by

      @sdetweil

      pm2 start mm.sh
      Magic Mirror launches successfully

      pm2 save
      pm2 restart 0 (can confirm that is the correct id from pm2 status - only one entry which is mm)
      Magic Mirror is closed down… and an black Electron window opens and does not change ever after several minutes.
      If I right-click the Electron window and close it, after a few seconds the Magic Mirror launches successfully again on its own.

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @cowlam
        last edited by

        @cowlam weird…

        can you reboot and tell what happens

        can u show the mm.sh

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          cowlam @sdetweil
          last edited by

          @sdetweil
          After my last post I ran pm2 restart 0 and it restarted MM correctly.
          But after I rebooted it was back to launching the black Electron screen.

          mm.sh looks like this:

          cd ./MagicMirror
          DISPLAY=:0 npm start

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @cowlam
            last edited by sdetweil

            @cowlam can u change the cd line to

            cd ~/MagicMirror
            

            the one u have is MagicMirror from here (.)
            not MagicMirror from user home (~)

            also the pm2 status line has a column with a circled arrow header, that is restarts
            and after 5 rapid it stops

            I suspect the cd doesn’t work, mm doesn’t start,
            but the saved info says u need electron started.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            BKeyportB 1 Reply Last reply Reply Quote 0
            • BKeyportB Offline
              BKeyport Module Developer @sdetweil
              last edited by

              @sdetweil Sam: Just to let you know, if PM2 is not running any tasks, it won’t save with a plain pm2 save - you have to use pm2 save --force to clear the list after deleting everything.

              The "E" in "Javascript" stands for "Easy"

              1 Reply Last reply Reply Quote 1
              • 1 / 1
              • First post
                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