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.

    TypeError: curr.start.toISOString is not a function

    Scheduled Pinned Locked Moved Troubleshooting
    34 Posts 7 Posters 33.2k Views 6 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.
    • BangeeB Offline
      Bangee Module Developer
      last edited by

      ok, so here it is:

      Create fetcher ...
      Create fetcher done!
      curr contains:
      { type: 'STANDARD',
        params: [],
        start: { Mon, 01 Jan 1601 02:00:00 GMT tz: undefined },
        tzoffsetfrom: '+0200',
        tzoffsetto: '+0100',
        rrule: 'RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10' }
      curr.start is set to:
      { Mon, 01 Jan 1601 02:00:00 GMT tz: undefined }
      curr contains:
      { type: 'DAYLIGHT',
        params: [],
        start: { Mon, 01 Jan 1601 01:00:00 GMT tz: undefined },
        tzoffsetfrom: '+0100',
        tzoffsetto: '+0200',
        rrule: 'RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3' }
      curr.start is set to:
      { Mon, 01 Jan 1601 01:00:00 GMT tz: undefined }
      curr contains:
      { type: 'VEVENT',
        params: [],
        rrule: 'RRULE:FREQ=WEEKLY;UNTIL=20161004T183000Z;INTERVAL=1;BYDAY=TU;WKST=SU',
        uid: '040000008200E00074C5B7101A82E008000000009B3BEC42F394D10100000000000000001000000074F8AEF399AAD4438C6FBCBC8E500415',
        summary: 'Sommertraining',
        start: '00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna":20160524T203000',
        end: '00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna":20160524T220000',
        class: 'PUBLIC',
        priority: '5',
        dtstamp: '20160621T203603Z',
        transparency: 'OPAQUE',
        status: 'CONFIRMED',
        sequence: '0',
        location: 'Tco',
        'MICROSOFT-CDO-APPT-SEQUENCE': '0',
        'MICROSOFT-CDO-BUSYSTATUS': 'BUSY',
        'MICROSOFT-CDO-INTENDEDSTATUS': 'BUSY',
        'MICROSOFT-CDO-ALLDAYEVENT': 'FALSE',
        'MICROSOFT-CDO-IMPORTANCE': '1',
        'MICROSOFT-CDO-INSTTYPE': '1',
        'MICROSOFT-DISALLOW-COUNTER': 'FALSE' }
      curr.start is set to:
      00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna":20160524T203000
      /home/pi/MagicMirror/modules/default/calendar/vendor/ical.js/node-ical.js:45
            rule += ';DTSTART=' + curr.start.toISOString().replace(/[-:]/g, '');
      
      
      1 Reply Last reply Reply Quote 0
      • KirAsh4K Offline
        KirAsh4 Moderator
        last edited by

        There’s that failure … Notice the contents of curr.start in each iteration:

        curr.start is set to:
        { Mon, 01 Jan 1601 02:00:00 GMT tz: undefined }
        
        curr.start is set to:
        { Mon, 01 Jan 1601 01:00:00 GMT tz: undefined }
        
        curr.start is set to:
        00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna":20160524T203000
        

        That’s where it fails. It processes the previous two just fine, then encounters an invalid time stamp. This is something within the Offce386 calendar. What is that event?

        A Life? Cool! Where can I download one of those from?

        1 Reply Last reply Reply Quote 0
        • BangeeB Offline
          Bangee Module Developer
          last edited by

          its a weekly event.

          I’ll Try to delete this event and reload, but thats no the solution… :-(

          1 Reply Last reply Reply Quote 0
          • KirAsh4K Offline
            KirAsh4 Moderator
            last edited by

            It doesn’t appear that the event information is valid to begin with, at least not the way that Office386 is serving the information. It doesn’t make sense to me. It should be an array, not a string. So the next question is, is the data you are receiving valid? And if so, where is that getting mangled that 'curr' ends up with an invalid array.

            Unfortunately I don’t have/use Office386’s calendar, so I’m not going to be able to debug this unless you want to share your calendar link with me. or, recreate a blank one with similar events and share that.

            A Life? Cool! Where can I download one of those from?

            1 Reply Last reply Reply Quote 0
            • KirAsh4K Offline
              KirAsh4 Moderator
              last edited by

              Ok, preliminary digging done. It appears the pattern matching isn’t working correctly for the times that Office386 puts on its calendar, I mean, really 1601 for a year? I don’t think so.

              Anyway, I’m going to tag @MichMich on this since he wrote the default calendar and I believe the node-ical stuff as well. I have the output of the ICS, so if you had shared it to get me the link, you can unshare it. I can work with the saved output.

              A Life? Cool! Where can I download one of those from?

              1 Reply Last reply Reply Quote 0
              • BangeeB Offline
                Bangee Module Developer
                last edited by

                ok, sounds not that good as expected. Whats next?

                1 Reply Last reply Reply Quote 0
                • KirAsh4K Offline
                  KirAsh4 Moderator
                  last edited by

                  Basically one of us has to find the time to investigate. The way Office386 creates its dates is really odd. Leave it to Microsoft to break things … as always.

                  A Life? Cool! Where can I download one of those from?

                  1 Reply Last reply Reply Quote 0
                  • BangeeB Offline
                    Bangee Module Developer
                    last edited by

                    ok, my girlfriends calnedar is working. also with office 365 :-) so stupid…

                    1 Reply Last reply Reply Quote 0
                    • KirAsh4K Offline
                      KirAsh4 Moderator
                      last edited by

                      Does she have the same events as you? Setup the same way? Same time zones configured?

                      A Life? Cool! Where can I download one of those from?

                      1 Reply Last reply Reply Quote 0
                      • BangeeB Offline
                        Bangee Module Developer
                        last edited by

                        she has different events in her calendar, but the all the other things are the same as mine.

                        1 Reply Last reply Reply Quote 0
                        • MichMichM Offline
                          MichMich
                          last edited by

                          Do you have a calendar feed which I can test that gives the error?

                          1 Reply Last reply Reply Quote 0
                          • BangeeB Offline
                            Bangee Module Developer
                            last edited by

                            please give me your Mailadress, I’ll share my Calendar with you. :-)

                            1 Reply Last reply Reply Quote 0
                            • MichMichM Offline
                              MichMich
                              last edited by

                              Got it. Thanks. Will probably be able to look into this next week. Is that ok?

                              1 Reply Last reply Reply Quote 0
                              • BangeeB Offline
                                Bangee Module Developer
                                last edited by

                                yeah, no problem. today my calendar is running. I’ve made no changes…

                                strange, I’ve sent you the link to the working one.

                                Thanks! :hand_splayed_tone1:

                                1 Reply Last reply Reply Quote 0
                                • BangeeB Offline
                                  Bangee Module Developer
                                  last edited by

                                  @MichMich did you find the problem?

                                  MichMichM 1 Reply Last reply Reply Quote 0
                                  • MichMichM Offline
                                    MichMich @Bangee
                                    last edited by

                                    @Bangee Did not have any time to look into this … I’m sorry! Did I understand it correctly that you managed to solve it with the new calendar feed you sent me?

                                    1 Reply Last reply Reply Quote 0
                                    • BangeeB Offline
                                      Bangee Module Developer
                                      last edited by

                                      i’ve sent you the working on. i don’t know why, but most of the time, the calendar is working find.
                                      And sometimes there is this bug. I’ve sent you a diff file, with the differences between the files.

                                      1 Reply Last reply Reply Quote 0
                                      • BangeeB Offline
                                        Bangee Module Developer
                                        last edited by

                                        @MichMich I still have these problems with office365 calender :-(
                                        Did you found a solution for this issue?

                                        1 Reply Last reply Reply Quote 0
                                        • MichMichM Offline
                                          MichMich
                                          last edited by

                                          Did you tryout the develop branch yet? It might include some changes that could help you.

                                          1 Reply Last reply Reply Quote 0
                                          • E Offline
                                            eugenelai
                                            last edited by

                                            Any update on this? I’m also using office365 calendar and my Calendar randomly stopped working. I’ve tried the node debug.js and just get the below. @MichMich @KirAsh4

                                            pi@rpi3:~/MagicMirror/modules/default/calendar $ sudo node debug.js
                                            Create fetcher ...
                                            Create fetcher done! 
                                            [ { title: 'Max',
                                                startDate: '1493568000000',
                                                endDate: '1493654400000',
                                                fullDayEvent: true,
                                                firstYear: 1990 },
                                              { title: 'Someone',
                                                startDate: '1493740800000',
                                                endDate: '1493827200000',
                                                fullDayEvent: true,
                                                firstYear: 2010 },
                                              { title: 'Another',
                                                startDate: '1493913600000',
                                                endDate: '1494000000000',
                                                fullDayEvent: true,
                                                firstYear: 2000 },
                                              { title: 'Event',
                                                startDate: '1494086400000',
                                                endDate: '1494172800000',
                                                fullDayEvent: true,
                                                firstYear: 1980 } ]
                                            ------------------------------------------------------------
                                            
                                            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
                                            • 4 / 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