kewisch/gdata-provider

"Delete only this ocurrence" from a periodic event

Closed this issue · 9 comments

jgato commented

Describe the problem and steps to reproduce it:

Fedora 35
Thunderbird 91.8.0

What happened?

When I try to delete only one occurrence of a recurring event it is not deleted, and the calendar shows an error about "calendar not available".
Chose one recurring event (not created by me), I click on the event. The window to choose to delete only this ocurrence or all the events appears. If I choose only this event, this is not deleted. And I can see this:
image
The error says the calendar is not available.
If I choose to delete all the events, it works.

What did you expect to happen?

This specific event is deleted, and the others events from the periodical event, remains.

Anything else we should know?

Enabled logs but I dont see any relevant/related error.

By the way, if I use the calendar with a caldav protocol. It happens the same, but... it dont even see this signal/Error making the calendar unavailable.

I am sure this is directly linked to the problem that affects my calendars: If I delete the oldest instance of a recurring event from my Thunderbird calendar, all subsequent instances are also deleted; in other words all instances.

My Thunderbird calendar synchronises with Google Calendar which in turn synchronises with aCalendar Plus on my Android phone (and I believe the native Android calendar).

If I do the deletion of the oldest instance in Google Calendar, or in aCalendar Plus on my Android phone, it works as expected; only that instance is deleted, subsequent instances remain.

Note that deleting the oldest event from another calendar then correctly synchronises with all others, including Thunderbird. My conclusion is that there is a problem with deleting one event from a recurring event in the otherwise outstanding useful and gorgeous Thunderbird calendar with Provider for Google Calendar.

I've tried the scenarios described and it did not fail for me. Let me know if there is a missing step:

  1. Subscribe to a Google Calendar as normal
  2. Create a daily recurring event by dragging in the view, editing and adding recurrence
  3. Delete second instance of event
  4. Delete first instance of event

Based on your descriptions after step 4 everything should vanish and/or 3 should not work at all. I'm unfortunately not seeing this.

Can you post logs for what is happening, from creation to deletion?

jgato commented

in my case, it only fails when the event was created by someonelse.
which logs I would enable? I remember trying it but not good luck with logs. Maybe I was not enabling them correctly.

Sorry for delay in replying - unwell. I followed your steps 1-4 and all worked. However, another try with an existing recurring event gave the old problem. Subsequent tests seemed to have confused my Android phone; for example, a recurring test entry remained on the phone despite being deleted from both Thunderbird and Google, through several reboots and restarts, and manual synchronisations.

I have become too confused between PC, laptop and Android to make any sense. I am beginning to think that Android's sync with Google Calendar is possibly suspect. I do apologise for wasting any time but I shall leave this until I can eliminate my phone as a cause of this issue.

in my case, it only fails when the event was created by someonelse. which logs I would enable? I remember trying it but not good luck with logs. Maybe I was not enabling them correctly.

https://github.com/kewisch/gdata-provider/wiki#enabling-debugging has instructions, let me know in case they are not correct.

I've read about issues with the android sync before, but ideally we can find a way to figure it out. Unfortunately I don't have an Android device for testing, so it will be a bit more tricky. What might be of interest is what android puts into the recurrence field.

If you could post steps to reproduce in a similar fashion as above, but involving whatever is necessary to reproduce with Android, we may be able to get to the bottom of it.

jgato commented

Ok now I see the error messages with the debug enabled.
Basically, what it happens... I receive a forbidden error.

It is trying to do a post over my calendar with this json

{
	"start": {
		"dateTime": "2022-04-19T10:00:00",
		"timeZone": "America/New_York"
	},
	"end": {
		"dateTime": "2022-04-19T11:00:00",
		"timeZone": "America/New_York"
	},
	"summary": "event foo and bar ",
	"description": "Blue Jeans Link",
	"location": "Bluejeans link in description ",
	"sequence": "1",
	"status": "confirmed",
	"reminders": {
		"overrides": [],
		"useDefault": true
	},
	"recurrence": ["RRULE:FREQ=WEEKLY;BYDAY=TU,TH;WKST=SU", "EXDATE:20220421T140000Z", "EXDATE:20220510T140000Z", "EXDATE:20220512T140000Z", "EXDATE:20220526T140000Z", "EXDATE:20220505T140000Z"]
}

which returns:

Calendar: [calGoogleCalendar] event foo and bar failed:2147500037: {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "forbidden",
    "message": "Forbidden"
   }
  ],
  "code": 403,
  "message": "Forbidden"
 }
}
jgato commented

by the way... this only happens, if the recurring event invitation was accepted and stored on a calendar (google calendar) provided by that addon. If I accept the invitation, but I put it on my local thunderbird calendar, I can delete an event on a recurring event.

Unfortunately I'll have to point to #3 on that message. I have an idea to fix this and have implemented it in the main branch, but that might be a while until I can release it. I suspect it is trying to set a field that has a different value on the server, so it bails.

jgato commented

is there any way of I can help you testing this?