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

Error with Outlook Calendar



  • I can’t get an outlook calendar to work with the defualt calendar module. The events just won’t show up. The console error is:

    [2020-10-02 22:45:26.002] [ERROR]  Whoops! There was an uncaught exception...
    [2020-10-02 22:45:26.003] [ERROR]  TypeError: Cannot read property 'iana' of undefined
        at getIanaTZFromMS (/home/pi/MagicMirror/node_modules/node-ical/ical.js:108:30)
        at /home/pi/MagicMirror/node_modules/node-ical/ical.js:175:23
        at Object.DTSTART (/home/pi/MagicMirror/node_modules/node-ical/ical.js:457:32)
        at Object.handleObject (/home/pi/MagicMirror/node_modules/node-ical/ical.js:483:39)
        at Object.parseLines (/home/pi/MagicMirror/node_modules/node-ical/ical.js:534:18)
        at Object.parseICS (/home/pi/MagicMirror/node_modules/node-ical/ical.js:590:18)
        at Object.sync.parseICS (/home/pi/MagicMirror/node_modules/node-ical/node-ical.js:190:15)
        at Object.autodetect.parseICS (/home/pi/MagicMirror/node_modules/node-ical/node-ical.js:221:17)
        at Request._callback (/home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js:79:22)
        at Request.self.callback (/home/pi/MagicMirror/node_modules/request/request.js:185:22)
    

    The config I have for calendar the calendar module is:

                    {
                            module: "calendar",
                            header: "Today",
                            position: "top_left",
                            config: {
                                    calendars: [
                                            {
                                                    //holidays
                                                    symbol: "calendar",
                                                    url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
                                            },
                                            {
                                                    //NEC
                                                    symbol: "music",
                                                    url: "private_url.ics"
                                            },
                                    ],
                                    maximumEntries: 25,
                                    maximumNumberOfDays: 1,
                                    fade: false,
                                    getRelative: 0,
                                    animationSpeed: 1000,
                            }
                    },
    
    


  • @bokchok can you show me/send the ics file.

    are you on version 2.13, or the test iCal version?

    I fixed that bug in the node-ical version



  • @sdetweil I’m on 2.13. I went ahead and set you the ics file



  • @bokchok thanks, will look at it



  • @sdetweil can u verify on 2.13, cause the fix for that is in 2.13

    grep version ~/MagicMirror/package.json

    and how did u get there? install or upgrade?



  • Had same issues.
    had a long search and found the soultion:

    get latest version of ical.js and copy/write it to ~/MagicMirror/node_modules/node-ical.ical.js

    Link : https://raw.githubusercontent.com/jens-maus/node-ical/master/ical.js

    now it works like a charm 😉



  • @sdetweil I was having trouble with upgrading, so I saved config.js in a separate directory and did a clean install of MagicMirror two days ago. Everything should be up to date



  • @Yunalescar Worked! Thank you sir



  • @bokchok but. please, lets fix that… I updated both the node-ical libs and the ical.js libs with the same code to handle windows timezones…

    we ship node-ical with MM… (new in this release)

    and I checked the latest 0.12.1



  • @bokchok @Yunalescar can u look at the package.json in

    ~/MagicMirror/node_modules/node-ical/package.json

    what is the version number? should be 0.12.1 (which has the fix for the error) 0.12.0 does not have the fix…


Log in to reply