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.

    Javascript Timing Events

    Scheduled Pinned Locked Moved Troubleshooting
    6 Posts 3 Posters 2.9k 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.
    • mochmanM Offline
      mochman Module Developer
      last edited by mochman

      Gals/Guys,

      I don’t know if anyone else has been experiencing the same weird things that seem to be happening to a couple of my modules.
      In 2 modules, that used to work with no issue, they stopped updating. I checked them and one used setTimeout() while the other used setInterval() to refresh the data. These modules have been working for some time and all of a sudden they stopped. I reset my pi to see if that’d help, no luck. I apt-get update and rpi-update to see if that’d help. Didn’t help my issue. I’m running the latest non-develop build of MM.
      I tried some troubleshooting by using setInterval() with a 5 minute delay.
      I just had one of the faulty modules in my config.js so nothing else would mess with it.
      I had a counter that updated every time the function was supposed to run. It ran the first time, and never again. So I switched to setTimeout() with the same delay and counter. It runs 5-270 times randomly(random to me at least).
      I have a bunch of console.log()'s in my code to see if any part fails. Those never get triggered.

      So in summary, 2 of my 10 or so modules have started acting erratically with their timing events. SetInterval() stopped working for me all together, and setTimeout() stops updating at random times. The other modules I use all update fine with setTimeout().

      If anyone has seen this before and knows how to fix it, I’d be greatly appreciative. Thanks!

      P.S. I see the same freezes using MagicMirror’s built in browser as well as Chrome and Firefox from a separate computer.

      strawberry 3.141S J 2 Replies Last reply Reply Quote 0
      • strawberry 3.141S Offline
        strawberry 3.141 Project Sponsor Module Developer @mochman
        last edited by

        @mochman I haven’t experienced something like this sorry

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

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jopyth Moderator @mochman
          last edited by Jopyth

          @mochman That sounds very strange. In which modules is this happening? In the default modules or in some of your own? E.g. does the clock still update every second?

          Helpful sticky: How to troubleshoot

          mochmanM 1 Reply Last reply Reply Quote 0
          • mochmanM Offline
            mochman Module Developer @Jopyth
            last edited by

            @Jopyth 1 is MMM-forecast-io and the other is one I made. Other modules I’ve made still update correctly as well as other default modules.

            If it becomes a pain to keep reloading the mirror, I’ll probably just wipe the drive and start over fresh.

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              Jopyth Moderator @mochman
              last edited by

              @mochman Well, good luck, and let us know if you find anything.

              Helpful sticky: How to troubleshoot

              1 Reply Last reply Reply Quote 0
              • mochmanM Offline
                mochman Module Developer
                last edited by mochman

                Thanks.

                I added a “last updated at: XXXX” to the modules and now they both have updated correctly the past few days. Guess it was gremlins.

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