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.

    MagicMirror cannot start (UnhandledPromiseRejectionWarning)

    Scheduled Pinned Locked Moved Solved Troubleshooting
    6 Posts 3 Posters 1.4k 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.
    • K Offline
      Klinge
      last edited by

      Hi,

      my MagicMirror cannot start. If I enter in the MagicMirror folder DISPLAY=:0 npm start, the start process stop with the following error message

      pi@raspberrypi:~/MagicMirror $ DISPLAY=:0 npm start
      
      > magicmirror@2.26.0 start
      > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      
      [02.01.2024 13:42.14.476] [LOG]   Starting MagicMirror: v2.26.0
      [02.01.2024 13:42.14.486] [LOG]   Loading config ...
      [02.01.2024 13:42.14.494] [DEBUG] config template file not exists, no envsubst
      [02.01.2024 13:42.14.505] [LOG]   Loading module helpers ...
      [02.01.2024 13:42.14.507] [LOG]   No helper found for module: alert.
      [02.01.2024 13:42.14.572] [ERROR] (node:1277) UnhandledPromiseRejectionWarning: Error: Cannot find module 'command-exists'
      Require stack:
      - /home/pi/MagicMirror/modules/default/updatenotification/update_helper.js
      - /home/pi/MagicMirror/modules/default/updatenotification/node_helper.js
      - /home/pi/MagicMirror/js/app.js
      - /home/pi/MagicMirror/js/electron.js
      - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
      -
          at node:internal/modules/cjs/loader:1084:15
          at Function.<anonymous> (node:electron/js2c/browser_init:2:117419)
          at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
          at node:internal/modules/cjs/loader:929:27
          at Function._load (node:electron/js2c/asar_bundle:2:13327)
          at Module.require (node:internal/modules/cjs/loader:1150:19)
          at require (node:internal/modules/cjs/helpers:110:18)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/default/updatenotification/update_helper.js:3:23)
          at Module._compile (node:internal/modules/cjs/loader:1271:14)
          at Object..js (node:internal/modules/cjs/loader:1326:10)
          at Module.load (node:internal/modules/cjs/loader:1126:32)
          at node:internal/modules/cjs/loader:967:12
          at Function._load (node:electron/js2c/asar_bundle:2:13327)
          at Module.require (node:internal/modules/cjs/loader:1150:19)
          at require (node:internal/modules/cjs/helpers:110:18)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/default/updatenotification/node_helper.js:4:22)
      (Use `electron --trace-warnings ...` to show where the warning was created)
      [02.01.2024 13:42.14.573] [ERROR] (node:1277) 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)
      [1277:0102/134215.069790:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files
      ^C/home/pi/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
      

      At the beginning from the start process, the Log write that the config.js file doesn´t exists. But that is not correct. The config file exists in the /config folder.

      It would be really nice, if you someone can help me.

      Thank you in advance.

      Best regards
      Klinge

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @Klinge
        last edited by

        @Klinge please do

        cd ~/MagicMirror
        npm install
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        K 1 Reply Last reply Reply Quote -1
        • K Offline
          Klinge @sdetweil
          last edited by

          @sdetweil Hi Sam, now it works. Thank you for your advice :-)

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @Klinge
            last edited by

            @Klinge thanks… did you do the two part command originally

            git pull && npm run install-mm
            

            trying to see if the expression failed

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • SteffS Offline
              Steff
              last edited by

              Encountering the same problem, however npm install throws an error message:

              npm ERR! code EBADENGINE
              npm ERR! engine Unsupported engine
              npm ERR! engine Not compatible with your version of node/npm: magicmirror@2.26.0
              npm ERR! notsup Not compatible with your version of node/npm: magicmirror@2.26.0
              npm ERR! notsup Required: {"node":">=18"}
              npm ERR! notsup Actual:   {"npm":"8.19.4","node":"v16.20.2"}
              

              The “normal” update of my raspi via sudo apt- update & upgrade did not bring any changes, I had to update the node version manually:

              Update node version
              Please do not forget to log-off / log-on after nvm installation

              This helped now the npm install did run through and my magic mirror start again.

              Hope this is helpful for others who are encountering the same problem…

              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @Steff
                last edited by

                @Steff use my install/upgrade scripts. they do all this work

                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