Platform: Raspbery Pi 4
Node Version: v10.17.0
MagicMirror Version:2
Description: Magic Mirror or Electron is dying/hanging when rotating through pictures. I’ve tried to use any of the various image rotation modules and ultimately end up getting the same results. After several minutes rotating through pictures, the whole operation hangs. Clock stops ticking, pictures stop rotating, ssh becomes unresponsive, etc. I believe this may be an Electron issue, but can’t be certain (my diagnostic skills are lacking to an extent). I have put MM in server only mode and used Safari on my Mac and everything appears to function normally and continuously - this is why I am leaning toward Electron being the problem. I also attempted to use Chromium in place of electron running on the pi and it hangs just as electron (common algorithms?). Adding Watchdog helps keep things going to a certain extent - it still crashes, but at least MM restarts. But even after a while with that happening, the system gets bogged down to the point that its non-responsive and needs a hard reboot.
Steps to Reproduce: Run magic mirror with any of [MMM-BackgroundSlideshow, MMM-ImageSlideshow, MMM-RandomPhoto] modules
Expected Results: continuous run rotating through pictures
Actual Results: MM dies when both server and client are running on same machine - will restart if running Watchdog, MM continues to run on Safari client and Raspi 4 server. No obvious indications as to why when running with the debug console open - just disconnects.
Configuration:
{
address: “localhost”,
port: 8080,
ipWhitelist: [“127.0.0.1”, “::ffff:127.0.0.1”, “::1”],
language: “en”,
timeFormat: 24,
units: “metric”,
modules: [
{
module: "alert",
},
{
module: "MMM-WatchDog",
},
{
module: "updatenotification",
position: "top_bar"
},
{
module: "clock",
position: "top_left"
},
{
module: "calendar",
header: "Calendar",
position: "top_left",
config: {
calendars: [
{
symbol: "calendar-check",
url: "private",
maximumNumberOfDays: 7,
},
{
symbol: "car",
url:"private",
maximumNumberOfDays: 7,
},
{
symbol: "kiwi-bird",
url: "private",
maximumNumberOfDays: 7,
},
]
}
},
{
module: "MMM-RandomPhoto",
position: "fullscreen_below",
config: {
url: ['http://localhost/getPhoto.php'],
updateInterval:60
}
},
{
module: "currentweather",
position: "top_right",
config: {
units: "imperial",
location: "Home",
locationID: "private", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
appid: "private"
}
},
{
module: "weatherforecast",
position: "top_right",
header: "Weather Forecast",
config: {
location: "Home",
locationID: "private", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
appid: "private"
}
},
{
disabled: false,
module: "MMM-PilotWX",
position:"bottom_left",
config: {
ICAO: "private",
colorCode: "Alternative",
mode: "Static",
sym: "@",
tempUnits: "C",
measure: "SM",
time: "Local",
maxWidth:"100%",
useAltHeader:true,
header: "Conditions",
}
},
{
module: "MMM-Sonos",
position: "bottom_right",
config: {
showStoppedRoom: false,
showRoomName: false,
}
},
]
};
Additional Notes: I have isolated every module to make sure that adding the image rotation modules is in fact the cause of the issue. I though for sure it was a resources issue, but then I upgraded from the pi3 to the 4 and that hasn’t helped. In fact, it almost seems to have gotten worse. I moved the images to a USB 3 SSD and that didn’t help. The php script is literally just picking a random photo from my hard drive and serving it as is. Is there something missing from these modules that they are leaking resources? I’ve been on the hunt casually for more than a year, but have really hit it hard the last two weeks and I’m just hitting a brick wall. Not sure where to look anymore. I love the platform. I’ve helped edit at least one module, I’m starting to write another, but I’m at a complete loss as to how to track down this problem. The wife wants a family dashboard with rotating pictures!! Help!