Read the statement by Michael Teeuw here.
Unable to determine reason for MM/electron decaying/dying/hanging
-
I have the same problem…MM runs a couple seconds up to minutes and hours…
I’ve also tried to remove more or less everything from config file but with no success.
I’m using one RP4 4GB and two RP4 2GB with the same config.
What i’ve found out is that if i restart mm at the same time they almost die at the same time…could there be some kind of network/integration problem that is not taking care of errors making MM to die/hang? -
adding the line below to MagicMirror/js/electron.js has helped for me
function createWindow() { app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required"); app.commandLine.appendSwitch('disable-http-cache'); // < ---- add this line var electronOptionsDefaults = {
-
@sdetweil thanks for reaching out!
I’ve made the change you proposed but MM hangs again :-(
What i can see from MagicMirror-error.log is this:[21:32:49.843] [ERROR] (node:6386) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Below the MagicMirror-out.log:
magicmirror@2.10.0 start /home/pi/MagicMirror
./run-start.sh[21:32:45.141] [LOG] Starting MagicMirror: v2.10.0
[21:32:45.149] [LOG] Loading config …
[21:32:45.155] [LOG] Loading module helpers …
[21:32:45.157] [LOG] No helper found for module: alert.
[21:32:45.196] [LOG] Initializing new module helper …
[21:32:45.197] [LOG] Module helper loaded: updatenotification
[21:32:45.198] [LOG] No helper found for module: clock.
[21:32:45.566] [LOG] Initializing new module helper …
[21:32:45.567] [LOG] Module helper loaded: MMM-SystemStats
[21:32:45.626] [LOG] Initializing new module helper …
[21:32:45.626] [LOG] Module helper loaded: MMM-Remote-Control
[21:32:46.275] [LOG] Initializing new module helper …
[21:32:46.277] [LOG] Module helper loaded: MMM-Vasttrafik-PublicTransport
[21:32:46.278] [LOG] No helper found for module: currentweather.
[21:32:46.278] [LOG] No helper found for module: weatherforecast.
[21:32:46.305] [LOG] Initializing new module helper …
[21:32:46.305] [LOG] Module helper loaded: MMM-telldusLive
[21:32:46.733] [LOG] Initializing new module helper …
[21:32:46.734] [LOG] Module helper loaded: MMM-NowPlayingOnSpotify
[21:32:46.737] [LOG] Initializing new module helper …
[21:32:46.737] [LOG] Module helper loaded: MMM-SolarEdge
[21:32:46.738] [LOG] No helper found for module: compliments.
[21:32:46.738] [LOG] All module helpers loaded.
[21:32:46.739] [LOG] Starting server on port 8080 …
[21:32:46.745] [INFO] [33mYou’re using a full whitelist configuration to allow for all IPs[39m
[21:32:46.753] [LOG] Server started …
[21:32:46.754] [LOG] Connecting socket for: updatenotification
[21:32:46.755] [LOG] Connecting socket for: MMM-SystemStats
[21:32:46.755] [LOG] Connecting socket for: MMM-Remote-Control
[21:32:46.756] [LOG] Starting node helper for: MMM-Remote-Control
[21:32:46.763] [LOG] Connecting socket for: MMM-Vasttrafik-PublicTransport
[21:32:46.776] [LOG] 21:32:46 MMM-Vasttrafik-PublicTransport: Starting helper: MMM-Vasttrafik-PublicTransport
[21:32:46.777] [LOG] Connecting socket for: MMM-telldusLive
[21:32:46.777] [LOG] Connecting socket for: MMM-NowPlayingOnSpotify
[21:32:46.778] [LOG] Connecting socket for: MMM-SolarEdge
[21:32:46.779] [LOG] Starting node helper: MMM-SolarEdge
[21:32:46.779] [LOG] Sockets connected & modules started …
[21:32:46.915] [LOG] Launching application.
[21:32:49.759] [LOG] 21:32:49 MMM-Vasttrafik-PublicTransport: socketNotificationReceived
[21:32:49.761] [LOG] 21:32:49 MMM-Vasttrafik-PublicTransport: CONFIG event received
[21:32:49.780] [LOG] Telldus config received!
[21:32:49.780] [LOG] Telldus sent fetch
[21:32:49.834] [LOG] Notification: GET_SOLAR Payload: [object Object]
[21:32:50.089] [LOG] Refreshed access token because it has expired. Expired at: 21:32:49 now is: 21:32:50
[21:40:06.915] [LOG] -
look at
free -m
u may need to increase swap space u have a bunch of stuff running
https://wpitchoune.net/tricks/raspberry_pi3_increase_swap_size.htmlalso, open the developers window, ctrl-shift-i on the keyboard, select the tab labeled ‘console’ and scroll up, looking for any errors (usually red text)… or any other errors reported
the terminal window messages are from the module node_helpers
the dev window are from the modules main file (we call it the modulename.js as its name matches the module name)no single place collects it all
-
@sdetweil I have lot of free memory, no swap at all what i can see :-)
But i found theese errors in the console (maybe hard to tell why…):- Refused to apply style from ‘http://raspberrypi4:8080/css/custom.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.
- loader.js:203 Error on loading stylesheet: css/custom.css
stylesheet.onerror @ loader.js:203 - TypeError: Cannot read property ‘split’ of undefined
at Class.getDom (compliments.js:176)
at main.js:112
at new Promise ()
at updateDom (main.js:111)
at main.js:55
at Array.forEach ()
at createDomObjects (main.js:24)
at Object.modulesStarted (main.js:476)
at startModules (loader.js:59)
at loader.js:40 - Failed to load resource: the server responded with a status of 401 (Unauthorized)
- Refused to apply style from ‘http://raspberrypi4:8080/css/custom.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.
-
@hedmik said in Unable to determine reason for MM/electron decaying/dying/hanging:
TypeError: Cannot read property ‘split’ of undefined
do you have a custom compliments configuration?
this is part of a fix I put in for compliments with embedded ‘\n’ newline characters
but the code said that it came up with no compliment to use from the list of morning/afternoon/evening/anytime configured compliments
if u want to turn that module off, then add
disabled: true,to its config entry (after module: ‘compliments’,)
-
@sdetweil Hi again, and i’m very grateful for you helping me out :-)
Yes, i have both the standard and also a custom compliments module and by turning that custome module off MM is still running since one hour!!!
I’m so happy back on track again (cross my fingers) :-)
I will now focus on enhancing MMM-Telldus and MMM-Vastrafik modules.
I’ve also seen nice enhancements made for Weather forcast module (more descriptive text and translated to Swedish). Hope to get those enhancements otherwise i’ll do it mysfelf.
I’m also planning to develop a module for Engage (showing electricity consumption within the household).
Once again, big thanks! -
@hedmik said in Unable to determine reason for MM/electron decaying/dying/hanging:
Yes, i have both the standard and also a custom compliments module and by turning that custome module off MM is still running since one hour!!!
fantastic…!!
it might be a mispelling or something but it can’t find ANY actual compliment text…
-
@sdetweil
What exactly do you mean by a “custom compliments module”? I am using the default “compliments” module but with “remoteFile” for the quotes. Is that what you are referring to as “custom”?Since upgrading from a Pi Zero W running Stretch, I have been having the same issues as both of you (RP3B+/Buster/Latest MM/and then did the Electron upgrade to electron@6.0.12 as mentioned in the updated installation documentation).
When running MMM-BackgroundSlideshow on Zero before I would occasionally get race events, so I recently moved to RP3 with a fresh install, and I turned on “transitions” between photos as I thought the beefier CPU would handle it. But it would hang after a while and I’ve been trying to diagnose ever sense. I’ve set “transitions” back to false and the Pi still hangs. I’ve increased swap. I’ve increased GPU mem. Tracked with nmon, and except for the occasional CPU wait% going up every once in a while, I was never low on memory or disk.
I just happened to run across this thread and it seems almost exactly the same issues.
I’m slowly adding back in all the modules and will now put back in MMM-BackgroundSlideshow before adding compliments. I really never thought one of the default modules would be the issue. I actually thought it was some incompatibility between Buster and Electron.
I’ll report my findings.
-
@max64 said in Unable to determine reason for MM/electron decaying/dying/hanging:
by a “custom compliments module”
I said custom compliments configuration, not module
so, yes, u are, as u are supplying the compliment strings in a file…
can we see that file… is it the in the compliments module folder? (it must be)
and for linux systems the filename case matters, and must match EXACTLY whatever u specify int her remoteFile: config option