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.

    MMM-PIR-Sensor - White Screen

    Scheduled Pinned Locked Moved Troubleshooting
    90 Posts 24 Posters 132.1k Views 25 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.
    • B Offline
      bungee09
      last edited by

      Similar problem to @Them-Russians when running npm install. Then after starting MM using pm2 I get a white screen. Checking the pm2 error logs I see the following error with a module version mismatch: “Expected 50, got 49”.

       0|mm       | App threw an error during load
       0|mm       | Error: Module version mismatch. Expected 50, got 49.
       0|mm       |     at Error (native)
       0|mm       |     at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
       0|mm       |     at Object.Module._extensions..node (module.js:583:18)
       0|mm       |     at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
       0|mm       |     at Module.load (module.js:473:32)
       0|mm       |     at tryModuleLoad (module.js:432:12)
       0|mm       |     at Function.Module._load (module.js:424:3)
       0|mm       |     at Module.require (module.js:483:17)
       0|mm       |     at require (internal/module.js:20:19)
       0|mm       |     at bindings (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/bindings/bindings.js:76:44)
      

      Tried @James solution using npm rebuild but changed the version parameter to 50. Still no luck.

        npm rebuild --runtime=electron --target=1.3.4 --disturl=https://atom.io/download/atom-shell --abi=50
      

      Any help would be much appreciated before I reformat my sd card and start from scratch.

      yawnsY 1 Reply Last reply Reply Quote 0
      • yawnsY Offline
        yawns Moderator @bungee09
        last edited by

        @bungee09
        npm list and look for electron to find the right version. Then rerun the rebuild command with replaced version number

        B 1 Reply Last reply Reply Quote 0
        • B Offline
          bungee09 @yawns
          last edited by

          @yawns
          Works a treat. Thanks!

          T 1 Reply Last reply Reply Quote 0
          • T Offline
            Them Russians @bungee09
            last edited by paviro

            @bungee09 Did you get the npm install to work on the “MMM-PIR-Sensor” directory? Or did you just run the npm list to get the version of electron and then run npm rebuild --runtime=electron --target=1.3.4 --disturl=https://atom.io/download/atom-shell --abi=50 with the right version?

            Which directory were you in when you ran the rebuild?

            Sorry - i’m at work now, so dont have the Pi with me, but have been having issues with this for a week now, so i’m really hoping that this works for me :)

            B 1 Reply Last reply Reply Quote 0
            • B Offline
              bungee09 @Them Russians
              last edited by

              @Them-Russians - I feel your frustration! I spent a good few hours debugging this after installing and testing my PIR sensor. This is what eventually worked for me:

              I ran all the commands in the MMM-PIR-Sensor Directory.

               cd ~/MagicMirror/modules/MMM-PIR-Sensor
               npm list
              

              I found the electron version number to be “1.4.3” so updated target to 1.4.3. Also, updated abi to 50 in the following command as this was the expected value from the error message in pm2 logs.

               npm rebuild --runtime=electron --target=1.4.3 --disturl=https://atom.io/download/atom-shell --abi=50
              

              As soon as the rebuild was complete…

               cd
               pm2 restart mm
              

              … to restart MagicMirror in pm2.

              I also found this link which described the same fix.

              Good luck!

              T 1 Reply Last reply Reply Quote 0
              • T Offline
                Them Russians @bungee09
                last edited by

                @bungee09 Did your rebuild work successfuly? I got an error saying that i needed to have the latest versions of node.js and npm installed.

                I believe I have node version 6.9.4. Is that what you were using?

                After all this, i thought maybe i jacked up something, so i cleared out and reformatted the micro SD card. I reinstalled NOOBS and then got the Magic Mirror. Created the config.js file and ran the mirror without issue. Immediately after that, i cloned the PIR module and tried to run an “npm install” which failed, and so did the rebuild :(

                B 2 Replies Last reply Reply Quote 0
                • B Offline
                  bungee09 @Them Russians
                  last edited by

                  @Them-Russians The rebuild was successful for me using exactly the method I described above. I don’t have my pi with me currently but I only installed node for the first time last week so I definitely don’t have an old version. I can check the exact version number when I get home for you.

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    bungee09 @Them Russians
                    last edited by

                    @Them-Russians
                    BTW? Did you install node in the main MagicMirror directory first before installing dependencies in the MMM-PIR-Sensor directory?

                     cd ~/MagicMirror
                     npm install
                    
                    T 1 Reply Last reply Reply Quote 0
                    • T Offline
                      Them Russians @bungee09
                      last edited by

                      @bungee09 I did not do that install in the Magic Mirror folder. I ran the “curl” command from the github site for the MagicMirror, set up config.js, and then immediately got the PIR module.

                      Do you think i could run the npm install on the MagicMirror folder now, and try again with the rebuild, or would i have to clear my SD card and reinstall everything and start from scratch?

                      yawnsY B 2 Replies Last reply Reply Quote 0
                      • yawnsY Offline
                        yawns Moderator @Them Russians
                        last edited by

                        @Them-Russians said in MMM-PIR-Sensor - White Screen:

                        @bungee09 I did not do that install in the Magic Mirror folder. I ran the “curl” command from the github site for the MagicMirror, set up config.js, and then immediately got the PIR module.

                        Do you think i could run the npm install on the MagicMirror folder now, and try again with the rebuild, or would i have to clear my SD card and reinstall everything and start from scratch?

                        Yes, running npm install now will work and it is required.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 5
                        • 6
                        • 7
                        • 8
                        • 9
                        • 9 / 9
                        • 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