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.

    Calendar has stopped working

    Scheduled Pinned Locked Moved Solved Troubleshooting
    23 Posts 2 Posters 6.8k Views 2 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.
    • J Offline
      Jonsar @sdetweil
      last edited by Jonsar

      @sdetweil No, it doesn’t. It gets stuck on Preparing to download. Is there a workaround?

      Found this somewhere. Does it help?

      Bottom line was that the following lines needed to be added into the request.

      myHttpWebRequestOutlook.UserAgent = “SmileCRM”;
      myHttpWebRequestOutlook.AuthenticationLevel =System.Net.Security.AuthenticationLevel.None;

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

        @Jonsar if u can’t download in a normal browser we can’t get it either.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @sdetweil Sorry. I can with the html version. The error I get now is this:

          RangeError: Invalid time value
          at Date.toISOString (:null:null)
          at /home/pi/MagicMirror/modules/default/calendar/calendarutils.js:314:28
          at Array.forEach (:null:null)
          at Object.filterEvents (/home/pi/MagicMirror/modules/default/calendar/calendarutils.js:142:24)
          at /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js:74:29
          at processTicksAndRejections (node:internal/process/task_queues:96:5)

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

            @Jonsar said in Calendar has stopped working:

            Sorry. I can with the html version

            what does that mean? does it download the ics file or not?
            not view the cal in the web,… that is the embedded version, we need the raw data…

            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 @Jonsar
              last edited by

              @Jonsar ok, lets turn on debugging

              change config.js

              logLevel: ["INFO", "LOG", "WARN", "ERROR"],
              

              to

              logLevel: ["INFO", "LOG", "WARN", "ERROR","DEBUG"],
              

              then start mm like this

              cd ~/MagicMirror
              npm  start >somefile.txt 2>&1
              

              wait til the error,
              ctrl-q to stop MM
              then edit the somefile.txt

              error should be at the bottom

              Sam

              How to add modules

              learning how to use browser developers window for css changes

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

                @sdetweil Thanks for all your help.

                These are the last 4 or so entries. It seems that it’s trying to pick up entries from 2021 and then comes across an old entry that it can’t parse.

                {“type”:“VEVENT”,“params”:[],“uid”:“040000008200E00074C5B7101A82E0080000000093B227D5977DD701000000000000000010000000E1C248455EE3E241BFC9D2FBFB730A57”,“summary”:“Materials Due - MunichRe - Speaking & Writing Communication Skills”,“start”:$
                [18.09.2022 22:22.12.572] [DEBUG] start: Tue Sep 21 2021 09:00:00 GMT-0400 (Eastern Daylight Time)
                [18.09.2022 22:22.12.573] [DEBUG] end:: Tue Sep 21 2021 09:30:00 GMT-0400 (Eastern Daylight Time)
                [18.09.2022 22:22.12.573] [DEBUG] duration: 1800000
                [18.09.2022 22:22.12.573] [DEBUG] title: Materials Due - MunichRe - Speaking & Writing Communication Skills
                [18.09.2022 22:22.12.574] [DEBUG] Processing entry…
                [18.09.2022 22:22.12.574] [DEBUG] Event:
                {“type”:“VEVENT”,“params”:[],“uid”:“040000008200E00074C5B7101A82E00800000000EBF569C6329CD7010000000000000000100000007A6D0A4DBF5A8C43863B8DBA1D58CFC5”,“summary”:“DIANA - Calendly”,“start”:“2021-09-21T17:30:00.000Z”,“datetype”:“date-time”,$
                [18.09.2022 22:22.12.575] [DEBUG] start: Tue Sep 21 2021 13:30:00 GMT-0400 (Eastern Daylight Time)
                [18.09.2022 22:22.12.575] [DEBUG] end:: Tue Sep 21 2021 15:00:00 GMT-0400 (Eastern Daylight Time)
                [18.09.2022 22:22.12.576] [DEBUG] duration: 5400000
                [18.09.2022 22:22.12.576] [DEBUG] title: DIANA - Calendly
                [18.09.2022 22:22.12.577] [DEBUG] Processing entry…
                [18.09.2022 22:22.12.577] [DEBUG] Event:
                {“type”:“VEVENT”,“params”:[],“rrule”:{“_cache”:{“all”:false,“before”:[],“after”:[],“between”:[]},“origOptions”:{“tzid”:“undefined”,“dtstart”:“2021-09-21T22:30:00.000Z”,“freq”:2,“until”:“2021-11-23T23:30:00.000Z”,“interval”:1,“byweekday”:$
                [18.09.2022 22:22.12.578] [DEBUG] start: Tue Sep 21 2021 18:30:00 GMT-0400 (Eastern Daylight Time)
                [18.09.2022 22:22.12.578] [DEBUG] end:: Tue Sep 21 2021 21:30:00 GMT-0400 (Eastern Daylight Time)
                [18.09.2022 22:22.12.579] [DEBUG] duration: 10800000
                [18.09.2022 22:22.12.579] [DEBUG] title: Sarah ASL 1C (Units 7-9)
                [18.09.2022 22:22.12.580] [DEBUG] Search for recurring events between: Sun Sep 18 2022 22:22:12 GMT-0400 (Eastern Daylight Time) and Sun Sep 17 2023 23:59:59 GMT-0400 (Eastern Daylight Time)
                [18.09.2022 22:22.12.598] [DEBUG] Title: Sarah ASL 1C (Units 7-9), with dates: [null,null,null,null,null,null,null,null,null,null]
                [18.09.2022 22:22.12.598] [DEBUG] event.recurrences: [object Object]
                [18.09.2022 22:22.12.604] [ERROR] Calendar Error. Could not fetch calendar: https://outlook.office365.com/owa/calendar/4d70fc7a1bf94d5ab75018902050b8f9@tssg.ca/34612ac6511e4af9824700a66f879c90976 RangeError:$
                at Date.toISOString (:null:null)
                at /home/pi/MagicMirror/modules/default/calendar/calendarutils.js:314:28
                at Array.forEach (:null:null)
                at Object.filterEvents (/home/pi/MagicMirror/modules/default/calendar/calendarutils.js:142:24)
                at /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js:74:29
                at processTicksAndRejections (node:internal/process/task_queues:96:5)

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

                  @Jonsar said in Calendar has stopped working:

                  dates: [null,null,null,null,null,null,null,null,null,null]

                  hm… i fixed that problem last year…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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

                    @sdetweil Your help is greatly appreciated. It really is a great feature we constantly use for the family to keep everyone informed. If you can suggest a fix, that would be awesome.

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

                      @Jonsar looking at it… no idea yet

                      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 @Jonsar
                        last edited by sdetweil

                        @Jonsar ok, fun time… MS screws us again

                        they changed the format of the timezone reporting…lovely

                        not our code, but the calendar parser we use (that I fixed the last 2 times)

                        workaround

                        cd ~/MagicMirror/node_modules/node-ical
                        

                        nano ical.js , scroll down to line 120
                        delete the whole line and paste in the new one (cursor has to be on that line to paste it there)

                        change this (line 120 is the code, 119 is the comment)

                          // If this is the custom timezone from MS Outlook
                          if (tz === 'tzone://Microsoft/Custom' ) {
                        

                        to this

                          // If this is the custom timezone from MS Outlook
                          if (tz === 'tzone://Microsoft/Custom' || tz === 'Customized Time Zone' || tz.startsWith('tzone://Microsoft/')) {
                        

                        also need to fix our code

                        cd ~/MagicMirror/modules/default/calendar
                        

                        nano calendarutils.js

                        change this , line 518

                        	getIanaTZFromMS: function (msTZName) {
                        		// Get hash entry
                        

                        to this

                        	getIanaTZFromMS: function (msTZName) {
                        		if(msTZName ==='Customized Time Zone'){
                        			return moment.tz.guess()
                        		}
                        		// Get hash entry
                        

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

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

                          @sdetweil said in Calendar has stopped working:

                          cd ~/MagicMirror/modules/default/calendar

                          Thanks for this. It didn’t exactly work. It definitely got further than before but I ended up with this error.

                          Invalid time value
                          at Date.toISOString (:null:null)
                          at /home/pi/MagicMirror/modules/default/calendar/calendarutils.js:314:28
                          at Array.forEach (:null:null)
                          at Object.filterEvents (/home/pi/MagicMirror/modules/default/calendar/calendarutils.js:142:24)
                          at /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js:74:29
                          at processTicksAndRejections (node:internal/process/task_queues:96:5)

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

                            @Jonsar can u show me the cal event data in the logs right before the error?

                            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 @sdetweil
                              last edited by

                              @sdetweil said in Calendar has stopped working:

                              || tz === ‘Customized Time Zone’

                              I see there were two place in ical.js

                              and there is a timezone like this

                              ‘Customized Time Zone 1’

                              so this will fail

                              tz === 'Customized Time Zone'
                              

                              change to this

                               tz.startsWith('Customized Time Zone')
                              

                              in all three places … 2 in node ical.j one in caldendarutils.js

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

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

                                @sdetweil Thank you, but I can only find 1 place in ical.js. There is one place in calendarutils.js but it is:
                                if(msTZName === ‘Customized Time Zone’){

                                The whole error I get is:

                                [19.09.2022 21:46.41.439] [DEBUG] Search for recurring events between: Mon Sep 19 2022 21:46:41 GMT-0400 (Eastern Daylight Time) and Mon Sep 18 2023 23:59:59 GMT-0400 (Eastern Daylight Time)
                                [19.09.2022 21:46.41.441] [DEBUG] Title: Tentative: XX, with dates: [null,null]
                                [19.09.2022 21:46.41.442] [DEBUG] event.recurrences: [object Object]
                                [19.09.2022 21:46.41.449] [ERROR] Calendar Error. Could not fetch calendar: https://outlook.office365.com/owa/calendar/4d70fc7a1bf94d5ab75018902050b8f9@tssg.ca/XXXXXXcalendar.ics RangeError: Invalid time value
                                at Date.toISOString (:null:null)
                                at /home/pi/MagicMirror/modules/default/calendar/calendarutils.js:314:28
                                at Array.forEach (:null:null)
                                at Object.filterEvents (/home/pi/MagicMirror/modules/default/calendar/calendarutils.js:142:24)
                                at /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js:74:29
                                at processTicksAndRejections (node:internal/process/task_queues:96:5)

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

                                  @Jonsar said in Calendar has stopped working:

                                  find 1 place in ical.js. There is one place in calendarutils.js but it is:
                                  if(msTZName === ‘Customized Time Zone’){

                                  yes, I said above that there were actually 2… in ical.js
                                  and to make the second look like the 1st

                                  yes, in calendarutils, 1, which I gave instructions to change

                                  if(msTZName.startsWith(‘Customized Time Zone’){

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

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

                                    @sdetweil Sorry, I missed the second one in ical.js. It works now! Thanks so much for your help.

                                    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