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

Unexpected error when updating calendar event after key rotation #7533

Closed
bedhub opened this issue Sep 6, 2024 · 0 comments · Fixed by #7537
Closed

Unexpected error when updating calendar event after key rotation #7533

bedhub opened this issue Sep 6, 2024 · 0 comments · Fixed by #7537
Labels
bug broken functionality, usability problems, unexpected errors state:tested We tested it and are about to release it
Milestone

Comments

@bedhub
Copy link
Contributor

bedhub commented Sep 6, 2024

When updating an event (only change the title, not the time) i always receive an unexpected error message. See stack trace below.

It only happens for after rotating the calendar group key.

To reproduce

  • Rotate calendar group key
  • Create a new event
  • Update the event title -> Error message appears when saving event.

from main_tutanota.log

2024-08-30T12:09:27.375Z I "removed topmost modal component"
2024-08-30T12:09:27.577Z I "error",Error,"Error: AssertNotNull failed : null\n    at h (asset://app/common-min-DhMq71QS.js:1:14220)\n    at Vo (asset://app/worker.js:18:39198)\n    at qo.encryptAndMapToLiteral (asset://app/worker.js:18:38309)\n    at Fs.update (asset://app/worker.js:1:29616)\n    at async CalendarFacade.updateCalendarEvent (asset://app/worker-lazy-1FQOS-ie.js:1:52192)"

from worker_tutanota.log

2024-08-30T12:09:21.000Z I "CalendarEvent list LjFiq1L--R-1 has 6 events"
2024-08-30T12:09:21.005Z I "CalendarEvent list O5Y78ZF--7-9 has 59 events"
2024-08-30T12:09:21.006Z I "CalendarEvent list O5Y78ZF--3-9 has 0 events"
2024-08-30T12:09:26.486Z I "failed to resolve session key",CryptoError
 Error message: invalid mac
2024-08-30T12:09:26.486Z I "could not resolve session key for instance of type tutanota/CalendarEvent"
Error message:
AssertNotNull failed : null
Stacktrace:
Error: AssertNotNull failed : null
    at h (asset://app/common-min-DhMq71QS.js:1:14220)
    at Vo (asset://app/worker.js:18:39198)
    at qo.encryptAndMapToLiteral (asset://app/worker.js:18:38309)
    at Fs.update (asset://app/worker.js:1:29616)
    at async CalendarFacade.updateCalendarEvent (asset://app/worker-lazy-1FQOS-ie.js:1:52192)
App version:
242.240821.0
Client type:
Linux
Additional info:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) tutanota-desktop/242.240821.0 Chrome/126.0.6478.185 Electron/31.3.1 Safari/537.36
@bedhub bedhub added the bug broken functionality, usability problems, unexpected errors label Sep 6, 2024
bedhub added a commit that referenced this issue Sep 6, 2024
Before making the REST request to update a calendar event we assign some technical attributes like _id and _ownerEncSessionKey to the new/updated event. The assignment of the _ownerKeyVersion was missing wich is required if we have another version of the group key. It is suspicious that we have to do this assignement at all because before editing the event we clone the existing entity and all attributes should have been assigned to the new one already. It should probably also not the responsibility of the updateCalendarEvent function to assign these attributes. This commit just fixes this issue itself so the user does not get the error but we should review the clone and update mechanism.

fixes #7533
@charlag charlag added this to the 244.240903.1 milestone Sep 9, 2024
@charlag charlag closed this as completed in a2fcb9c Sep 9, 2024
@charlag charlag added the state:tested We tested it and are about to release it label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug broken functionality, usability problems, unexpected errors state:tested We tested it and are about to release it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants