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.

    MM Error - .AppleDouble and UnhandledPromiseRejectionWarning

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    34 Posts 4 Posters 16.1k Views 3 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.
    • B Offline
      bolish
      last edited by

      @lavolp3

      Here is the list of the modules I’m using :

      0_1550178968289_Screenshot_ 20190214_ 221537.png

      It’s a lot…So it seems difficult to identify the one causing the issue, don’t you think so? Maybe you know an analysis method that could help?

      Do you think that by “disabled : true” then one by one, it could work to identify which one is causing the issue?

      Regards

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

        @bolish Well at first I would rule out:

        MMM-Wunderlist
        MMM-remote-control
        MMM-SystemStats
        calendar_monthly
        all in default

        I have these as well and not the message you’re finding.
        What you could try out:
        There is a module MMM-Logging by @shbatm giving the logging output more detail. It’s easy to install and you don’t need to configure anything.
        That module could be able to show where the unhandled promise reection is sitting.

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

        1 Reply Last reply Reply Quote 0
        • B Offline
          bolish
          last edited by

          @lavolp3
          OK I will give it a try this weekend and check the logs.
          Disabling them on by one (through the config.js) will not help?

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

            @bolish It will but it’s more work :-) That would be my next approach

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

            1 Reply Last reply Reply Quote 0
            • B Offline
              bolish
              last edited by

              @lavolp3
              Done…I can indeed see strange things…

              2019-02-15T22:45:59 <log> Launching application. (/home/pi/MagicMirror/js/electron.js:82 App.<anonymous>)
              2019-02-15T22:45:59 <error> ERROR! Could not find main module js file for .AppleDouble (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:258 Class.loadModuleDefaultConfig)
              2019-02-15T22:46:03 <error> (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut)
              2019-02-15T22:46:03 <error> (node:6793) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut)
              2019-02-15T22:46:03 <error> (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut)
              2019-02-15T22:46:03 <error> (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut)
              2019-02-15T22:46:03 <error> (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut)
              2019-02-15T22:46:04 <error> (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut)
              2019-02-15T22:46:08 <info> MMM-Logging updated config received, reloading console (/home/pi/MagicMirror/modules/MMM-Logging/node_helper.js:30 Class.socketNotificationReceived)
              
              

              What do you think?

              Regards

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

                @bolish
                OK that didn’t help.
                MMM-Logging at least gave us the file putting the error out but not file from which it originated.

                But isn’t Linux a beautiful wild monsterous creature?
                Try this command

                find . -maxdepth 2 -exec grep -nwl  Promise 2>/dev/null {} +
                

                in the MagicMirror directory.

                “find” looks for all files in the 3rd party module directories (all files with depth of 2 directories maximum, we don’t want to have all the numerous node module files included), then it executes (“-exec”) a grep function searching the files for the “Promise” function.
                “2>/dev/null” is there to put all error output (there’s a lot) away from the standard output

                This will give you all 3rd party module files including the promise function. Then we can limit it to a few modules.

                With these you can do the “deactivate and look for errors” workflow and find out the one responsible

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

                1 Reply Last reply Reply Quote 0
                • B Offline
                  bolish
                  last edited by

                  @lavolp3
                  this is the result I have :

                  ./js/main.js
                  ./js/module.js
                  ./clientonly/index.js
                  
                  

                  Seems to be linked to the core system itself only and not to any particular module?
                  I’ve already made a git pull for MM itself but it’s already up to date.

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

                    @bolish Sorry my bad. You need to do it in the modules folder. Then maxdepth 2 leads to the folder itself and all 3rd party folders.
                    Sorry again!

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

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      bolish
                      last edited by bolish

                      @lavolp3
                      !!! it’s not your fault, it’s shame on me!!!

                      Anyway, I just did it…Result is zero…Nothing…

                      pi@MagicPi:~/MagicMirror/modules $ find . -maxdepth 2 -exec grep -nwl  Promise 2>/dev/null {} +
                      pi@MagicPi:~/MagicMirror/modules $ 
                      
                      

                      So…disable them one by one is the next analysis step??

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

                        @bolish First, try another one

                        find . -maxdepth 2 -exec grep -nwl  .then 2>/dev/null {} +
                        

                        Promises are not always processed by a Promise function, but I also by calling something and then calling .then().
                        Actually I know these bastards for two or three days now, so I’m far from being an expert

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

                        1 Reply Last reply Reply Quote 1
                        • B Offline
                          bolish
                          last edited by bolish

                          @lavolp3
                          thx

                          Here is the result

                          pi@MagicPi:~/MagicMirror/modules $ find . -maxdepth 2 -exec grep -nwl  .then 2>/dev/null {} +
                          ./MMM-Remote-Control/node_helper.js
                          ./MMM-Remote-Control/installer.sh
                          ./MMM-BackgroundSlideshowInfo/README.md
                          ./MMM-NotificationTrigger/README.md
                          pi@MagicPi:~/MagicMirror/modules $ 
                          
                          

                          So… Remote Control I believe…
                          I will try to disable it and see what happens.

                          lavolp3L 1 Reply Last reply Reply Quote 0
                          • B Offline
                            bolish
                            last edited by bolish

                            I confirm…
                            No error message anymore after disabling MMM-RemoteControl.

                            Wao…and now?? Do you have a clue about next step or should I raise an issue into MMM-ControlRemote git?

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

                              @bolish That’s odd. Something doesn’t add up, sorry. I think a “then” is searched as well. But try these modules.
                              If not successfull you’d need to go with disabling one module after another

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

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

                                @bolish Well, great!! BUt oddly, I dont have this… and I have the module as well.
                                Do you have Jopyth’s original version installed? Or a fork?

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

                                1 Reply Last reply Reply Quote 0
                                • B Offline
                                  bolish
                                  last edited by bolish

                                  @lavolp3
                                  I have the original version from Jopyth.
                                  S***, I hoped it would have been easier to figure out!!

                                  I just Git Pulled… Was already up to date

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

                                    @bolish OK I can confirm your errors. Had it disabled. By enabling the unhaldled promises come up.
                                    Raise an issue. I’ll have a look at the code

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

                                    1 Reply Last reply Reply Quote 0
                                    • B Offline
                                      bolish
                                      last edited by bolish

                                      Don’t you think it can be linked to the .appledouble thing. Remember that :

                                      2019-02-15T22:45:59  Launching application. (/home/pi/MagicMirror/js/electron.js:82 App.)
                                      2019-02-15T22:45:59  ERROR! Could not find main module js file for .AppleDouble (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:258 Class.loadModuleDefaultConfig)
                                      2019-02-15T22:46:03  (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut)
                                      2019-02-15T22:46:03  (node:6793) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut)
                                      2019-02-15T22:46:03  (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut)
                                      2019-02-15T22:46:03  (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut)
                                      2019-02-15T22:46:03  (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut)
                                      2019-02-15T22:46:04  (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut)
                                      2019-02-15T22:46:08  MMM-Logging updated config received, reloading console (/home/pi/MagicMirror/modules/MMM-Logging/node_helper.js:30 Class.socketNotificationReceived)
                                      
                                      

                                      Because the .appledouble error is refering to Remote Control also.

                                      So…you just have the same issue now but never noticed it before?

                                      lavolp3L 2 Replies Last reply Reply Quote 0
                                      • lavolp3L Offline
                                        lavolp3 Module Developer @bolish
                                        last edited by

                                        @bolish No.
                                        Unhandled promise rejections are code stuff that can be overcome quite easily.

                                        Think of it like this.
                                        You ask your program to do something outside (e.g. request data from somewhere else.
                                        When it doesn’t work the “promise” of delivering something is rejected.
                                        When this rejection is unhandled (the program isnt told what to do) you get this error

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

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

                                          @bolish said in MM Error - .AppleDouble and UnhandledPromiseRejectionWarning:

                                          So…you just have the same issue now but never noticed it before?

                                          May have been updated in the past. Don’t know.

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

                                          1 Reply Last reply Reply Quote 0
                                          • B Offline
                                            bolish @lavolp3
                                            last edited by

                                            @lavolp3
                                            Thanks for explanation.

                                            I’ve just raised it on Git on an existing issue log.

                                            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
                                            • 1 / 2
                                            • 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