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.

    Huge number of errors in log fills up HD

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    9 Posts 3 Posters 640 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.
    • C Offline
      cpcode
      last edited by

      My board had been working great since last November, until a few weeks ago when it started shutting off randomly and would not stay on.
      I checked the logs this morning and there were about 15GB in the MagicMirror-error.log, which had completely filled up the HD. I deleted the log, then installed rotatelog, and figured everything is good.

      However, a couple hours later I have the same problem: I am seeing a huge amount of log entries happen very fast in the .pm2/logs folder. Note that this is happening even though Magic Mirror is NOT visible on the screen - it’s just the standard Raspberry PI home screen. I’m not sure if MM is still running somewhere. I am running Magic Mirror 2.30.0

      Running the command “ps axg” shows a bunch of running processes including several in the MagicMirror folders.

      Here’s a sample of the ‘out’ log file while MM was running:

      [2025-02-06 18:20:37.636] [INFO]  System information:
      ### SYSTEM: manufacturer: ; model: ; virtual: false
      ### OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.6.62+rpt-rpi-2712
      ### VERSIONS: electron: undefined; used node: 22.11.0; installed node: 22.11.0; npm: 10.9.0; pm2: 5.4.3
      ### OTHER: timeZone: America/Chicago; ELECTRON_ENABLE_GPU: undefined
      [2025-02-06 18:20:40.042] [LOG] Starting MagicMirror: v2.30.0
      [2025-02-06 18:20:40.776] [INFO]  System information:
      ### SYSTEM: manufacturer: ; model: ; virtual: false
      ### OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.6.62+rpt-rpi-2712
      ### VERSIONS: electron: undefined; used node: 22.11.0; installed node: 22.11.0; npm: 10.9.0; pm2: 5.4.3
      ### OTHER: timeZone: America/Chicago; ELECTRON_ENABLE_GPU: undefined
      [2025-02-06 18:20:43.152] [LOG] Starting MagicMirror: v2.30.0
      [2025-02-06 18:20:43.843] [INFO]  System information:
      ### SYSTEM: manufacturer: ; model: ; virtual: false
      ### OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.6.62+rpt-rpi-2712
      ### VERSIONS: electron: undefined; used node: 22.11.0; installed node: 22.11.0; npm: 10.9.0; pm2: 5.4.3
      ### OTHER: timeZone: America/Chicago; ELECTRON_ENABLE_GPU: undefined
      [2025-02-06 18:20:46.271] [LOG] Starting MagicMirror: v2.30.0
      [2025-02-06 18:20:46.983] [INFO]  System information:
      ### SYSTEM: manufacturer: ; model: ; virtual: false
      ### OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.6.62+rpt-rpi-2712
      ### VER

      You can see how quickly they pile up, every 3 seconds. I’m guessing these will go away when MM starts succesfully.

      And here’s the recurring error in the error log - this whole thing also repeats every 3 seconds:

      [2025-08-16 18:39:26.567] [ERROR] TypeError: Cannot read properties of undefined (reading ‘disableHardwareAcceleration’)
       at Object. (/home/cpcode/MagicMirror/js/electron.js:18:6)
       at Module._compile (node:internal/modules/cjs/loader:1546:14)
       at Object…js (node:internal/modules/cjs/loader:1689:10)
       at Module.load (node:internal/modules/cjs/loader:1318:32)
       at Function._load (node:internal/modules/cjs/loader:1128:12)
       at Object. (/home/cpcode/.config/nvm/versions/node/v22.11.0/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
       at Module._compile (node:internal/modules/cjs/loader:1546:14)
       at Object…js (node:internal/modules/cjs/loader:1689:10)
       at Module.load (node:internal/modules/cjs/loader:1318:32)
       at Function._load (node:internal/modules/cjs/loader:1128:12)
       at TracingChannel.traceSync (node:diagnostics_channel:315:14)
       at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
       at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
       at node:internal/main/run_main_module:36:49
      [2025-08-16 18:39:26.568] [ERROR] Whoops! There was an uncaught exception…
      [2025-08-16 18:39:26.569] [ERROR] TypeError: Cannot read properties of undefined (reading ‘disableHardwareAcceleration’)
       at Object. (/home/cpcode/MagicMirror/js/electron.js:18:6)
       at Module._compile (node:internal/modules/cjs/loader:1546:14)
       at Object…js (node:internal/modules/cjs/loader:1689:10)
       at Module.load (node:internal/modules/cjs/loader:1318:32)
       at Function._load (node:internal/modules/cjs/loader:1128:12)
       at Object. (/home/cpcode/.config/nvm/versions/node/v22.11.0/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
       at Module._compile (node:internal/modules/cjs/loader:1546:14)
       at Object…js (node:internal/modules/cjs/loader:1689:10)
       at Module.load (node:internal/modules/cjs/loader:1318:32)
       at Function._load (node:internal/modules/cjs/loader:1128:12)
       at TracingChannel.traceSync (node:diagnostics_channel:315:14)
       at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
       at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
       at node:internal/main/run_main_module:36:49
      [2025-08-16 18:39:26.569] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [2025-08-16 18:39:26.569] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues

      The ‘cannot read properties of undefined’ error seems to point to electron, but I have no idea what could have changed there.
      What can I do to further debug or fix this issue? Thanks much.

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

        @cpcode so, this sounds like possibly 2 problems

        1. power supply failing. another user reported similar weird unable to run MagicMirror

        2. sd card failure. they do fail quite often

        pm2 flush

        will clear the logs

        but i would investigate both these

        if not done recently, backup your MagicMirror config
        maybe use my backup script . make sure to get the backup off the MagicMirror disk.

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

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          cpcode @sdetweil
          last edited by

          @sdetweil Thanks for the reply - some additional info:

          • Magic Mirror works fine when I start it, after clearing the logs (getting more HD space). All modules seem to work properly. Things only start failing catastrophically when the logs fill up the disk completely.
          • I tried pm2 flush but it only deleted the log in the /.pm2 folder, it didn’t delete anything in the /.pm2/logs subfolder. This is where all the big logs are. I’ve been deleting those log files manually for now, every few minutes.
          • The power seems to work fine when only the PI OS is up and running, and before the HD fills up, but I’ll check on it.

          I will look into the SD card, that could definitely be the cause. I will also backup my latest, thank you for the suggestion. Can you think of a way to debug the ‘DisableHardwareAcceleration’ issue somehow?
          Thanks again.

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

            @cpcode said in Huge number of errors in log fills up HD:

            Can you think of a way to debug the ‘DisableHardwareAcceleration’

            this indicates that there may be disc corruption on the SD card.

            weird behaviour usually brings out the worst…

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            C 1 Reply Last reply Reply Quote 0
            • C Offline
              cpcode @sdetweil
              last edited by

              @sdetweil Looking into the SD card now, this is my first time with this type of issue. Is there a way to check if the card is corrupted or not? There seem to be some Windows utilities, and maybe some in the PI itself, but I’m not having tons of luck yet.

              If it’s corrupted, is the standard practice to start over with a new SD card (reinstall RPI OS, restore MM backups, …), or are there ways to try and fix the existing card before it goes in the garbage? Like maybe reformatting the same card? Seeing as SD cards fail often, I hope there’s a consensus on what is the best course of action.

              Thanks again.

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

                @cpcode once the SD card fails, there is no recovery… I have lost 10 over the last 7 or 8 years.

                far as I know there is no technique to discover the problem. there no write failed error produced , so the software ‘thinks’ all is good, when its not…

                so you get random stuff all over the place…

                and it only gets worse

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                C 1 Reply Last reply Reply Quote 0
                • C Offline
                  cpcode @sdetweil
                  last edited by

                  @sdetweil Well that makes things easier, I’ll buy one or two more cards and start over. Really grateful for your help, this could have taken me way longer.

                  While I was troubleshooting I saw other threads about backups - I am comfortable backing up Magic Mirror, especially with your script, but is there a solid way to image an entire SD card (RPI and all) so in the future I could just push the image to a new SD? I saw the ‘dd’ command mentioned, but I don’t have another Unix system, just Windows.

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

                    @cpcode dd/image gets you the same thing

                    there are image creation tools for windows

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • plainbrokeP Offline
                      plainbroke @cpcode
                      last edited by

                      @cpcode
                      Once your have your setup completed, to what you want. You can use Win32Diskimager to make a .img file that you can reinstall with balenaetcher or RaspberryPiImager. I went to USB devices or NVMe drives.
                      I use Sam’s backup mainly to save my config.js and custom.css files so I never loose the main settings to the Current MM I have running. The list of modules helps too.
                      I also keep a module folder backup BACKUP is so critical if you are using sd cards.

                      Slow learner. But trying anyways.

                      1 Reply Last reply Reply Quote 1
                      • 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