Read the statement by Michael Teeuw here.
MMM-iCloud-Client
-
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 MM2Deine 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!
-
Hi, did you fix the problem?
I am looking for a module to show my Apple Calendar in MM2.Cheers
KC -
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. -
you get no error in the response of
instance.contacts
, but at the same timeresult.contacts
is undefined. therefore it will be interesting what you getting as a result in the callback: tryconsole.log(results);
between line L134 and L135 in node_helper.jsinstance.contacts(function(err, results) { if (err) return console.log("failed to fetch contacts"); console.log(results); results.contacts.forEach(function(contact) { //Line 135 ....
-
@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? -
@lolobyte but the result is not logged in there, this is just the log of the exception which happens in the line after
-
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
-
what u mean with in the line after?
-
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
-
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?