tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
5.98k stars 513 forks source link

Uncaught TypeError: Cannot read properties of undefined (reading 'trim') when editing event #6230

Open kib42 opened 9 months ago

kib42 commented 9 months ago
Client: darwin
Tutanota version: 3.118.30
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) tutanota-desktop/3.118.30 Chrome/116.0.5845.228 Electron/26.5.0 Safari/537.36
TypeError
Error message: Cannot read properties of undefined (reading 'trim')
Stacktrace:
TypeError: Cannot read properties of undefined (reading 'trim')
at Er (asset://app/common-35eb61f9.js:1:354122)
at ol.setupAttendees (asset://app/date-1c8b0835.js:1:119066)
at new ol (asset://app/date-1c8b0835.js:1:116831)
at asset://app/date-1c8b0835.js:1:136789
at N.whenModel (asset://app/date-1c8b0835.js:1:136464)
at async makeCalendarEventModel (asset://app/date-1c8b0835.js:1:135723)
at async Object.calendarEventModel (asset://app/main-d5ef5d1d.js:1:89098)
at async vr.editAll (asset://app/calendar-view-70482445.js:1:48435)
ganthern commented 9 months ago

I assume that this is happening in cleanMailAddress It's a missing mail address on an own EncryptedMailAddress (normally consisting of name / mail address), on the organizers EncryptedMailAddress or on one of the attendees.

is this import-related, or happened during edit or responding to an event?

charlag commented 9 months ago

ah it's probably encryption error?

fegabe commented 9 months ago

The error is happening when editing or deleting the event. And it's because there is an attendee that is shown as empty, but not sure how I came up into that situation.

Here is the log without obfuscation

error TypeError: Cannot read properties of undefined (reading 'trim')
    at Er (CommonCalendarUtils.ts:99:17)
    at ol.setupAttendees (CalendarEventWhoModel.ts:228:16)
    at new ol (CalendarEventWhoModel.ts:114:8)
    at CalendarEventModel.ts:209:13
    at N.whenModel (CalendarEventModel.ts:282:17)
    at async makeCalendarEventModel (CalendarEventModel.ts:235:8)
    at async Object.calendarEventModel (MainLocator.ts:345:3)
    at async vr.deleteSingle (CalendarEventPopupViewModel.ts:136:10)
    at async click (CalendarEventPopup.ts:59:15) TypeError: Cannot read properties of undefined (reading 'trim')
    at Er (asset://app/common-35eb61f9.js:1:354122)
    at ol.setupAttendees (asset://app/date-1c8b0835.js:1:119066)
    at new ol (asset://app/date-1c8b0835.js:1:116831)
    at asset://app/date-1c8b0835.js:1:136789
    at N.whenModel (asset://app/date-1c8b0835.js:1:136299)
    at async makeCalendarEventModel (asset://app/date-1c8b0835.js:1:135723)
    at async Object.calendarEventModel (asset://app/main-d5ef5d1d.js:1:89098)
    at async vr.deleteSingle (asset://app/calendar-view-70482445.js:1:47836)
    at async click (asset://app/calendar-view-70482445.js:1:43256)

Thanks for taking a look!

kib42 commented 3 months ago

The issue is still happening. It causes weird behavior when editing events. image

kib42 commented 3 months ago

Here are some more recent logs:

Logger.ts:99 TypeError: Cannot read properties of undefined (reading 'trim')
    at Md (CommonCalendarUtils.ts:99:17)
    at ai.renderAttendee (EventPreviewView.ts:184:29)
    at EventPreviewView.ts:157:32
    at Array.map (<anonymous>)
    at ai.renderAttendeesSection (EventPreviewView.ts:157:16)
    at ai.view (EventPreviewView.ts:92:9)
    at Function.s (mithril.js:186:16)
    at mithril.js:301:46
    at mithril.js:306:3
    at u (mithril.js:221:8)
error @ Logger.ts:99
a @ mithril.js:1119
(anonymous) @ mithril.js:1128
requestAnimationFrame (async)
s @ mithril.js:1126
display @ Modal.ts:132
show @ CalendarEventPopup.ts:165
showCalendarEventPopup @ CalendarView.ts:928
await in showCalendarEventPopup (async)
onEventSelected @ CalendarView.ts:904
onEventClicked @ CalendarView.ts:216
click @ CalendarDayEventsView.ts:123
onclick @ CalendarEventBubble.ts:58
E.handleEvent @ mithril.js:1022
Logger.ts:99 TypeError: Cannot read properties of undefined (reading 'onbeforeupdate')
    at mithril.js:1062:62
    at m (mithril.js:545:8)
    at g (mithril.js:441:11)
    at mithril.js:604:4
    at m (mithril.js:554:15)
    at g (mithril.js:441:11)
    at mithril.js:604:4
    at m (mithril.js:554:15)
    at mithril.js:614:9
    at m (mithril.js:557:9)
error @ Logger.ts:99
a @ mithril.js:1119
(anonymous) @ mithril.js:1128
requestAnimationFrame (async)
s @ mithril.js:1126
oncreate @ Modal.ts:60
s @ mithril.js:186
(anonymous) @ mithril.js:1104
a @ mithril.js:1118
(anonymous) @ mithril.js:1128
requestAnimationFrame (async)
s @ mithril.js:1126
(anonymous) @ CalendarView.ts:337
Logger.ts:99 TypeError: Cannot read properties of undefined (reading 'onbeforeupdate')
    at mithril.js:1062:62
    at m (mithril.js:545:8)
    at g (mithril.js:441:11)
    at mithril.js:604:4
    at m (mithril.js:554:15)
    at g (mithril.js:441:11)
    at mithril.js:604:4
    at m (mithril.js:554:15)
    at mithril.js:614:9
    at m (mithril.js:557:9)
error @ Logger.ts:99
a @ mithril.js:1119
(anonymous) @ mithril.js:1128
requestAnimationFrame (async)
s @ mithril.js:1126
E.handleEvent @ mithril.js:1024
Logger.ts:99 TypeError: Cannot read properties of undefined (reading 'onbeforeupdate')
    at mithril.js:1062:62
    at m (mithril.js:545:8)
    at g (mithril.js:441:11)
    at mithril.js:604:4
    at m (mithril.js:554:15)
    at g (mithril.js:441:11)
    at mithril.js:604:4
    at m (mithril.js:554:15)
    at mithril.js:614:9
    at m (mithril.js:557:9)
error @ Logger.ts:99
a @ mithril.js:1119
(anonymous) @ mithril.js:1128
requestAnimationFrame (async)
s @ mithril.js:1126
display @ Modal.ts:132
displayUnique @ Modal.ts:183
(anonymous) @ Dropdown.ts:438
Promise.then (async)
(anonymous) @ Dropdown.ts:422
Qa @ CalendarGuiUtils.ts:822
await in Qa (async)
handleDeleteButtonClick @ CalendarEventPopup.ts:55
onclick @ BaseButton.ts:42
E.handleEvent @ mithril.js:1022
Logger.ts:99 TypeError: Cannot read properties of undefined (reading 'onbeforeupdate')
    at mithril.js:1062:62
    at m (mithril.js:545:8)
    at g (mithril.js:441:11)
    at mithril.js:604:4
    at m (mithril.js:554:15)
    at g (mithril.js:441:11)
    at mithril.js:604:4
    at m (mithril.js:554:15)
    at mithril.js:614:9
    at m (mithril.js:557:9)
error @ Logger.ts:99
a @ mithril.js:1119
(anonymous) @ mithril.js:1128
requestAnimationFrame (async)
s @ mithril.js:1126
E.handleEvent @ mithril.js:1024
Logger.ts:89 tried to open unique component while another was open!
Logger.ts:89 error TypeError: Cannot read properties of undefined (reading 'onremove')
    at C (mithril.js:831:61)
    at C (mithril.js:840:25)
    at C (mithril.js:840:25)
    at C (mithril.js:834:33)
    at C (mithril.js:840:25)
    at u (mithril.js:795:4)
    at c (mithril.js:788:44) TypeError: Cannot read properties of undefined (reading 'onremove')
    at C (asset://app/app.js:1:19887)
    at C (asset://app/app.js:1:20142)
    at C (asset://app/app.js:1:20142)
    at C (asset://app/app.js:1:20038)
    at C (asset://app/app.js:1:20142)
    at u (asset://app/app.js:1:19356)
    at c (asset://app/app.js:1:19300)
Logger.ts:89 error TypeError: Cannot read properties of undefined (reading 'trim')
    at Md (CommonCalendarUtils.ts:99:17)
    at ci.setupAttendees (CalendarEventWhoModel.ts:228:16)
    at new ci (CalendarEventWhoModel.ts:114:8)
    at CalendarEventModel.ts:212:13
    at M.whenModel (CalendarEventModel.ts:307:16)
    at async makeCalendarEventModel (CalendarEventModel.ts:240:8)
    at async Object.calendarEventModel (MainLocator.ts:373:3)
    at async CalendarEventPreviewViewModel.editAll (CalendarEventPreviewViewModel.ts:181:9) TypeError: Cannot read properties of undefined (reading 'trim')
    at Md (asset://app/common-SvNSInxe.js:1:366620)
    at ci.setupAttendees (asset://app/date-gui-v7B9-N_R.js:1:38157)
    at new ci (asset://app/date-gui-v7B9-N_R.js:1:36141)
    at asset://app/date-gui-v7B9-N_R.js:1:54729
    at M.whenModel (asset://app/date-gui-v7B9-N_R.js:1:54404)
    at async makeCalendarEventModel (asset://app/date-gui-v7B9-N_R.js:1:53663)
    at async Object.calendarEventModel (asset://app/main-CzqkLUHi.js:1:80829)
    at async CalendarEventPreviewViewModel.editAll (asset://app/date-gui-v7B9-N_R.js:1:115660)
Logger.ts:89 removed topmost modal component
Logger.ts:89 error TypeError: Cannot read properties of undefined (reading 'trim')
    at Md (CommonCalendarUtils.ts:99:17)
    at ci.setupAttendees (CalendarEventWhoModel.ts:228:16)
    at new ci (CalendarEventWhoModel.ts:114:8)
    at CalendarEventModel.ts:212:13
    at M.whenModel (CalendarEventModel.ts:311:16)
    at makeCalendarEventModel (CalendarEventModel.ts:240:25)
    at async Object.calendarEventModel (MainLocator.ts:373:3)
    at async CalendarEventPreviewViewModel.deleteAll (CalendarEventPreviewViewModel.ts:149:10)
    at async Xa (CalendarGuiUtils.ts:845:29) TypeError: Cannot read properties of undefined (reading 'trim')
    at Md (asset://app/common-SvNSInxe.js:1:366620)
    at ci.setupAttendees (asset://app/date-gui-v7B9-N_R.js:1:38157)
    at new ci (asset://app/date-gui-v7B9-N_R.js:1:36141)
    at asset://app/date-gui-v7B9-N_R.js:1:54729
    at M.whenModel (asset://app/date-gui-v7B9-N_R.js:1:54550)
    at makeCalendarEventModel (asset://app/date-gui-v7B9-N_R.js:1:54689)
    at async Object.calendarEventModel (asset://app/main-CzqkLUHi.js:1:80829)
    at async CalendarEventPreviewViewModel.deleteAll (asset://app/date-gui-v7B9-N_R.js:1:115209)
    at async Xa (asset://app/date-gui-v7B9-N_R.js:1:16533)