• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

MMM-iCloud-Client

Scheduled Pinned Locked Moved Troubleshooting
11 Posts 7 Posters 7.0k Views 8 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.
  • L Offline
    lolobyte
    last edited by paviro Dec 18, 2016, 1:42 PM Dec 2, 2016, 6:25 PM

    Error while starting MM2 with this Module.
    All other modules and calendars are showing by the MM2.
    ApleID and Password are correct!
    I always have a incoming mail from Apple every time i restart MM2

    Deine Apple-ID (xxx@xxxxx.de) wurde verwendet, um sich mit einem Webbrowser bei iCloud anzumelden.
    Datum und Zeit: 2. Dezember 2016, 10:14 Uhr PST
    Betriebssystem: Linux
    Wenn dir die oben aufgeführten Informationen bekannt vorkommen, kannst du diese E‑Mail ignorieren.

    That seems all works fine, or don’t?

    This is a part of my log from MM2:
    Can somebody help with this issue?

    0|mm       | Whoops! There was an uncaught exception...
    0|mm       | TypeError: Cannot read property 'forEach' of undefined
    0|mm       |     at Class.<anonymous> (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_helper.js:135:21)
    0|mm       |     at Request._callback (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/icloud/index.js:117:13)
    0|mm       |     at Request.self.callback (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:186:22)
    0|mm       |     at emitTwo (events.js:106:13)
    0|mm       |     at Request.emit (events.js:191:7)
    0|mm       |     at Request.<anonymous> (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:1081:10)
    0|mm       |     at emitOne (events.js:96:13)
    0|mm       |     at Request.emit (events.js:188:7)
    0|mm       |     at IncomingMessage.<anonymous> (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:1001:12)
    0|mm       |     at IncomingMessage.g (events.js:286:16)
    

    Note from admin: Please use Markdown on code snippets for easier reading!

    1 Reply Last reply Reply Quote 0
    • K Offline
      Kai-Christoph
      last edited by Dec 18, 2016, 1:32 PM

      Hi, did you fix the problem?
      I am looking for a module to show my Apple Calendar in MM2.

      Cheers
      KC

      L B 2 Replies Last reply Dec 18, 2016, 7:54 PM Reply Quote 0
      • L Offline
        lolobyte @Kai-Christoph
        last edited by Dec 18, 2016, 7:54 PM

        @Kai-Christoph

        The problem is not fixed.
        I had hoped the developer or some other people here would answer me for this issue, but they doesn’t.

        S 1 Reply Last reply Dec 20, 2016, 6:14 PM Reply Quote 0
        • S Offline
          strawberry 3.141 Project Sponsor Module Developer @lolobyte
          last edited by Dec 20, 2016, 6:14 PM

          @lolobyte

          you get no error in the response of instance.contacts, but at the same time result.contacts is undefined. therefore it will be interesting what you getting as a result in the callback: try console.log(results); between line L134 and L135 in node_helper.js

          instance.contacts(function(err, results) {
              if (err) return console.log("failed to fetch contacts");
              console.log(results);
              results.contacts.forEach(function(contact) { //Line 135
                  ....
          

          Please create a github issue if you need help, so I can keep track

          L 1 Reply Last reply Dec 21, 2016, 3:38 PM Reply Quote 0
          • L Offline
            lolobyte @strawberry 3.141
            last edited by Dec 21, 2016, 3:38 PM

            @strawberry-3.141 said in MMM-iCloud-Client:

            lts.contacts.forEach(function(contact) { //Line 135

            ok, now tis is my new node_helper.js in the module folder from MMM-iCloud-Client

            instance.login(this.config.username, this.config.password, function(err) {
            if (err) return console.log(“login failed”);
            instance.contacts(function(err, results) {
            if (err) return console.log(“failed to fetch contacts”);
            console.log(results);
            results.contacts.forEach(function(contact) {
            contactDB.update({“contactId”: contact.contactId}, contact, {upsert: true});

            and the log result ist this:

            0|mm | Whoops! There was an uncaught exception…
            0|mm | TypeError: Cannot read property ‘forEach’ of undefined
            0|mm | at Class. (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_helper.js:136:22)
            0|mm | at Request._callback (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/icloud/index.js:117:13)
            0|mm | at Request.self.callback (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:186:22)
            0|mm | at emitTwo (events.js:106:13)
            0|mm | at Request.emit (events.js:191:7)
            0|mm | at Request. (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:1081:10)
            0|mm | at emitOne (events.js:96:13)
            0|mm | at Request.emit (events.js:188:7)
            0|mm | at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:1001:12)
            0|mm | at IncomingMessage.g (events.js:286:16)
            0|mm | MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?

            S 1 Reply Last reply Dec 21, 2016, 5:33 PM Reply Quote 0
            • S Offline
              strawberry 3.141 Project Sponsor Module Developer @lolobyte
              last edited by strawberry 3.141 Dec 21, 2016, 5:34 PM Dec 21, 2016, 5:33 PM

              @lolobyte but the result is not logged in there, this is just the log of the exception which happens in the line after

              Please create a github issue if you need help, so I can keep track

              L 2 Replies Last reply Dec 21, 2016, 7:40 PM Reply Quote 0
              • L Offline
                lolobyte @strawberry 3.141
                last edited by Dec 21, 2016, 7:40 PM

                @strawberry-3.141

                Sorry, your first step was a little confuse for me.

                for you it’s maybe familiar what you can do with coding and so on, i’m very very newbie, my age is 46 and i’m new in this environment developing, coding and so on.

                Please give me than a step by step instruction about witch information u need.

                pi@raspi2-MM2:~/MagicMirror $ pm2 logs mm
                [TAILING] Tailing last 10 lines for [mm] process (change the value with --lines option)
                /home/pi/.pm2/logs/mm-error-0.log last 10 lines:
                0|mm | at Request._callback (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/icloud/index.js:117:13)
                0|mm | at Request.self.callback (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:186:22)
                0|mm | at emitTwo (events.js:106:13)
                0|mm | at Request.emit (events.js:191:7)
                0|mm | at Request. (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:1081:10)
                0|mm | at emitOne (events.js:96:13)
                0|mm | at Request.emit (events.js:188:7)
                0|mm | at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:1001:12)
                0|mm | at IncomingMessage.g (events.js:286:16)
                0|mm | (node:11184) DeprecationWarning: sys is deprecated. Use util instead.

                /home/pi/.pm2/logs/mm-out-0.log last 10 lines:

                That’s the first log message of my mm2

                1 Reply Last reply Reply Quote 0
                • L Offline
                  lolobyte @strawberry 3.141
                  last edited by Dec 21, 2016, 7:43 PM

                  @strawberry-3.141

                  what u mean with in the line after?

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    Beh @Kai-Christoph
                    last edited by Oct 21, 2017, 3:44 PM

                    @Kai-Christoph

                    You can use vdirsyncer to sync a private iCloud calendar with your mirror.

                    I wrote a walkthrough here:

                    https://forum.magicmirror.builders/topic/5327/sync-private-icloud-calendar-with-magicmirror

                    1 Reply Last reply Reply Quote 0
                    • Feedy88F Offline
                      Feedy88
                      last edited by Jul 23, 2020, 12:31 PM

                      Digging out this old topic. I successfully could sync my private calendar with vdirsyncer to my Mirror. What I would like to add are the birthdays of my contacts. The issue with this one is, that they are not an acutal calendar.

                      I tried with another device specific password to bypass the two-factor authentification which I was assuming is the issue here but no success.

                      I would even be fine in manually downloading an .ics with the Birthdays but have no idea how to extract them from the contacts. Does anyone have been successful?

                      TazDevT 1 Reply Last reply Jun 8, 2022, 12:34 PM Reply Quote 0
                      • 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