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.

    Black screen with MMM Pir sensor after update

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    13 Posts 6 Posters 4.5k Views 6 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.
    • R Offline
      rabbit83ka
      last edited by

      I have the same error. Atteached the console output. Logfile can be found here.

      An unhandled error occurred inside electron-rebuild
      Could not detect abi for version 6.1.7 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
      
      Error: Could not detect abi for version 6.1.7 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
          at Object.getAbi (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/node-abi/index.js:30:9)
          at new Rebuilder (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/electron-rebuild/lib/src/rebuild.js:122:28)
          at rebuildWithOptions (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/electron-rebuild/lib/src/rebuild.js:393:23)
          at Object.doRebuild [as rebuild] (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/electron-rebuild/lib/src/rebuild.js:400:16)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/electron-rebuild/lib/src/cli.js:115:33)
          at Generator.next (<anonymous>)
          at fulfilled (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/electron-rebuild/lib/src/cli.js:5:58)
      npm ERR! code ELIFECYCLE
      npm ERR! errno 255
      npm ERR! Magic-Mirror-Module-PIR-Sensor@1.1.0 postinstall: `electron-rebuild -e ../../node_modules/electron`
      npm ERR! Exit status 255
      npm ERR! 
      npm ERR! Failed at the Magic-Mirror-Module-PIR-Sensor@1.1.0 postinstall script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/pi/.npm/_logs/2020-04-02T08_25_32_202Z-debug.log
      processing complete for module MMM-PIR-Sensor
      
      
      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @rabbit83ka
        last edited by

        @rabbit83ka said in Black screen with MMM Pir sensor after update:

        Updating “node-abi” might help solve this issue

        delete package-lock.json in the MMM-Pir-Sensor folder,
        run npm install there
        then maybe also have to do electron-rebuild again

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        R 1 Reply Last reply Reply Quote 0
        • J Offline
          JoeFranz
          last edited by

          It works! Thank you :grinning_face:

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

            @JoeFranz did u have to electron-rebuild?

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            U 1 Reply Last reply Reply Quote 0
            • J Offline
              JoeFranz
              last edited by

              @sdetweil yes

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

                @JoeFranz thanks

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  @sdetweil Hi Sam, I deleted the package-lock.json, after that npm install still fails with the same error message. npm install electron rebuild also doesn’t help…

                  I wiped the module folder and reinstalled it from github, now it works.

                  S S 2 Replies Last reply Reply Quote 0
                  • S Offline
                    sdetweil @rabbit83ka
                    last edited by

                    @rabbit83ka cool. thx for feedback

                    so, npm install after clone works…

                    must be the package-lock.json file (it recorded what it did last time)

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      Snake16547
                      last edited by

                      Hey,

                      had the same problem with my pir sensor module and I could fix it with the help from you guys BUT now i loaded module but the monitor doesn’t shut down. Commands over ssh works fine. I did a fresh install only for the pir sensor module to get it working.

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        satsatt @rabbit83ka
                        last edited by

                        @rabbit83ka Thank’s that worked for me too.

                        1 Reply Last reply Reply Quote 1
                        • U Offline
                          uatuba @sdetweil
                          last edited by

                          @sdetweil This does not work for me. I run npm install, and I get:

                          > Magic-Mirror-Module-PIR-Sensor@1.1.0 postinstall /home/pi/MagicMirror/modules/MMM-PIR-Sensor
                          > electron-rebuild -e ../../node_modules/electron
                          
                          ✖ Rebuild Failed
                          
                          An unhandled error occurred inside electron-rebuild
                          make: Entering directory '/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/build'
                            CXX(target) Release/obj.target/epoll/src/epoll.o
                          ../src/epoll.cc: In static member function ‘static void Epoll::Init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
                          ../src/epoll.cc:163:39: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
                             constructor.Reset(ctor->GetFunction());
                                                                 ^
                          In file included from ../src/epoll.cc:11:0:
                          /home/pi/.electron-gyp/6.1.7/include/node/v8.h:5891:46: note: candidate: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
                             V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
                                                                        ^~~~~~~~~~~
                          /home/pi/.electron-gyp/6.1.7/include/node/v8.h:5891:46: note:   candidate expects 1 argument, 0 provided
                          ../src/epoll.cc:165:23: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
                               ctor->GetFunction());
                                                 ^
                          In file included from ../src/epoll.cc:11:0:
                          /home/pi/.electron-gyp/6.1.7/include/node/v8.h:5891:46: note: candidate: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
                             V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
                                                                        ^~~~~~~~~~~
                          /home/pi/.electron-gyp/6.1.7/include/node/v8.h:5891:46: note:   candidate expects 1 argument, 0 provided
                          At global scope:
                          cc1plus: warning: unrecognized command line option ‘-Wno-cast-function-type’
                          epoll.target.mk:109: recipe for target 'Release/obj.target/epoll/src/epoll.o' failed
                          make: Leaving directory '/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/build'
                          make: *** [Release/obj.target/epoll/src/epoll.o] Error 1
                          gyp ERR! build error 
                          gyp ERR! stack Error: `make` failed with exit code: 2
                          gyp ERR! stack     at ChildProcess.onExit (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/node-gyp/lib/build.js:194:23)
                          gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
                          gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
                          gyp ERR! System Linux 4.19.66-v7+
                          gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/.bin/node-gyp" "rebuild" "--target=6.1.7" "--arch=arm" "--dist-url=https://www.electronjs.org/headers" "--build-from-source"
                          gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll
                          gyp ERR! node -v v10.18.0
                          gyp ERR! node-gyp -v v6.1.0
                          gyp ERR! not ok 
                          
                          Failed with exit code: 1
                          
                          Error: make: Entering directory '/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/build'
                            CXX(target) Release/obj.target/epoll/src/epoll.o
                          ../src/epoll.cc: In static member function ‘static void Epoll::Init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
                          ../src/epoll.cc:163:39: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
                             constructor.Reset(ctor->GetFunction());
                                                                 ^
                          In file included from ../src/epoll.cc:11:0:
                          /home/pi/.electron-gyp/6.1.7/include/node/v8.h:5891:46: note: candidate: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
                             V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
                                                                        ^~~~~~~~~~~
                          /home/pi/.electron-gyp/6.1.7/include/node/v8.h:5891:46: note:   candidate expects 1 argument, 0 provided
                          ../src/epoll.cc:165:23: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
                               ctor->GetFunction());
                                                 ^
                          In file included from ../src/epoll.cc:11:0:
                          /home/pi/.electron-gyp/6.1.7/include/node/v8.h:5891:46: note: candidate: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
                             V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
                                                                        ^~~~~~~~~~~
                          /home/pi/.electron-gyp/6.1.7/include/node/v8.h:5891:46: note:   candidate expects 1 argument, 0 provided
                          At global scope:
                          cc1plus: warning: unrecognized command line option ‘-Wno-cast-function-type’
                          epoll.target.mk:109: recipe for target 'Release/obj.target/epoll/src/epoll.o' failed
                          make: Leaving directory '/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/build'
                          make: *** [Release/obj.target/epoll/src/epoll.o] Error 1
                          gyp ERR! build error 
                          gyp ERR! stack Error: `make` failed with exit code: 2
                          gyp ERR! stack     at ChildProcess.onExit (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/node-gyp/lib/build.js:194:23)
                          gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
                          gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
                          gyp ERR! System Linux 4.19.66-v7+
                          gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/.bin/node-gyp" "rebuild" "--target=6.1.7" "--arch=arm" "--dist-url=https://www.electronjs.org/headers" "--build-from-source"
                          gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll
                          gyp ERR! node -v v10.18.0
                          gyp ERR! node-gyp -v v6.1.0
                          gyp ERR! not ok 
                          
                          Failed with exit code: 1
                              at SafeSubscriber._error (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/spawn-rx/lib/src/index.js:267:84)
                              at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:205:16)
                              at SafeSubscriber.error (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:156:26)
                              at Subscriber._error (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:92:26)
                              at Subscriber.error (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:72:18)
                              at MapSubscriber.Subscriber._error (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:92:26)
                              at MapSubscriber.Subscriber.error (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:72:18)
                              at SafeSubscriber._next (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/spawn-rx/lib/src/index.js:242:65)
                              at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:205:16)
                              at SafeSubscriber.next (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/rxjs/internal/Subscriber.js:143:22)
                          npm ERR! code ELIFECYCLE
                          npm ERR! errno 255
                          npm ERR! Magic-Mirror-Module-PIR-Sensor@1.1.0 postinstall: `electron-rebuild -e ../../node_modules/electron`
                          npm ERR! Exit status 255
                          npm ERR! 
                          npm ERR! Failed at the Magic-Mirror-Module-PIR-Sensor@1.1.0 postinstall script.
                          npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
                          
                          npm ERR! A complete log of this run can be found in:
                          npm ERR!     /home/pi/.npm/_logs/2020-04-12T03_38_34_229Z-debug.log 
                          
                          

                          Obviously rebuild does the same. I’ve deleted the module and reinstalled it. Any ideas?

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

                            @uatuba this is a tricky module, very sensitive to the runtime environment… breaks every update…

                            other have had success with doing a fresh git clone and npm install.
                            I am not the module author, so I don’t know exactly whats going on

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            1 Reply Last reply Reply Quote 0

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better 💗

                            Register Login
                            • 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