MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Third-Party Module - how to get help?

    Scheduled Pinned Locked Moved Solved Troubleshooting
    64 Posts 3 Posters 34.8k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E Offline
      ember1205
      last edited by

      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?

      S 1 Reply Last reply Reply Quote 0
      • E Offline
        ember1205
        last edited by

        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?

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @ember1205
          last edited by

          @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)

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @ember1205
            last edited by

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

            :8080/MMM-ImagesPhotos/photos:1

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

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            E 1 Reply Last reply Reply Quote 0
            • E Offline
              ember1205 @sdetweil
              last edited by

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

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

              :8080/MMM-ImagesPhotos/photos:1

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

              Thanks.

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

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @ember1205
                last edited by

                @ember1205 part of the same… looking at it now

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @sdetweil
                  last edited by

                  @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

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • E Offline
                    ember1205
                    last edited by

                    I don’t seem to be seeing that error any more, but now it’s crying about not using HTTPS (warning, not error, and specifically for Electron). For whatever reason, that warning wasn’t showing up in the console prior although I’m sure that it was there in some capacity.

                    I -do- see an indication of an error but can’t seem to find any error in the console.

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @ember1205
                      last edited by

                      @ember1205 that big pile of warning is just that warning… a couple years ago, the networking community decide that EVEY website should move away from http, to https, to reduce hacking the clear text content as it went by…

                      so, electron is warning that u didn’t use https

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      E 1 Reply Last reply Reply Quote 0
                      • E Offline
                        ember1205 @sdetweil
                        last edited by

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

                        @ember1205 that big pile of warning is just that warning… a couple years ago, the networking community decide that EVEY website should move away from http, to https, to reduce hacking the clear text content as it went by…

                        so, electron is warning that u didn’t use https

                        Oh, I’m well aware. This sort of stuff is “what I do” every day. I just find it interesting that I didn’t see it before, see it now, and can’t seem to find the error that is being indicated is present.

                        Switching to an external browser allows me to find the error - it’s actually related to one of the weather modules. The specific complaint is that I don’t have permission to load the weather map.

                        Failed to load resource: the server responded with a status of 401 (Unauthorized)
                        https://api.openweathermap.org/data/2.5/forecast/daily?id=< removed>&units=imperial&lang=en&APPID=< removed>
                        

                        I’ll have to look and see if I can turn off the attempt to load that map.

                        S 1 Reply Last reply Reply Quote 0
                        • S Offline
                          sdetweil @ember1205
                          last edited by

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

                          Oh, I’m well aware. This sort of stuff is “what I do” every day.

                          cool…

                          i can’t explain why it wasn’t shown before… I see it all the time (assuming I don’t have some filter enabled to select just messages for specific modules…)…
                          oh I did a dummy routine to replace the MM provided one that echos notifications received,
                          cause the darned clock module sends an annoying notice every second.

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          lavolp3L 1 Reply Last reply Reply Quote 0
                          • lavolp3L Offline
                            lavolp3 Module Developer @sdetweil
                            last edited by

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

                            cause the darned clock module sends an annoying notice every second.

                            hasn’t this been resolved with a recent update? If not it should be.
                            With the update to 2.10.0 I don’t get any notifications by the clock anymore.

                            How to troubleshoot modules
                            MMM-soccer v2, MMM-AVStock

                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              sdetweil @lavolp3
                              last edited by

                              @lavolp3 not different

                              if (self.config.displaySeconds) if u have seconds displayed on your time, u still get notices

                              this is the default setting (was on 2.9, is on 2.10)

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                sdetweil
                                last edited by

                                @ember1205 you need to do another git pull…

                                i found a case where it doesn’t update the image anymore…

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                E 1 Reply Last reply Reply Quote 0
                                • E Offline
                                  ember1205 @sdetweil
                                  last edited by

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

                                  @ember1205 you need to do another git pull…

                                  i found a case where it doesn’t update the image anymore…

                                  Will do.

                                  As an aside… I directly witnessed an odd scenario the other day when I had it refreshing every five minutes… one of the images only loaded the upper half on the screen (the bottom half of the screen had no image and was blank). I could not tell what image it was as I have quite a few in rotation and the frame continued on cleanly from there with the next image.

                                  Is that in any way related to what you found?

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    sdetweil @ember1205
                                    last edited by

                                    @ember1205 no… I have seen the slow paint issue myself many times…

                                    electron is having some painting problem… again we are on 3.0.13, no longer supported since way back…

                                    I had tried to get us to 6.0.12 this release, but the test system failed, and they removed this change from the 2.10 release
                                    (but I have seen paint problems on 6.0.12 too)

                                    u can try this manually

                                    cd ~/MagicMirror
                                    npm install electron@6.0.12
                                    

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    E 1 Reply Last reply Reply Quote 0
                                    • E Offline
                                      ember1205 @sdetweil
                                      last edited by

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

                                      @ember1205 no… I have seen the slow paint issue myself many times…

                                      electron is having some painting problem… again we are on 3.0.13, no longer supported since way back…

                                      I had tried to get us to 6.0.12 this release, but the test system failed, and they removed this change from the 2.10 release
                                      (but I have seen paint problems on 6.0.12 too)

                                      u can try this manually

                                      cd ~/MagicMirror
                                      npm install electron@6.0.12
                                      

                                      What I saw seemed to be different from a “slow paint” issue - it painted the top half and stopped. It sat there for a few seconds and then the image switched to the next one.

                                      While upgrading manually would certainly get me to something newer for Electron, it puts me in the position of not having a “standard install” for future troubleshooting and such. It’s a double-edged sword…

                                      S 2 Replies Last reply Reply Quote 0
                                      • S Offline
                                        sdetweil @ember1205
                                        last edited by sdetweil

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

                                        It’s a double-edged sword…

                                        yep…

                                        What I saw seemed to be different from a “slow paint” issue

                                        yes, interrupted paint… could be same issue, or … (the ‘not quite single threaded’ problem again
                                        got interrupted, never came back)

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          sdetweil @ember1205
                                          last edited by

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

                                          What I saw seemed to be different from a “slow paint” issue - it painted the top half and stopped. It sat there for a few seconds and then the image switched to the next one.

                                          from our text messages, I think this was caused by the bug u found on image update scheduling…
                                          I have fixed that now (thanks by the way, been looking for it for over a year now)

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

                                          E 1 Reply Last reply Reply Quote 0
                                          • E Offline
                                            ember1205 @sdetweil
                                            last edited by

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

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

                                            What I saw seemed to be different from a “slow paint” issue - it painted the top half and stopped. It sat there for a few seconds and then the image switched to the next one.

                                            from our text messages, I think this was caused by the bug u found on image update scheduling…
                                            I have fixed that now (thanks by the way, been looking for it for over a year now)

                                            I don’t know that I deserve any credit here as I just passed along an observation after you modified your code based on a question I had about whether it was possible to do something. Glad you found and corrected something you had been chasing, though.

                                            S 1 Reply Last reply Reply Quote 0

                                            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
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 3 / 4
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy