Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with DSTART in some ics entries #3

Open
olafthiele opened this issue Nov 27, 2020 · 4 comments
Open

Problem with DSTART in some ics entries #3

olafthiele opened this issue Nov 27, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@olafthiele
Copy link

If DSTART contains just the time without timezone as zoom does, the error below is thrown. Line 157 should be changed to:

evt.allDay = (parsed[DTSTART;TZID=${self.timezone}] || parsed[DTSTART;VALUE=DATE] || parsed[DTSTART]).length === 8;

W20201127-09:21:45.019(1)? (STDERR)               evt.allDay = (parsed[`DTSTART;TZID=${self.timezone}`] || parsed[`DTSTART;VALUE=DATE`]).length
 === 8;
W20201127-09:21:45.020(1)? (STDERR)                                                                                                      ^
W20201127-09:21:45.020(1)? (STDERR)
W20201127-09:21:45.020(1)? (STDERR) TypeError: Cannot read property 'length' of undefined
W20201127-09:21:45.021(1)? (STDERR)     at C:\data\code\node\times\node_modules\caldavjs-nextcloud\index.js:159:102
W20201127-09:21:45.021(1)? (STDERR)     at onComplete (C:\data\code\node\times\node_modules\ical-parser\lib\index.js:115:10)
W20201127-09:21:45.022(1)? (STDERR)     at C:\data\code\node\times\node_modules\ical-parser\node_modules\async\dist\async.js:969:16
W20201127-09:21:45.022(1)? (STDERR)     at next (C:\data\code\node\times\node_modules\ical-parser\node_modules\async\dist\async.js:5225:18)
W20201127-09:21:45.023(1)? (STDERR)     at iteratee (C:\data\code\node\times\node_modules\ical-parser\lib\index.js:98:3)
W20201127-09:21:45.023(1)? (STDERR)     at next (C:\data\code\node\times\node_modules\ical-parser\node_modules\async\dist\async.js:5223:28)

W20201127-09:21:45.024(1)? (STDERR)     at iteratee (C:\data\code\node\times\node_modules\ical-parser\lib\index.js:98:3)
W20201127-09:21:45.024(1)? (STDERR)     at Object.whilst (C:\data\code\node\times\node_modules\ical-parser\node_modules\async\dist\async.js:522
7:5)
W20201127-09:21:45.025(1)? (STDERR)     at process (C:\data\code\node\times\node_modules\ical-parser\lib\index.js:118:8)
W20201127-09:21:45.025(1)? (STDERR)     at C:\data\code\node\times\node_modules\ical-parser\lib\index.js:62:3
W20201127-09:21:45.026(1)? (STDERR)     at C:\data\code\node\times\node_modules\ical-parser\node_modules\async\dist\async.js:473:16
W20201127-09:21:45.026(1)? (STDERR)     at iteratorCallback (C:\data\code\node\times\node_modules\ical-parser\node_modules\async\dist\async.js:
1064:13)
W20201127-09:21:45.027(1)? (STDERR)     at C:\data\code\node\times\node_modules\ical-parser\node_modules\async\dist\async.js:969:16
W20201127-09:21:45.028(1)? (STDERR)     at C:\data\code\node\times\node_modules\ical-parser\node_modules\async\dist\async.js:3263:30
W20201127-09:21:45.028(1)? (STDERR)     at Immediate.<anonymous> (C:\data\code\node\times\node_modules\ical-parser\node_modules\async\dist\asyn
c.js:119:16)
W20201127-09:21:45.029(1)? (STDERR)     at processImmediate (internal/timers.js:456:21)
@SLYtiger16
Copy link
Owner

Good catch, PR?

@SLYtiger16 SLYtiger16 added the enhancement New feature or request label Nov 27, 2020
@olafthiele
Copy link
Author

Will do, have to check. Looks like it doesn't catch the right start time in that case.

@olafthiele
Copy link
Author

olafthiele commented Nov 27, 2020

Problematic ICS that leads to the error for future reference (stems from zoom):

{
UID: 'e0318e97-df91-4392-97d4-9d97e1ee7319',
URL: 'httpsngels-and-starts-ups-tickets-127629403983',
DTSTART: '20201127T100000Z',
DTEND: '20201127T130000Z',
SUMMARY: 'Workshop',
LOCATION: '',
DTSTAMP: '20201121T195322Z',
DESCRIPTION: '\n httpsead.zoom.us/w/939196',
SEQUENCE: '1',
'LAST-MODIFIED': '20201121T195322Z'
}

Problem with line above: Start times is always current time and not the given start time.

@olafthiele
Copy link
Author

Solved by #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants