Read the statement by Michael Teeuw here.
MMM-Temperature uncaught exception...
-
@Brown19 Hi,
your python script looks good to me and also the output of node_helper till the moment it tries to send the data to the frontend.
Can you provide your MagicMirror and nodejs version information to me, please? -
I tried your script and the current version of the module in both of my setups (2.24.0 native and 2.25.0-develop container) and do not have any problems.
As i wrote already the problem looks like there is problem during communication between the node_helper.js and the frontend (either electron or the browser of your choice).
-
@wishmaster270 I’m running 2.24.0 and node is v18.17.0
-
@Brown19 Do you see any errors in the development console of the browser?
-
@Brown19
Hi,today i installed a new instance of MagicMirror 2.24.0 with both your node version 18 any my current used one (16).
In the installation which uses electron i can reproduce the error now. But i am pretty sure this is a problem related to the combination of the version 2.24.0 and the used electron version.
I found this thread with the same error but MMM-Tools instead in the forum of bogusnet, too.
It might be a general MagicMirror issue and not a problem of the module.Maybe one of the core developers can have a look into it. I never had been that deep in the MagicMirror code and do not have much time to investigate the problem at the moment.
-
@wishmaster270 what module is this? I’ll look at it tonight.
-
@sdetweil Hi Sam, it looks like both MMM-Temperature and MMM-Tools cause the error.
-
i did some more investigation today and think i found a solution.
Although the exception looks different i think the problem is theexecSynccommand.
The only way i was able to fix it is to usespawnSync.But i can not say where or why the problem happens.
I tried different node versions (latest 16, 18, 20) and different electron versions (25.3.0, 25.3.2 and 25.4.0) withexecSync.I will release a new version of
MMM-Temperaturetoday which usesspawnSyncinstead ofexecSync. -
@wishmaster270 good catch. I think exec is foreground, spawn is background.
-
Just released the new version 0.0.8 which (hopefully) fixes the problem.
I integrated your script, too. But i named it
sht31d. -
@wishmaster270 Thank you so much for the help and troubleshooting! I wasn’t able to work on this the last few days and when I got back it looks fixed.
Thanks again.
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