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 Failing on Raspberry Pi Zero W Rev 1.1

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    43 Posts 3 Posters 4.6k 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.
    • D Offline
      davidgagne @sdetweil
      last edited by

      @sdetweil And just to be thorough, here is my install.log. I don’t know what’s going on with those weird unicode characters in the log. And there are lots of “memory leak detected” that I don’t recall seeing back in May.

      install starting  - Thu Aug  1 11:35:10 EDT 2024
      installing on armv6l processor system
      the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye
                     total        used        free      shared  buff/cache   available
      Mem:             429         182          71           7         175         187
      Swap:             99           5          94
      Updating packages ...
      Reading package lists...
      Update failed, retrying installation ...
      Installing helper tools ...
      Reading package lists...
      Building dependency tree...
      Reading state information...
      build-essential is already the newest version (12.9).
      curl is already the newest version (7.74.0-1.3+deb11u12).
      git is already the newest version (1:2.30.2-1+deb11u2).
      unzip is already the newest version (6.0-26+deb11u1).
      wget is already the newest version (1.21-1+deb11u1).
      wget set to manually installed.
      The following package was automatically installed and is no longer required:
        libfuse2
      Use 'sudo apt autoremove' to remove it.
      0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
       this should be a raspberry pi 02w
      increasing swap space
      computing size, want /var/swap=878MByte, checking existing: deleting wrong size file (104857600), generating swapfile ... of 878MBytes
      Check current Node installation ...
      Node.js is not installed.
      Installing Node.js ...
      Node release info = 2024-08-01 11:37:40 - Installing pre-requisites Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease Reading package lists... Reading package lists... Building dependency tree... Reading state information... ca-certificates is already the newest version (20210119). curl is already the newest version (7.74.0-1.3+deb11u12). gnupg is already the newest version (2.2.27-2+deb11u2). The following package was automatically installed and is no longer required: libfuse2 Use 'sudo apt autoremove' to remove it. The following NEW packages will be installed: apt-transport-https 0 upgraded, 1 newly installed, 0 to remove and 39 not upgraded. Need to get 160 kB of archives. After this operation, 166 kB of additional disk space will be used. Get:1 http://mirror.umd.edu/raspbian/raspbian bullseye/main armhf apt-transport-https all 2.2.4 [160 kB] Fetched 160 kB in 1s (126 kB/s) Selecting previously unselected package apt-transport-https.
       (Reading database ... 
      (Reading database ... 5%
      (Reading database ... 10%
      (Reading database ... 15%
      (Reading database ... 20%
      (Reading database ... 25%
      (Reading database ... 30%
      (Reading database ... 35%
      (Reading database ... 40%
      (Reading database ... 45%
      (Reading database ... 50%
      (Reading database ... 55%
      (Reading database ... 60%
      (Reading database ... 65%
      (Reading database ... 70%
      (Reading database ... 75%
      (Reading database ... 80%
      (Reading database ... 85%
      (Reading database ... 90%
      (Reading database ... 95%
      (Reading database ... 100%
      (Reading database ... 106675 files and directories currently installed.)
       Preparing to unpack .../apt-transport-https_2.2.4_all.deb ...
       Unpacking apt-transport-https (2.2.4) ...
       Setting up apt-transport-https (2.2.4) ...
       Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease Get:3 https://deb.nodesource.com/node_20.x nodistro InRelease [12.1 kB] Get:4 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages [8,776 B] Fetched 20.9 kB in 5s (3,822 B/s) Reading package lists... 2024-08-01 11:39:23 - Repository configured successfully. 2024-08-01 11:39:23 - To install Node.js, run: apt-get install nodejs -y 2024-08-01 11:39:23 - You can use N|solid Runtime as a node.js alternative 2024-08-01 11:39:23 - To install N|solid Runtime, run: apt-get install nsolid -y 
      node 20.x version installer not available, doing manually
      Reading package lists...
      Building dependency tree...
      Reading state information...
      libstdc++6 is already the newest version (10.2.1-6+rpi1).
      The following package was automatically installed and is no longer required:
        libfuse2
      Use 'sudo apt autoremove' to remove it.
      0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
      using release tar file = node_release-v20.9.0.tar.gz
      node version is v20.9.0
      Node.js installation Done! version=v20.9.0
      Check current NPM installation ...
      NPM currently installed. Checking version number.
      Minimum npm version: V10.1.0
      Installed npm version: V10.1.0
      No npm upgrade necessary.
      Cloning MagicMirror ...
      Cloning MagicMirror Done!
      Installing dependencies ...
      > magicmirror@2.28.0 postinstall > npm run install-vendor && npm run install-fonts && echo "MagicMirror² installation finished successfully! > " > magicmirror@2.28.0 install-vendor > echo "Installing vendor files ... > " && cd vendor && npm install --loglevel=error --no-audit --no-fund --no-update-notifier Installing vendor files ... added 10 packages in 1m > magicmirror@2.28.0 install-fonts > echo "Installing fonts ... > " && cd fonts && npm install --loglevel=error --no-audit --no-fund --no-update-notifier Installing fonts ... added 2 packages in 36s MagicMirror² installation finished successfully! > magicmirror@2.28.0 prepare > [ -f node_modules/.bin/husky ] && husky || echo no husky installed. no husky installed. added 433 packages in 19m 101 packages are looking for funding run `npm fund` for details
      Dependencies installation Done!
      package.json update for armv6l or Electron missing, completed ok
      setting up initial config.js
      Check plymouth installation ...
      Splashscreen: Checking themes directory.
      Splashscreen: Create theme directory if not exists.
      Splashscreen: Changed theme to MagicMirror successfully.
      disable screensaver via gsettings was true and uint32 300
      disable screensaver via lightdm.conf
      disable screensaver via lxsession
      install and setup pm2
      pm2 not installed, installing
      pm2 install result (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (Use `node --trace-warnings ...` to show where the warning was created) (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit (node:2290) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit added 138 packages in 3m
      get the pm2 platform specific startup command
      startup command = sudo env PATH=$PATH:/usr/local/bin /usr/local/lib/node_modules/pm2/bin/pm2 startup systemd -u dvg --hp /home/dvg
      
                              -------------
      
      __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
       _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
        _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
         _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
          _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
           _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
            _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
             _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
              _\///______________\///______________\///__\///////////////__
      
      
                                Runtime Edition
      
              PM2 is a Production Process Manager for Node.js applications
                           with a built-in Load Balancer.
      
                      Start and Daemonize any application:
                      $ pm2 start app.js
      
                      Load Balance 4 instances of api.js:
                      $ pm2 start api.js -i 4
      
                      Monitor in production:
                      $ pm2 monitor
      
                      Make pm2 auto-boot at server restart:
                      $ pm2 startup
      
                      To go further checkout:
                      http://pm2.io/
      
      
                              -------------
      
      [PM2] Init System found: systemd
      Platform systemd
      Template
      [Unit]
      Description=PM2 process manager
      Documentation=https://pm2.keymetrics.io/
      After=network.target
      
      [Service]
      Type=forking
      User=dvg
      LimitNOFILE=infinity
      LimitNPROC=infinity
      LimitCORE=infinity
      Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/usr/local/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
      Environment=PM2_HOME=/home/dvg/.pm2
      PIDFile=/home/dvg/.pm2/pm2.pid
      Restart=on-failure
      
      ExecStart=/usr/local/lib/node_modules/pm2/bin/pm2 resurrect
      ExecReload=/usr/local/lib/node_modules/pm2/bin/pm2 reload all
      ExecStop=/usr/local/lib/node_modules/pm2/bin/pm2 kill
      
      [Install]
      WantedBy=multi-user.target
      
      Target path
      /etc/systemd/system/pm2-dvg.service
      Command list
      [ 'systemctl enable pm2-dvg' ]
      [PM2] Writing init configuration in /etc/systemd/system/pm2-dvg.service
      [PM2] Making script booting at startup...
      [PM2] [-] Executing: systemctl enable pm2-dvg...
      Created symlink /etc/systemd/system/multi-user.target.wants/pm2-dvg.service → /etc/systemd/system/pm2-dvg.service.
      [PM2] [v] Command successfully executed.
      +---------------------------------------+
      [PM2] Freeze a process list on reboot via:
      $ pm2 save
      
      [PM2] Remove init script via:
      $ pm2 unstartup systemd
      pm2 startup command done
      configure the pm2 config file for MagicMirror
      rename pm2 process in pm2_MagicMirror.json
      the user is not pi
      change pm2_MagicMirror.json
      now using this config file pm2_MagicMirror_new.json
      start MagicMirror via pm2 now
      save MagicMirror pm2 config now
      stop MagicMirror via pm2 now
      We're ready! Run pm2 start pm2 from the ~/MagicMirror directory to start your MagicMirror.
      install completed - Thu Aug  1 12:08:49 EDT 2024
      
      S 1 Reply Last reply Reply Quote 0
      • D Offline
        davidgagne @sdetweil
        last edited by

        @sdetweil I scoured the forums and found someone else complaining about electron being missing.

        I ran this sudo npm i -g npm@6 and now it seems to be working fine.

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

          @davidgagne that makes no sense… the latest version of npm is 10.x
          and you just installed v6… (maybe)

          do

          npm -v

          Sam

          How to add modules

          learning how to use browser developers window for css changes

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

            @davidgagne said in MagicMirror Failing on Raspberry Pi Zero W Rev 1.1:

            MaxListenersExceededWarning: Possible EventEmitter memory

            that is an npm bug… nothing we can do anything about. no impact on install

            unicode… those are shell escape codes for color (the colors don’t show in the file, only on the actual console)

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • D Offline
              davidgagne @sdetweil
              last edited by

              @sdetweil npm -v returns 6.14.18 (and it takes a solid 45 seconds to do that, which seems like a very long time for such a simple command, even on a Zero).

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

                @davidgagne do free -m

                pi is small on memory, so running off sd card a lot…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                D 1 Reply Last reply Reply Quote 0
                • D Offline
                  davidgagne @sdetweil
                  last edited by

                  @sdetweil I was wrong. It’s not working fine.

                  It was working fine. Then I rebooted to make sure everything was fine. Comes back up with no problem.

                  Then I ssh-ed to it, installed a module, ran npm install inside the new module’s directory, execute pm2 start MagicMirror, and now MM crashes again looking for electron.

                  So frustrating.

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

                    @sdetweil Can I run sudo npm i -g npm@10 to upgrade to v10?

                    Also: Can you help with getting my forum account upgraded so I don’t have all my posts queued for approval?

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

                      @davidgagne said in MagicMirror Failing on Raspberry Pi Zero W Rev 1.1:

                      pm2 start MagicMirror, and now MM crashes again looking for electron.

                      if you do

                      cd ~/MagicMirror
                      npm start 
                      

                      what happens?

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      D 1 Reply Last reply Reply Quote 0
                      • D Offline
                        davidgagne @sdetweil
                        last edited by sdetweil

                        @sdetweil Here is the output from npm start called from within MM folder:

                        > magicmirror@2.28.0 start /home/dvg/MagicMirror
                        > ./run-start.sh $1
                        
                        [2024-08-01 14:22:15.896] [LOG] Starting MagicMirror: v2.28.0
                        [2024-08-01 14:22:17.801] [LOG] Loading config ...
                        [2024-08-01 14:22:17.876] [LOG] config template file not exists, no envsubst
                        [2024-08-01 14:22:37.345] [LOG] Loading module helpers ...
                        [2024-08-01 14:22:37.587] [LOG] No helper found for module: alert.
                        [2024-08-01 14:22:39.311] [LOG] Initializing new module helper ...
                        [2024-08-01 14:22:39.627] [LOG] Module helper loaded: updatenotification
                        [2024-08-01 14:22:39.840] [LOG] No helper found for module: clock.
                        [2024-08-01 14:22:40.776] [LOG] Initializing new module helper ...
                        [2024-08-01 14:22:40.933] [LOG] Module helper loaded: mmm-systemtemperature
                        [2024-08-01 14:22:41.119] [LOG] No helper found for module: compliments.
                        [2024-08-01 14:22:41.252] [LOG] No helper found for module: weather.
                        [2024-08-01 14:22:41.370] [LOG] No helper found for module: weather.
                        [2024-08-01 14:22:41.440] [LOG] No helper found for module: weather.
                        [2024-08-01 14:22:41.542] [LOG] All module helpers loaded.
                        [2024-08-01 14:22:43.350] [LOG] Starting server on port 8080 ...
                        [2024-08-01 14:22:44.452] [WARN]  You're using a full whitelist configuration to allow for all IPs 
                        [2024-08-01 14:22:46.725] [LOG] Server started ...
                        [2024-08-01 14:22:46.942] [LOG] Connecting socket for: updatenotification
                        [2024-08-01 14:22:47.186] [LOG] Starting module helper: updatenotification
                        [2024-08-01 14:22:47.362] [LOG] Connecting socket for: mmm-systemtemperature
                        [2024-08-01 14:22:47.504] [LOG] Starting node helper: mmm-systemtemperature
                        [2024-08-01 14:22:47.554] [LOG] Sockets connected & modules started ...
                        [2024-08-01 14:22:47.633] [INFO]
                        >>> Ready to go! Please point your browser to: http://0.0.0.0:8080 <<<
                        Starting chromium browser now, have patience, it takes a minute
                        Chromium_browser not installed
                        ./run-start.sh: line 79: 11125 Killed                  node serveronly
                        
                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 1 / 5
                        • 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