Thunderbird errors - (sh*t happens)

mail

Thunderbird calendar MODIFICATION_FAILED

This is a workaround rather than a solution :
  • I don't know the exact root cause
  • I've been able to get rid of the error without actually fixing it
  • I used Outlook Web Access to edit things, but it _may_ not be required

Situation

The context : ... until Thunderbird popped an error window saying :
An error occurred when writing to the calendar My Agenda! Please see below for more information.

Error code: MODIFICATION_FAILED

If you're seeing this message after snoozing or dismissing a reminder and this is for a calendar you do not want to add or edit events for,
you can mark this calendar as read-only to avoid such experience in future. To do so, get to the calendar properties
by right-clicking on this calendar in the list in the calendar or task view.

Details

Dive in the logs

~/davmail.log says :
2021-10-13 09:09:03,595 ERROR [CaldavConnection-38320] davmail  - ErrorCalendarIsNotOrganizer User must be an organizer for CancelCalendarItem action.
 request:
	<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
		<soap:Header>
			<t:RequestServerVersion Version="Exchange2010_SP1"/>
		</soap:Header>
		<soap:Body>
			<m:CreateItem MessageDisposition="SendAndSaveCopy" SendMeetingInvitations="SendToAllAndSaveCopy">
				<m:SavedItemFolderId>
					<t:DistinguishedFolderId Id="sentitems"/>
				</m:SavedItemFolderId>
				<m:Items>
					<t:CancelCalendarItem>
						<t:ReferenceItemId Id="AAMkADRkNjVhYWNjLTY1OWEtNDIzZC04Njc2LTBmOTQ3MzIwYjk1NABGAAAAAAB1knUEBuiiQZlhA8/drB/tBwB5v7bt3o0aTLmGE5x/PphOAEjPGrBZAADs8gwpi+Y5Tp6hf8/uZcnqAABxE5r+AAA=" ChangeKey="DwAAABYAAADs8gwpi+Y5Tp6hf8/uZcnqAABxFEdW"/>
					</t:CancelCalendarItem>
				</m:Items>
			</m:CreateItem>
		</soap:Body>
	</soap:Envelope>
	
	at davmail.exchange.ews.EWSMethod.checkSuccess(EWSMethod.java:802)
	at davmail.exchange.ews.EwsExchangeSession.internalExecuteMethod(EwsExchangeSession.java:2933)
	at davmail.exchange.ews.EwsExchangeSession.executeMethod(EwsExchangeSession.java:2895)
	at davmail.exchange.ews.EwsExchangeSession.deleteItem(EwsExchangeSession.java:2565)
	at davmail.caldav.CaldavConnection.handleFolderOrItem(CaldavConnection.java:306)
	at davmail.caldav.CaldavConnection.handleRequest(CaldavConnection.java:237)
	at davmail.caldav.CaldavConnection.run(CaldavConnection.java:180)
So I understand I can not remove / cancel / delete one of the entries of my agenda because I'm not the event organizer. But I still don't know which one. I just have its ID : uZcnqAABxE5.

Find which agenda entry has the corresponding ID

At that point, it depends on whether you're a lucky person or not (even more luck needed if you're very busy and your agenda is crowded ).
Try to remember :
  • which event(s) you added to your agenda short before this error popped up
  • you are not the organizer of the faulty event : this is something you've been invited to and you accepted (unsure, but pretty likely otherwise you wouldn't be trying to cancel it)
As for me it was an invitation to
  • a recurring company-wide event
  • with a very long list of attendees
  • with a "complex" message (not just basic text) having lots of formatting + embedded images + special characters (emojis) in the message body
⇒ Hope this helps...

Method to find the faulty event

  1. in a terminal :
    tail -f ~/davmail.log
  2. in the Calendar view of Thunderbird, you'll have to try events until you find the culprit :
    right-click event | Attendance | Complete series | [x] accepted
    What you're doing here is actually re-accepting an event you already accepted.
  3. Each action generates a log entry, until you see :
    2021-10-13 09:43:10,841 WARN  [CaldavConnection-38750] davmail.exchange.ExchangeSession  - Overwritten event
    /users/thomas.anderson@metacortex.com/calendar/AAMkADRkNjVhYWNjLTY1OWEtNDIzZC04Njc2LTBmOTQ3MzIwYjk1NABGAAAAAAB1knUEBuiiQZlhA8_drB_tBwB5v7bt3o0aTLmGE5x_PphOAEjPGrBZAADs8gwpi-Y5Tp6hf8_uZcnqAABxE5sCAAA=.EML
    You found the culprit !

Solution

I've not spent too much time investigating what's wrong with this event. Instead, as a workaround, here's what I did :
  1. note as much information as possible about this event : date / time / recurrence / organizer / location / URLs /
  2. connect to Outlook Web Access
  3. delete the event series manually
  4. re-create the same event series manually