MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.24.0 is available! For more information about this release, check out this topic.

    UNSOLVED Black Screen "Electron" after updating MM

    Troubleshooting
    2
    17
    681
    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.
    • R
      RIKKO14 last edited by

      Hello,
      by doing an einth update my Magic Mirror is again in black screen “Electron”, how to do an Electron rebuild ?

      Sans titre.png

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

        @RIKKO14 how did u update?

        is this a pir module needing rebuild?

        Sam

        Create a working config
        How to add modules

        R 1 Reply Last reply Reply Quote 0
        • R
          RIKKO14 @sdetweil last edited by

          @sdetweil Quite often I have a logo at the top of my Magic Mirror
          Sans titre.png
          and I had for several days on te top of my MM the MMM-Jast to update and MMM-NowPlayingOnSpotify and MMM-DHT-Sensor had not worked. So first I updapte my MM and second uninstall MMM-Jast, MMM-NowPlayingOnSpotify and MMM-DHT-Sensor

          cd ~/MagicMirror
          rm -rf modules/module_to_delete
          

          and reinstall them
          This is where Electron appeared…

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

            @RIKKO14 ok,seen this before… MOST times this works

            stop MagicMirror

            cd ~
            rm -rf .config/Electron
            

            note the dot in front of config

            restart MagicMirror

            Sam

            Create a working config
            How to add modules

            R 1 Reply Last reply Reply Quote 0
            • R
              RIKKO14 @sdetweil last edited by

              @sdetweil
              I use PM2,
              how to do ?

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

                @RIKKO14 pm2 --help will give you the pm2 commands

                but

                pm2 stop all

                Sam

                Create a working config
                How to add modules

                1 Reply Last reply Reply Quote 0
                • R
                  RIKKO14 last edited by

                  @sdetweil
                  I do this :
                  1 .jpg
                  but nothing…

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

                    @RIKKO14 correct… in linux most commands return nothing if successful…

                    so that is good… you asked to erase a folder
                    and it did that

                    now restart MagicMirror

                    pm2 start MagicMirror

                    Sam

                    Create a working config
                    How to add modules

                    R 1 Reply Last reply Reply Quote 0
                    • R
                      RIKKO14 @sdetweil last edited by

                      @sdetweil Nothing has changed3 .jpg

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

                        @RIKKO14 fun… try this

                        we need to edit a js file

                        cd ~/MagicMirror/js
                        nano electron.js
                        

                        scroll down to

                        	let address = (config.address === void 0) | (config.address === "") ? (config.address = "localhost") : config.address;
                        

                        add a bank line after

                        on the blank line, copy/paste these lines

                        	mainWindow.webContents.on("new-window", function(event, url) {
                              event.preventDefault();
                              // This will open a new Electron window to load the url.
                              shell.openExternal(url);
                          });
                        

                        so it looks like this when you are done

                        	let address = (config.address === void 0) | (config.address === "") ? (config.address = "localhost") : config.address;
                        	mainWindow.webContents.on("new-window", function(event, url) {
                              event.preventDefault();
                              // This will open a new Electron window to load the url.
                              shell.openExternal(url);
                          });
                        	mainWindow.loadURL(`${prefix}${address}:${config.port}`);
                        

                        ctrl-o to save the file
                        ctrl-x to exit nano
                        cd …

                        then

                        pm2 restart MagicMirror

                        Sam

                        Create a working config
                        How to add modules

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy