MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

Third-Party Module - how to get help?

  • @ember1205 yes, u installed the original… when one develops enhancements of a git project, you make a connected copy (fork), anything u change can be sent back to the author with a ‘pull request’. I didn’t change any of his install instructions.

    when u are on a git project, there is a button, clone or download(the fork, not the original), u press that, and then click the little clipboard icon to copy the url for the git clone command

    at any time, you can see where your instance is sourced from by doing

    git remote -v

    in the module folder

    so, I would rename the current folder out of the way (the original doesn’t work at all for me)

    cd ~/MagicMirror/modules
    mv MMM-ImagesPhotos MMM-ImagesPhotos.orig
    git clone

    and then restart the mirror

  • @sdetweil

    Sigh. Best laid plans… lol

    At any rate - I actually rm’ed the original dir and re-did the clone using YOUR version. Came right up and started working properly right out of the gate.

    Thanks for not only all of the help, but all of the patience. I do learn quickly, and this should now remain fairly firmly entrenched in my brain going forward.

    Now I’m off to see how to modify the CSS of MM to change some of the font aspects for text!

  • @ember1205 cool. thanks for the feedback… come on back when u need help, there are amazing talented folks who can help with just about everything!

  • I know this is marked ‘solved’, but I wanted to mention that A ) the module does still crash with “out of memory” errors and B ) a little bit of investigative tinkering makes me think that this all ties back to a garbage collection issue with Java.

    If I change the timing of how often the images change, I can effectively ‘force’ or almost eliminate a crash. The shorter the duration between photos, the more likely a crash will occur. I changed the timing to 45 seconds and saw the setup run reliably from power on at 7AM until power off at 11PM for multiple days in a row.

    Shortening the window down to 5 seconds between images will cause the system to crash typically within about 10-15 minutes at a maximum.

    At no time do I actively witness memory levels dropping down to zero, but that could just be “bad luck” in not seeing the issue arise when it errors out. Is there an easy way on the Pi to track a process and watch for a specific, correlating event when something crashes?

  • Also - I caught this error with your debug output:

    Failed to load resource: the server responded with a status of 404 (Not Found) :8080/MMM-ImagesPhotos/photos:1 

    That’s at the beginning of the console output along with another error I have seen later in the console:

    MMM-ImagesPhotos Could not load photos
    photosrequest.onreadystatechange @ :8080/modules/MMM-ImagesPhotos/MMM-ImagesPhotos.js:65

    Any thoughts on those?

  • @ember1205 i am not aware of any debugging tools or strategy that can get to the type of issue being encountered. I have been chasing these for the last 4 years…

    i also think the error reported is bogus, caused by the mishandling of some other error.

    the ‘problem’ is that the browser thinks IT is in control of the content update cycle, but with all these modules running separate timer event handlers, it is not.

    I have debugged a lot of ‘electron is single threaded’ problems down to , ‘you might THINK its single threaded, but it is NOT’… when the timer fires, SOMETHING is getting interrupted… in gosh knows what state…

    one way you might prove this, is to turn off every other module, so only ONE does any content updating (it is a web page after all)

    One of my modules has 2-10 images loaded over the top of the web page, on independent timing cycles. i traced failures to attempting to load an image, while an image load was already in progress. I added code to my module to prevent this behavior, and my failures went away.

    I added a background image thing, and they returned when my module is running…
    they are both loading images at the same time sometimes… and electron crashes… in various ways.

    I have been trying (last 6 months) to find a mechanism to serialize this across multiple modules, without changing the modules, but have failed so far.

    we are also running on an age old electron (3.x), which the most recent version that will run for MM is 6.x) (7.x will not run)

  • @ember1205 said in Third-Party Module - how to get help?:


    yeh, the code attempts to load the folder… once… I haven’t debugged it cause it doesn’t matter

  • @sdetweil said in Third-Party Module - how to get help?:

    @ember1205 said in Third-Party Module - how to get help?:


    yeh, the code attempts to load the folder… once… I haven’t debugged it cause it doesn’t matter


    What about second error I mentioned? Or, is that essentially part of the overall error?

  • @ember1205 part of the same… looking at it now

  • @ember1205

    ok, fixed the error message… a startup timing error…

    module tried to get images from node_helper, before node_helper had established the linkage…
    (if u are using my repo)
    go to your MMM-ImagesPhotos folder and do

    git pull

    then restart mirror app

Log in to reply