Read the statement by Michael Teeuw here.
Javascript Timing Events
-
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 usedsetTimeout()while the other usedsetInterval()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. Iapt-get updateandrpi-updateto 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 usingsetInterval()with a 5 minute delay.
I just had one of the faulty modules in myconfig.jsso 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 tosetTimeout()with the same delay and counter. It runs 5-270 times randomly(random to me at least).
I have a bunch ofconsole.log()'sin 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, andsetTimeout()stops updating at random times. The other modules I use all update fine withsetTimeout().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.
-
@mochman I haven’t experienced something like this sorry
-
@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?
-
@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.
-
@mochman Well, good luck, and let us know if you find anything.
-
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.
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