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.

    Looking for Beta-testers!

    Scheduled Pinned Locked Moved MagicMirror
    56 Posts 17 Posters 63.3k Views 18 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
      gismo2006
      last edited by

      @Jopyth some time ago my mirror suddenly didn’t work whit pm2. From one day to the other. I changed nothing and it works fine before. I didn’t know what happens. But then I found a little order in the display when I prompt pm2 start mm… I didn’ t rember the order but I know pm2 worked some second displayed something and then everything works fine again. …

      Maybe you found something , too

      Greets gismo

      1 Reply Last reply Reply Quote 0
      • MichMichM Offline
        MichMich
        last edited by

        Guys, I’ve just made a modification that hides a region if all modules in a region are hidden. This should prevent unwanted margins when a region (like the top_bar) only contains hidden modules. This allows my to move the updatenotification module to the topbar.

        Due to the nature of the change, this could cause some serious issues if it contains any missed bugs. It would be great if you guys gan pull the latest version and let me know if everything keeps working. If you’re having issues with some modules not showing up, please let me know.

        More info about this change can be found here: https://github.com/MichMich/MagicMirror/commit/e4197012f65778f815cd73a6c7fab1a30ef3b92f

        Thanks!

        E 1 Reply Last reply Reply Quote 0
        • E Offline
          ESOB @MichMich
          last edited by

          @MichMich I am on the latest develop and it throws an error and just gives me a black screen:

          > magicmirror@2.1.1 start /home/pi/MagicMirror
          > sh run-start.sh
          
          Starting MagicMirror: v2.1.1
          Loading config ...
          App threw an error during load
          TypeError: Path must be a string. Received undefined
              at assertPath (path.js:7:11)
              at Object.resolve (path.js:1148:7)
              at loadConfig (/home/pi/MagicMirror/js/app.js:53:29)
              at App.start (/home/pi/MagicMirror/js/app.js:180:3)
              at Object. (/home/pi/MagicMirror/js/electron.js:102:6)
              at Module._compile (module.js:556:32)
              at Object.Module._extensions..js (module.js:565:10)
              at Module.load (module.js:473:32)
              at tryModuleLoad (module.js:432:12)
              at Function.Module._load (module.js:424:3)
          Whoops! There was an uncaught exception...
          TypeError: Path must be a string. Received undefined
              at assertPath (path.js:7:11)
              at Object.resolve (path.js:1148:7)
              at loadConfig (/home/pi/MagicMirror/js/app.js:53:29)
              at App.start (/home/pi/MagicMirror/js/app.js:180:3)
              at Object. (/home/pi/MagicMirror/js/electron.js:102:6)
              at Module._compile (module.js:556:32)
              at Object.Module._extensions..js (module.js:565:10)
              at Module.load (module.js:473:32)
              at tryModuleLoad (module.js:432:12)
              at Function.Module._load (module.js:424:3)
          MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
          If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
          Launching application.
          
          

          When I jump back to Master branch it loads fine:

          //your code> magicmirror@2.1.0 start /home/pi/MagicMirror
          > electron js/electron.js
          
          Starting MagicMirror: v2.1.0
          Loading config ...
          Loading module helpers ...
          No helper found for module: alert.
          Initializing new module helper ...
          No helper found for module: clock.
          Initializing new module helper ...
          Initializing new module helper ...
          Initializing new module helper ...
          Initializing new module helper ...
          Initializing new module helper ...
          All module helpers loaded.
          Starting server op port 8080 ... 
          Server started ...
          Connecting socket for: MMM-Remote-Control
          Starting node helper for: MMM-Remote-Control
          Connecting socket for: calendar
          Starting node helper for: calendar
          Connecting socket for: MMM-Traffic
          MMM-Traffic helper started ...
          Connecting socket for: MMM-WunderGround
          MMM-WunderGround helper started ...
          Connecting socket for: MMM-NFL
          Starting module: MMM-NFL
          Connecting socket for: newsfeed
          Starting module: newsfeed
          Sockets connected & modules started ...
          Launching application.
          ERROR! Could not find main module js 
          
          1 Reply Last reply Reply Quote 1
          • SnilleS Offline
            Snille Module Developer
            last edited by

            Hi there, got the same problem… It’s time for bed anyway. :)

            If you cant find it, make it and share it!
            Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

            1 Reply Last reply Reply Quote 0
            • R Offline
              roramirez Core Contributors
              last edited by

              So… that is my mistake. I pushed fix the wrong validation :(
              https://github.com/MichMich/MagicMirror/pull/658

              Easy module development with MagicMirror Module Template

              1 Reply Last reply Reply Quote 0
              • MichMichM Offline
                MichMich
                last edited by

                I’ve just merged the fix!👍

                1 Reply Last reply Reply Quote 1
                • SnilleS Offline
                  Snille Module Developer
                  last edited by

                  Working. :)

                  If you cant find it, make it and share it!
                  Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                  1 Reply Last reply Reply Quote 0
                  • X Offline
                    XxX_Cobra_XxX
                    last edited by

                    @MichMich I have the same problem as ESOB:

                    I am now also on the latest develop and it throws an error and just gives me a black screen:

                    WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'rrule-alt'
                    App threw an error during load
                    Error: Cannot find module 'rrule-alt'
                        at Module._resolveFilename (module.js:455:15)
                        at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
                        at Function.Module._load (module.js:403:25)
                        at Module.require (module.js:483:17)
                        at require (internal/module.js:20:19)
                        at Object. (/home/pi/MagicMirror/modules/default/calendar/vendor/ical.js/node-ical.js:20:13)
                        at Module._compile (module.js:556:32)
                        at Object.Module._extensions..js (module.js:565:10)
                        at Module.load (module.js:473:32)
                        at tryModuleLoad (module.js:432:12)
                    { Error: Cannot find module 'rrule-alt'
                        at Module._resolveFilename (module.js:455:15)
                        at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
                        at Function.Module._load (module.js:403:25)
                        at Module.require (module.js:483:17)
                        at require (internal/module.js:20:19)
                        at Object. (/home/pi/MagicMirror/modules/default/calendar/vendor/ical.js/node-ical.js:20:13)
                        at Module._compile (module.js:556:32)
                        at Object.Module._extensions..js (module.js:565:10)
                        at Module.load (module.js:473:32)
                        at tryModuleLoad (module.js:432:12) code: 'MODULE_NOT_FOUND' }
                    
                    

                    When I go back to Master branch it loads normally.

                    Please help me

                    strawberry 3.141S 1 Reply Last reply Reply Quote 0
                    • strawberry 3.141S Offline
                      strawberry 3.141 Project Sponsor Module Developer @XxX_Cobra_XxX
                      last edited by

                      @XxX_Cobra_XxX did you install the dependencies? they have changed for the develop branch

                      Please create a github issue if you need help, so I can keep track

                      X 1 Reply Last reply Reply Quote 0
                      • X Offline
                        XxX_Cobra_XxX @strawberry 3.141
                        last edited by

                        @strawberry-3.141 I have installed the dependencies now with ‘npm install’ and it works! ;-)

                        Thank you very much

                        1 Reply Last reply Reply Quote 0
                        • R Offline
                          roramirez Core Contributors
                          last edited by

                          Hey Guys,

                          To prevent problems like the error on validation on develop branch I say to you we are working a test suite for MagicMirror.

                          Now is initial state with some tests. Today @MichMich merged a change with some testing for e2e area. At now isn’t integrated the e2e tests in Travis. You can run e2e tests with

                          export DISPLAY=:0 && npm run test:e2e
                          You need run npm install before

                          The build a test is simple. If someone is animated and want to build one or need some light let me know.

                          So, also it helps if you run the e2e tests into your system and tells us if something is wrong or good.

                          Easy module development with MagicMirror Module Template

                          morozgrafixM 1 Reply Last reply Reply Quote 0
                          • morozgrafixM Offline
                            morozgrafix Moderator @roramirez
                            last edited by

                            @roramirez I just submitted PR to add chai-as-promised to devDependencies. I was missing it from globally installed packages and ran into an error when tried to run tests.

                            E 1 Reply Last reply Reply Quote 0
                            • E Offline
                              ESOB @morozgrafix
                              last edited by

                              Something on the develop branch turned my magic mirror back to black screen again (It ran fine on develop branch yesterday but when I did my pull&&install today it went down again). Here is the information from the pm2 logs, tell me if you need anything else:

                              mm-0 (out): Module helper loaded: MMM-NFL
                              mm-0 (out): Initializing new module helper ...
                              mm-0 (out): Module helper loaded: newsfeed
                              mm-0 (out): All module helpers loaded.
                              mm-0 (out): Starting server op port 8080 ...
                              mm-0 (out): Server started ...
                              mm-0 (out): Connecting socket for: MMM-Remote-Control
                              mm-0 (out): Starting node helper for: MMM-Remote-Control
                              mm-0 (out): Connecting socket for: calendar
                              mm-0 (out): Starting node helper for: calendar
                              mm-0 (out): Connecting socket for: MMM-Traffic
                              mm-0 (out): MMM-Traffic helper started ...
                              mm-0 (out): Connecting socket for: MMM-WunderGround
                              mm-0 (out): MMM-WunderGround helper started ...
                              mm-0 (out): Connecting socket for: MMM-NFL
                              mm-0 (out): Starting module: MMM-NFL
                              mm-0 (out): Connecting socket for: newsfeed
                              mm-0 (out): Starting module: newsfeed
                              mm-0 (out): Sockets connected & modules started ...
                              mm-0 (out): Launching application.
                              
                              mm-0 (err):     at exports._exceptionWithHostPort (util.js:1049:20)
                              mm-0 (err):     at Server._listen2 (net.js:1253:14)
                              mm-0 (err):     at listen (net.js:1289:10)
                              mm-0 (err):     at net.js:1399:9
                              mm-0 (err):     at _combinedTickCallback (internal/process/next_tick.js:77:11)
                              mm-0 (err):     at process._tickCallback (internal/process/next_tick.js:98:9)
                              mm-0 (err):     at Module.runMain (module.js:592:11)
                              mm-0 (err):     at run (bootstrap_node.js:402:7)
                              mm-0 (err):     at startup (bootstrap_node.js:157:9)
                              mm-0 (err):   code: 'EADDRINUSE',
                              mm-0 (err):   errno: 'EADDRINUSE',
                              mm-0 (err):   syscall: 'listen',
                              mm-0 (err):   address: '::',
                              mm-0 (err):   port: 8080 }
                              mm-0 (err): ERROR! Could not find main module js file.
                              
                              
                              morozgrafixM 1 Reply Last reply Reply Quote 0
                              • morozgrafixM Offline
                                morozgrafix Moderator @ESOB
                                last edited by

                                @ESOB looks like your port 8080 is in use. Do you happen to have another instance of MM running already? Or maybe something else is taking your port 8080.

                                E 1 Reply Last reply Reply Quote 0
                                • E Offline
                                  ESOB @morozgrafix
                                  last edited by ESOB

                                  @morozgrafix maybe, I issued a pm2 stop and then did a restart and I am no longer getting that error. I am still getting a black only screen with the only error being:

                                  "ERROR! Could not find main module js file."
                                  

                                  What logs should I get you to figure out the reason for lack of display?

                                  Edit:
                                  Scratch that, I double checked the logs and I get the same error. I will do a full pi reboot again to triple check but it seems consistent.
                                  Edit 2:
                                  After triple check, only one MM instance open and same error noted about port 8080.

                                  morozgrafixM 2 Replies Last reply Reply Quote 0
                                  • morozgrafixM Offline
                                    morozgrafix Moderator @ESOB
                                    last edited by

                                    @ESOB did you run npm install after pulling development branch? Next step would be to try to start it in node serveronly mode and point your browser at http://:8080 or run npm start Dev and see if you get any errors in console log of the browser or electron app

                                    1 Reply Last reply Reply Quote 0
                                    • morozgrafixM Offline
                                      morozgrafix Moderator @ESOB
                                      last edited by morozgrafix

                                      @ESOB sorry I was replying before you edited post with update. Try temporarily changing your config.js to another port if 8080 is taken for some reason.

                                      E 1 Reply Last reply Reply Quote 0
                                      • E Offline
                                        ESOB @morozgrafix
                                        last edited by

                                        @morozgrafix So I tried changing the port number to 8081 and I got this:

                                        mm-0 (err): WARNING! Could not load config file. Starting with default configuration. Error found: RangeError: "port" argument must be >= 0 and < 65536
                                        mm-0 (err): App threw an error during load
                                        mm-0 (err): RangeError: "port" argument must be >= 0 and < 65536
                                        mm-0 (err):     at assertPort (internal/net.js:17:11)
                                        mm-0 (err):     at Server.listen (net.js:1371:7)
                                        mm-0 (err):     at new Server (/home/pi/MagicMirror/js/server.js:20:9)
                                        mm-0 (err):     at /home/pi/MagicMirror/js/app.js:193:18
                                        mm-0 (err):     at loadNextModule (/home/pi/MagicMirror/js/app.js:142:5)
                                        mm-0 (err):     at /home/pi/MagicMirror/js/app.js:137:6
                                        mm-0 (err):     at Class.loaded (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:19:3)
                                        mm-0 (err):     at loadModule (/home/pi/MagicMirror/js/app.js:118:6)
                                        mm-0 (err):     at loadNextModule (/home/pi/MagicMirror/js/app.js:135:5)
                                        mm-0 (err):     at /home/pi/MagicMirror/js/app.js:137:6
                                        mm-0 (err): ERROR! Could not find main module js file.
                                        
                                        

                                        I did run npm install, also tried serveronly and running npm start dev but did not gather any additional information. I will say the weird thing is when I leave it on port 8080, the remote control module still loads.

                                        morozgrafixM 2 Replies Last reply Reply Quote 0
                                        • morozgrafixM Offline
                                          morozgrafix Moderator @ESOB
                                          last edited by morozgrafix

                                          @ESOB This error WARNING! Could not load config file. seems very odd. Can you please post your config.js file? Also another option is to backup your config.js and do file copy of config.js.sample to config.js to have good known configuration to begin with.

                                          When starting with npm start dev or node serveronly do you see any errors in the Console Log of the dev tools of the electron or your browser?

                                          P.S. I wanted to fork this troubleshooting conversation into a separate thread, but can’t seem to find a way.

                                          1 Reply Last reply Reply Quote 0
                                          • morozgrafixM Offline
                                            morozgrafix Moderator
                                            last edited by

                                            @roramirez & @MichMich looks like develop branch got broken with this commit https://github.com/MichMich/MagicMirror/commit/354b745c39a19915c3a8547445a5049555bd37ff#diff-75953debd6cf3faf33d4ff10e8353645R11

                                            Line 11 of defaults.js got this change port: process.env.MM_PORT || 8080, and server is not starting up throwing error in the console log:

                                            Uncaught ReferenceError: process is not defined
                                                at defaults.js:11
                                            (anonymous) @ defaults.js:11
                                            
                                            R 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
                                            • 3
                                            • 2 / 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