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.

    MMM-Pages module all showing on one page

    Scheduled Pinned Locked Moved Solved Troubleshooting
    26 Posts 3 Posters 1.7k 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.
    • plainbrokeP Offline
      plainbroke @sdetweil
      last edited by

      @sdetweil
      Sam,
      MMM-Adventskalendar, causes Your Pages to load all 50 of my modules on one page. I removed it and installed MMM-MyTeams-Adventskalendar and it works fine, now… Could not figure out what was actually causing it. Something about picture not having naming text. Didn’t know that would cause it to freak out.

      Slow learner. But trying anyways.
      MM is on Raspberry Pi 4B w/8gb ram loaded on a 128gb nvme drive.
      Running Trixie and the latest MM version.

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

        @sdetweil : Thanks for the help! Here’s what I copied from the dev console after filtering for “Page”:

        • Failed to load resource: the 8080/modules/MMM-page-indicator/MMM-page-indicator.js:1 server responded with a status of 404 (Not Found)

        • Refused to execute script from ‘http://localhost:8080/modules/MMM-page-indicator/MMM-page-indicator.js’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.

        • Refused to apply style from ‘http://localhost:8080/modules/MMM-pages/pages.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.

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

          @plainbroke thx… will look at it
          I added it with example params and it works with pages just fine…

          {
              module: "MMM-Adventskalender",
              classes:"page1",   // on my pages def
              position: "top_center",
              config: {
                  backgroundImage: "/modules/MMM-Adventskalender/images/background.jpg",
                  doorMargin: 30,
                  moduleWidth: 800,
                  moduleHeight: 600,
                  autopen: true,
                  autoopenat: "10:00",
              },
          },
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

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

            @hahawoooooo weird… none of those make sense…

            not found, then not executable
            and css… typically that means not found

            is this on a synology nas, and docker for MM??

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            H 1 Reply Last reply Reply Quote 0
            • H Offline
              hahawoooooo @sdetweil
              last edited by

              @sdetweil I was a bit flummoxed myself, honestly. It’s on a raspberry pi, and I’m not using docker.

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

                @hahawoooooo can you do

                cd ~/MagicMirror/modules
                ls -laF
                

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                H 1 Reply Last reply Reply Quote 0
                • H Offline
                  hahawoooooo @sdetweil
                  last edited by

                  @sdetweil Sure thing:

                  total 32
                  drwxr-xr-x 8 dtraindisplay dtraindisplay 4096 Dec 2 21:36 ./
                  drwxr-xr-x 16 dtraindisplay dtraindisplay 4096 Dec 2 21:15 …/
                  drwxr-xr-x 10 dtraindisplay dtraindisplay 4096 Dec 2 21:08 default/
                  drwxr-xr-x 7 dtraindisplay dtraindisplay 4096 Dec 2 21:36 MMM-CalendarExt3/
                  drwxr-xr-x 5 dtraindisplay dtraindisplay 4096 Dec 2 21:37 MMM-LINQConnectCalendar/
                  drwxr-xr-x 4 dtraindisplay dtraindisplay 4096 Dec 2 21:30 MMM-mmpm/
                  drwxr-xr-x 7 dtraindisplay dtraindisplay 4096 Dec 2 21:34 MMM-page-indicator/
                  drwxr-xr-x 5 dtraindisplay dtraindisplay 4096 Dec 2 21:34 MMM-pages/

                  I also tried doing a fresh install using the install script in a new folder, and I’m running into the same issue, but the console logs (ctrl+shift_I) is now showing a different output:

                  loader.js:179 Load script: modules/MMM-pages/MMM-pages.js
                  module.js:489 Module registered: MMM-pages
                  loader.js:152 Bootstrapping module: MMM-pages
                  loader.js:156 Scripts loaded for: MMM-pages
                  loader.js:195 Load stylesheet: modules/MMM-pages/pages.css
                  loader.js:159 Styles loaded for: MMM-pages
                  loader.js:162 Translations loaded for: MMM-pages
                  loader.js:179 Load script: modules/MMM-page-indicator/MMM-page-indicator.js
                  module.js:489 Module registered: MMM-page-indicator
                  loader.js:152 Bootstrapping module: MMM-page-indicator
                  loader.js:156 Scripts loaded for: MMM-page-indicator
                  loader.js:195 Load stylesheet: modules/MMM-page-indicator/page-indicators.css
                  loader.js:159 Styles loaded for: MMM-page-indicator
                  loader.js:162 Translations loaded for: MMM-page-indicator
                  MMM-page-indicator.js:138 [MMM-page-indicator]: MMM-pages detected. Will ignore PAGE_INCREMENT and PAGE_DECREMENT as it is already handled by MMM-pages
                  MMM-pages.js:117 [MMM-pages] received that all objects are created; will now hide things!
                  MMM-pages.js:331 [MMM-pages] resuming rotation
                  MMM-page-indicator.js:106 [MMM-page-indicator]: Changing maximum pages to 2
                  MMM-page-indicator.js:131 [MMM-page-indicator]: Setting page to 0
                  main.js:527 Uncaught (in promise) TypeError: searchClass.toLowerCase is not a function
                  at main.js:527:38
                  at Array.filter ()
                  at modulesByClass (main.js:523:31)
                  at Array.exceptWithClass (main.js:508:11)
                  at Class.animatePageChange (MMM-pages.js:234:8)
                  at Class.notificationReceived (MMM-pages.js:121:14)
                  at sendNotification (main.js:101:12)
                  at main.js:70:4

                  I also

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

                    @hahawoooooo interesting
                    Can you do

                    cd ~/MagicMirror/modules/MMM-pages
                    grep version package.json

                    Latest is 1.3.0
                    If not 1.3.0
                    git pull

                    The restart MagicMirror

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    plainbrokeP H 2 Replies Last reply Reply Quote 0
                    • plainbrokeP Offline
                      plainbroke @sdetweil
                      last edited by plainbroke

                      @sdetweil
                      I think I found my answer, I was on version 1.0.0 of MMM-pages.
                      We will see what happens with Version 1.3.0 in the morning.
                      I did the git pull.

                      Slow learner. But trying anyways.
                      MM is on Raspberry Pi 4B w/8gb ram loaded on a 128gb nvme drive.
                      Running Trixie and the latest MM version.

                      1 Reply Last reply Reply Quote 1
                      • H Offline
                        hahawoooooo @sdetweil
                        last edited by

                        @sdetweil Good catch on that one - there are two MMM-Pages listed in the third party module website, and I was using your fork which is at 1.0.0. I uninstalled that version and installed the 1.3.0 version, but still having the same issue with all modules on one page.

                        I need to get a bit more sleep and look again just to make sure I did everything correctly after the changes.

                        One thing I noticed is I’m getting socket.io connection errors in the logs. where it repeatedly tries connecting and then fails. I can grab the log texts when I get back home tonight if that’s anywhere related to the problem.

                        S H 2 Replies Last reply Reply Quote 0
                        • S Do not disturb
                          sdetweil @hahawoooooo
                          last edited by

                          @hahawoooooo I think this is a totally different problem…

                          are you using node 22.18.0 on the system?
                          node inside this electron version is 22.18

                          are you using a browser or is this the electron page started by npm start?

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          1 Reply Last reply Reply Quote 0
                          • H Offline
                            hahawoooooo @hahawoooooo
                            last edited by

                            Node version is 22.18.0, and I’m using pm2 to start it. I changed the mm.sh file to open it via firefox.

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

                              @hahawoooooo so you are doing npm run server and then launching firefox…
                              or is this my runstart.sh and u set the env variable for firefox as the browser over server

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              H 1 Reply Last reply Reply Quote 0
                              • H Offline
                                hahawoooooo @sdetweil
                                last edited by

                                @sdetweil To be honest, I need to get a bit smarter about the difference between the different start options (npm, pm2, mmpm, running over server). I’m currently just running pm2 start locally and not running a server.

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

                                  @hahawoooooo

                                  MM is a server with a browser auto started (npm start, electron is the browser), and with any browser connecting too
                                  or
                                  MM can be a server (npm run server) with any browser connecting from anywhere

                                  MM is just an app…

                                  you can configure the system to start an app on boot multiple ways

                                  you can edit the system startup settings,
                                  different on window, mac, linx (and diff linux versions)

                                  OR you can run ANOTHER app, that does all that work for you
                                  pm2 (node process manager v2)
                                  it can start many different apps (mm , mmpm, and any other tool you like,

                                  I have a spotify plugin on another mirror app, it can use the spotify api to play, pause, blah blah
                                  if I install and start the spotify player daemon… (librespot or raspotify on pi)
                                  I use pm2 to launch that too , and I can play on this machine.

                                  the cool thing about pm2 is YOU don’t need to know HOW the system autostart works,
                                  pm2 handles all that for you…

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  H 1 Reply Last reply Reply Quote 0
                                  • H Offline
                                    hahawoooooo @sdetweil
                                    last edited by sdetweil

                                    @sdetweil Thanks for the explainer! That really helps to clarify things a bit.

                                    I am using pm2 to start, and it is running with the electron browser, with the MM running directly on the Raspberry Pi. Your explanation made me realize I can open the magic mirror from any browser in the house while I’m troubleshooting, which is really helpful!

                                    I still haven’t figured out why the page timing rotation doesn’t work at all. Even if I set modules on different pages (page 0 and page 1, for instance), they all load in when I start up the MM. It’s like the pages aren’t loaded in, so they’re nothing to switch between.

                                    Here are the logs on firefox from a separate computer while the server is running on the Pi:


                                    [CX3] Module is not prepared yet, wait a while. MMM-CalendarExt3.js:396:11
                                    [CX3A] Module is not prepared yet, wait a while. MMM-CalendarExt3Agenda.js:186:11
                                    Uncaught (in promise) TypeError: searchClass.toLowerCase is not a function
                                        newModules http://192.168.1.180:8080/js/main.js:526
                                        modulesByClass http://192.168.1.180:8080/js/main.js:522
                                        exceptWithClass http://192.168.1.180:8080/js/main.js:507
                                        animatePageChange http://192.168.1.180:8080/modules/MMM-pages/MMM-pages.js:220
                                        notificationReceived http://192.168.1.180:8080/modules/MMM-pages/MMM-pages.js:117
                                        sendNotification http://192.168.1.180:8080/js/main.js:101
                                        createDomObjects http://192.168.1.180:8080/js/main.js:70
                                    main.js:526:38
                                    module tries to update the DOM without being displayed. main.js:678:9
                                    module tries to update the DOM without being displayed. main.js:678:9
                                    module tries to update the DOM without being displayed. main.js:678:9
                                    module tries to update the DOM without being displayed. main.js:678:9
                                    module tries to update the DOM without being displayed. main.js:678:9
                                    module tries to update the DOM without being displayed. 2 main.js:678:9
                                    module tries to update the DOM without being displayed. main.js:678:9
                                    module tries to update the DOM without being displayed. 5 main.js:678:9
                                    module tries to update the DOM without being displayed. main.js:678:9
                                    module tries to update the DOM without being displayed. 2 main.js:678:9
                                    module tries to update the DOM without being displayed. 3 main.js:678:9
                                    module tries to update the DOM without being displayed. main.js:678:9
                                    module tries to update the DOM without being displayed. main.js:678:9
                                    

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

                                      @hahawoooooo

                                      Please use code block around logs, code or config

                                      Uncaught (in promise) TypeError: searchClass.toLowerCase is not a function
                                      newModules http://192.168.1.180:8080/js/main.js:526
                                      modulesByClass http://192.168.1.180:8080/js/main.js:522
                                      exceptWithClass http://192.168.1.180:8080/js/main.js:507
                                      animatePageChange http://192.168.1.180:8080/modules/MMM-pages/MMM-pages.js:220
                                      notificationReceived http://192.168.1.180:8080/modules/MMM-pages/MMM-pages.js:117
                                      

                                      Can you post your pages config

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

                                      H 1 Reply Last reply Reply Quote 0
                                      • H Offline
                                        hahawoooooo @sdetweil
                                        last edited by sdetweil

                                        @sdetweil Sure thing!

                                        {  //MMM-Pages
                                                module: "MMM-pages",					// flip between pages - goal was to set full page calendar on one page, rest on other
                                                config: {
                                        			timings: {
                                        				default: 5000			// rotate every 5 seconds
                                        			},
                                        			modules: [
                                                                        ['weather',                          // page 0	
                                        				'MMM-CalendarExt3',
                                        				'MMM-CalendarExt3Agenda',
                                        				'MMM-Chores',
                                        				'MMM-Dad-Jokes'
                                        			   ],        				                
                                                       ['MMM-TitanSchoolMealMenu'],        // page 1
                                        				],
                                        			fixed: [
                                        					['MMM-page-indicator',						// what to show on every page
                                        					'MMM-SmartTouch',
                                        					'clock',
                                        					'MMM-MagicMover',
                                        					'MMM-Wallpaper']
                                        				],
                                        			hiddenPages:{					// modules to not show, or to hide in specific pages 
                                        				"hidden": [
                                        					'calendar', 
                                        					'updatenotification',
                                        					'MMM-Remote-Control'
                                        					],      
                                        				}
                                        			}
                                        
                                        H 1 Reply Last reply Reply Quote 0
                                        • H Offline
                                          hahawoooooo @hahawoooooo
                                          last edited by

                                          Okay, I may have discovered the reason of the pages not rotating, the “searchClass.toLowerCase” not being found, and possibly a of other small strangeness I was seeing.

                                          I was running the latest version of magic mirror without realizing you have to do a fresh wipe and re-install for major Raspberry Pi OS updates. I had put aside this project for about a year or so, and picked it back up in October without updating to Trixie.

                                          I’m working through the OS update and restoring everything from the restore scripts to see how it runs. Fingers crossed!

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

                                            @hahawoooooo you do NOT Have to do a wipe and install again…

                                            generally that error message means it was trying to do a string operation (toLowerCase), but the thing was not a string (usually null )

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            H 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
                                            • 2
                                            • 1 / 2
                                            • 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