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.

    After update MMM-Buttons breaks, made things worse trying to fix it

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    23 Posts 5 Posters 3.3k Views 5 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.
    • G Offline
      gonzonia
      last edited by

      So after I ran the update script, magicmirror wouldn’t start.

      This was in the log

      [03.07.2023 08:40.46.643] [ERROR] 2023-07-03T08:40:46 <error> (node:17008) UnhandledPromiseRejectionWarning: Error: The module '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build/Release/epoll.node'
      was compiled against a different Node.js version using
      NODE_MODULE_VERSION 93. This version of Node.js requires
      NODE_MODULE_VERSION 116. Please try re-compiling or re-installing
      the module (for instance, using `npm rebuild` or `npm install`).
          at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1822)
          at Module._extensions..node (node:internal/modules/cjs/loader:1354:18)
          at Object.func [as .node] (node:electron/js2c/asar_bundle:2:1822)
          at Module.load (node:internal/modules/cjs/loader:1124:32)
          at Module._load (node:internal/modules/cjs/loader:965:12)
          at f._load (node:electron/js2c/asar_bundle:2:13330)
          at Module.require (node:internal/modules/cjs/loader:1148:19)
          at require (node:internal/modules/cjs/helpers:110:18)
          at bindings (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/bindings/bindings.js:112:48)
          at /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/epoll.js:7:31
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/epoll.js:15:3)
          at Module._compile (node:internal/modules/cjs/loader:1269:14)
          at Module._extensions..js (node:internal/modules/cjs/loader:1324:10)
          at Module.load (node:internal/modules/cjs/loader:1124:32)
          at Module._load (node:internal/modules/cjs/loader:965:12)
          at f._load (node:electron/js2c/asar_bundle:2:13330)
      (Use `electron --trace-warnings ...` to show where the warning was created) (/home/pi/MagicMirror/node:internal/process/warning:60 writeOut)
      [03.07.2023 08:40.46.645] [ERROR] 2023-07-03T08:40:46 <error> (node:17008) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (/home/pi/MagicMirror/node:internal/process/warning:60 writeOut)
      MESA-LOADER: failed to retrieve device information
      MESA-LOADER: failed to retrieve device information
      MESA-LOADER: failed to retrieve device information
      MESA-LOADER: failed to open kms_swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:\$${ORIGIN}/dri:/usr/lib/dri)
      failed to load driver: kms_swrast
      MESA-LOADER: failed to open swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:\$${ORIGIN}/dri:/usr/lib/dri)
      failed to load swrast driver
      Gdk-Message: 08:40:55.667: electron: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
      

      I tried

      npm rebuild
      

      I tried

      npm install
      

      Wasn’t working.

      An unhandled error occurred inside electron-rebuild
      Could not detect abi for version 25.2.0 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
      

      I saw a message

      npm WARN EBADENGINE Unsupported engine {
      npm WARN EBADENGINE   package: 'lru-cache@10.0.0',
      npm WARN EBADENGINE   required: { node: '14 || >=16.14' },
      npm WARN EBADENGINE   current: { node: 'v16.13.1', npm: '9.7.1' }
      npm WARN EBADENGINE }
      

      I thought it was saying that my node was just a bit out of date, so I made the mistake of running

      nvm install node
      

      and now I get this

      node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
      

      help?

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

        @gonzonia I have no idea how to recover from the mess…

        but the module installer is busted

        try my fork, which fixes it, ( no module code change, only the post install script)

        rename the module folder to some other name
        git clone and npm install mine

        once u fix the node/npm problem

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        G 1 Reply Last reply Reply Quote 0
        • G Offline
          gonzonia @sdetweil
          last edited by

          @sdetweil I’m going to go ahead and start over on with a clean build on bullseye. This one is still running on buster which may be part of the issue. I’ve got another Pi I can use and I’ll just use the config from this one and rebuild it. Thanks for the quick reply.

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

            @gonzonia my backup/restore scripts might help move the config and modules

            https://github.com/sdetweil/MagicMirror-backup-restore

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • M Offline
              MMRIZE @gonzonia
              last edited by MMRIZE

              @gonzonia
              Clean reinstalling is always a solid option definitely.
              Your issue might have been node version was mismatched.
              Ref this; https://nodejs.org/en/download/releases
              Before update your node with nvm, you might need (sudo) apt update & upgrade.

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

                @MMRIZE my upgrade script upgrades node/npm

                the ekectron-rebuild cannot run from the module folder anymore…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • G Offline
                  gonzonia @MMRIZE
                  last edited by

                  @MMRIZE I did an apt-update and upgrade . Actually the node version went too far. It was suddenly version 20+ I just reset it to 16.20.1 (which is what’s showing up as I do the clean install on the other machine). That seems to get me back to where I might be able to recover from this mess.

                  @sdetweil I used your upgrade script but I’m not sure what happened. I’m now at least back to this

                  pi@MagicMirror:~/MagicMirror/modules/MMM-Buttons $ npm install
                  
                  > Magic-Mirror-Module-Buttons@1.0.0 postinstall
                  > node_modules/.bin/electron-rebuild -e ../../node_modules/electron
                  
                  ⠋ Searching dependency tree
                  An unhandled error occurred inside electron-rebuild
                  Could not detect abi for version 25.2.0 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 25.2.0 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-Buttons/node_modules/electron-rebuild/node_modules/node-abi/index.js:36:9)
                      at new Rebuilder (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/rebuild.js:126:48)
                      at rebuildWithOptions (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/rebuild.js:404:23)
                      at Object.doRebuild [as rebuild] (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/rebuild.js:427:16)
                      at /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/cli.js:124:33
                      at Generator.next (<anonymous>)
                      at fulfilled (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/electron-rebuild/lib/src/cli.js:6:58)
                  npm ERR! code 255
                  npm ERR! path /home/pi/MagicMirror/modules/MMM-Buttons
                  npm ERR! command failed
                  npm ERR! command sh -c -- node_modules/.bin/electron-rebuild -e ../../node_modules/electron
                  
                  npm ERR! A complete log of this run can be found in:
                  npm ERR!     /home/pi/.npm/_logs/2023-07-03T13_56_15_900Z-debug-0.log
                  

                  Any ideas

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

                    @gonzonia said in After update MMM-Buttons breaks, made things worse trying to fix it:

                    @sdetweil I used your upgrade script but I’m not sure what happened. I’m now at least back to this

                    yes, MMM-Buttons is busted on upgrade… use my fork

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    G 1 Reply Last reply Reply Quote 0
                    • G Offline
                      gonzonia @sdetweil
                      last edited by

                      @sdetweil Apologies. You did say that already and it didn’t penetrate. Replaced with your fork and it looks like I’m mostly back up. CalendarExt2 doesn’t seem to be loading though. I’ll have to dig into that later.

                      1 Reply Last reply Reply Quote 0
                      • LusbuebL Offline
                        Lusbueb @gonzonia
                        last edited by Lusbueb

                        @gonzonia had same problems and tried several methods. i’m not a linux crack and can only make what other say to try. :see-no-evil_monkey: :grinning_squinting_face:

                        this Post help me: https://forum.magicmirror.builders/topic/16074/electron-rebuild-and-magicmirror-v2-18-and-more/2?page=1

                        1. delete any existing ../modules/MMM-Buttons folder.

                        2. clone the repository in your modules folder:
                          cd ~/MagicMirror/modules
                          git clone https://github.com/MarcLandis/MMM-Buttons.git
                          cd MMM-Buttons

                        3. install magicmirror-rebuild library with this command:
                          npm i magicmirror-rebuild

                        pi@MM:~/MagicMirror/modules/MMM-Buttons $ npm i magicmirror-rebuild
                        
                        added 191 packages, and audited 192 packages in 43s
                        
                        37 packages are looking for funding
                          run `npm fund` for details
                        
                        found 0 vulnerabilities
                        
                        1. try to execute MagicMirror-rebuild script for rebuild with this command:
                          ./node_modules/.bin/MagicMirror-rebuild
                        pi@MM:~/MagicMirror/modules/MMM-Buttons $ ./node_modules/.bin/MagicMirror-rebuild
                        ⠹ MagicMirror Building module: epoll, Completed: 0gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
                        ⠸ MagicMirror Building module: epoll, Completed: 0gyp http GET https://www.electronjs.org/headers/v25.2.0/node-v25.2.0-headers.tar.gz
                        ⠏ MagicMirror Building module: epoll, Completed: 0gyp http 200 https://artifacts.electronjs.org/headers/v25.2.0/node-v25.2.0-headers.tar.gz?force_headers_dist=1
                        ⠼ MagicMirror Building module: epoll, Completed: 0gyp http GET https://www.electronjs.org/headers/v25.2.0/SHASUMS256.txt
                        ⠋ MagicMirror Building module: epoll, Completed: 0gyp http 200 https://artifacts.electronjs.org/headers/v25.2.0/SHASUMS256.txt?force_headers_dist=1
                        ⠙ MagicMirror Building module: epoll, Completed: 0gyp info spawn /usr/bin/python3
                        gyp info spawn args [
                        gyp info spawn args   '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/node-gyp/gyp/gyp_main.py',
                        gyp info spawn args   'binding.gyp',
                        gyp info spawn args   '-f',
                        gyp info spawn args   'make',
                        gyp info spawn args   '-I',
                        gyp info spawn args   '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build/config.gypi',
                        gyp info spawn args   '-I',
                        gyp info spawn args   '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/node-gyp/addon.gypi',
                        gyp info spawn args   '-I',
                        gyp info spawn args   '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/25.2.0/include/node/common.gypi',
                        gyp info spawn args   '-Dlibrary=shared_library',
                        gyp info spawn args   '-Dvisibility=default',
                        gyp info spawn args   '-Dnode_root_dir=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/25.2.0',
                        gyp info spawn args   '-Dnode_gyp_dir=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/node-gyp',
                        gyp info spawn args   '-Dnode_lib_file=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/25.2.0/<(target_arch)/node.lib',
                        gyp info spawn args   '-Dmodule_root_dir=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll',
                        gyp info spawn args   '-Dnode_engine=v8',
                        gyp info spawn args   '--depth=.',
                        gyp info spawn args   '--no-parallel',
                        gyp info spawn args   '--generator-output',
                        gyp info spawn args   'build',
                        gyp info spawn args   '-Goutput_dir=.'
                        gyp info spawn args ]
                        ⠹ MagicMirror Building module: epoll, Completed: 0gyp info spawn make
                        gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
                        make: Verzeichnis „/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build“ wird betreten
                          CXX(target) Release/obj.target/epoll/src/epoll.o
                        ⠹ MagicMirror Building module: epoll, Completed: 0  SOLINK_MODULE(target) Release/obj.target/epoll.node
                        ⠧ MagicMirror Building module: epoll, Completed: 0  COPY Release/epoll.node
                        make: Verzeichnis „/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build“ wird verlassen
                        ✔ MagicMirror Rebuild Complete
                        

                        That you see MagicMirror Rebuild Complete !
                        Your module is now installed correctly

                        This way will also be good for the Originl MMM-Buttons from the Year 2017 and many other modules!

                        if you work with this module https://github.com/Jopyth/MMM-Buttons you must change 2 lines and add 1 line in the file package.json after git clone:

                        a.) change Line 23 from
                        "postinstall": "node_modules/.bin/electron-rebuild -e ../../node_modules/electron" to
                        "postinstall": "node_modules/.bin/magicmirror-rebuild -e ../../node_modules/electron"

                        b.) change Line 29 from
                        "electron-rebuild": "^1.2.1" to
                        "magicmirror-rebuild": "^1.0.0"

                        c.) add a line after line26 from
                        "onoff": "latest" to

                        "onoff": "latest",
                        "magicmirror-rebuild": "latest"
                        

                        after that you can continue with step 3, good luck :)

                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 3
                        • 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