• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Testing my module, it is stuck loading

Scheduled Pinned Locked Moved Solved Troubleshooting
31 Posts 2 Posters 7.9k Views 2 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.
  • S Offline
    sdetweil @l0zarus
    last edited by May 7, 2023, 11:35 PM

    @l0zarus open the develpers window , ctrl-shift-i, then select the sources tab, modules in the left nav, and find your module

    click the number in the left nav for the 1st line under your getdom

    and then hit f5 to refesh the page and stop at your getdom function

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    L 1 Reply Last reply May 7, 2023, 11:49 PM Reply Quote 0
    • S Offline
      sdetweil @l0zarus
      last edited by sdetweil May 7, 2023, 11:50 PM May 7, 2023, 11:39 PM

      @l0zarus also, NEVER fetch inside getDom()… get the data first, THEN call updateDom() to advise there is data ready …

      you can use the start function, or better, use the notifcationReceived function for “ALL_MODULES_LOADED” then kick off a timer or an interval
      at the end of good data received, call this.updateDom()

      getdom must ALWAYS return a dom element (aka wrapper at least)

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • L Offline
        l0zarus @sdetweil
        last edited by May 7, 2023, 11:49 PM

        @sdetweil I’m not sure I’m following this. Do you mean in VS code or with the Magic Mirror application running?

        S 1 Reply Last reply May 7, 2023, 11:51 PM Reply Quote 0
        • S Offline
          sdetweil @l0zarus
          last edited by May 7, 2023, 11:51 PM

          @l0zarus magicmirror… of course

          Screenshot at 2023-05-07 18-50-59.png

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          L 1 Reply Last reply May 7, 2023, 11:57 PM Reply Quote 0
          • L Offline
            l0zarus @sdetweil
            last edited by May 7, 2023, 11:57 PM

            @sdetweil well my module isn’t even in the modules folder even though it is in the config file which is confusing to me. I noticed in your screenshot that default is a subfolder of modules. That is true in my path to the module, but they are appearing as one combined folder. I’m not sure why that is the case. In any event, clearly my module was never actually loading at all. Any idea what the issue is here? I’ll start to update my code to remove the API call from the getDom function.

            S 1 Reply Last reply May 8, 2023, 12:00 AM Reply Quote 0
            • S Offline
              sdetweil @l0zarus
              last edited by May 8, 2023, 12:00 AM

              @l0zarus AH, now we’re getting somewhere

              go to the console tab and put part of your module name in the filter field

              also,

              modulename in config.js = folder name in modules folder = filename of the .js file
              AND the register name

              config.js 
                   module:"SampleModule", 
              modules/SampleModule/SampleModule.js
              Module.register("SampleModule", {
              

              ALL these MUST match else your module is not loaded
              system is case sensitive

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              L 2 Replies Last reply May 8, 2023, 12:13 AM Reply Quote 0
              • L Offline
                l0zarus @sdetweil
                last edited by l0zarus May 8, 2023, 12:15 AM May 8, 2023, 12:13 AM

                @sdetweil Alright I have a few errors showing, and I’m having an issue moving my file to the modules folder. I have verified the name is the same across the folder, the js file, and the config file.

                First, I got the following message when trying to move it:

                mv MMM-ConcertsAroundMe /modules
                mv: cannot move 'MMM-ConcertsAroundMe' to '/modules': Permission denied
                

                Will paste the console errors as well, I am moving between my mac and raspberry pi

                S 2 Replies Last reply May 8, 2023, 12:15 AM Reply Quote 0
                • S Offline
                  sdetweil @l0zarus
                  last edited by May 8, 2023, 12:15 AM

                  @l0zarus its not /modules (that is in the root)

                  depending where your module is , the quick way

                  mv MMM-ConcertsAroundMe ~/MagicMirror/modules
                  

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  L 1 Reply Last reply May 8, 2023, 12:16 AM Reply Quote 0
                  • L Offline
                    l0zarus @sdetweil
                    last edited by May 8, 2023, 12:16 AM

                    @sdetweil aha! I had tried that as well, but I did not include the ~. I am learning so much from this project :)

                    S 1 Reply Last reply May 8, 2023, 12:19 AM Reply Quote 0
                    • S Offline
                      sdetweil @l0zarus
                      last edited by May 8, 2023, 12:16 AM

                      @l0zarus said in Testing my module, it is stuck loading:

                      I am moving between my mac and raspberry pi

                      magicmirror will run on your mac…

                      use my install script

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 2 / 4
                      2 / 4
                      • First post
                        6/31
                        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