Closed Bug 1659076 Opened 5 years ago Closed 1 year ago

Thunderbird does not well synchronize CALDAV calendars

Categories

(Calendar :: Provider: CalDAV, defect)

Thunderbird 80
x86_64
Windows 10
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1694709

People

(Reporter: hlein, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

Steps to reproduce:

created two calendars using caldav on different accounts/servers

Actual results:

Calendars are not well synchronized. Changes ar not passed through or not read if changed elsewhere (e.g. by web interface).
Some events do not even appear. Not with automatic sync intervalls not if sync is done manually.

Expected results:

should synchronize

Additional info:
Component: Untriaged → Provider: CalDAV
OS: Unspecified → Windows 10
Product: Thunderbird → Calendar
Hardware: Unspecified → x86_64
Version: 80 → Thunderbird 80

Not implemented yet. Or well, it's about to land, in bug 1660127.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

Can you explain the relation to 1660127? This report was about CalDAV protocol and calendars. Bug 1660127 is about CardDAV protocol and address books.

Flags: needinfo?(mkmelin+mozilla)

Sorry, I read this too fast. Reopening

Status: RESOLVED → REOPENED
Ever confirmed: true
Flags: needinfo?(mkmelin+mozilla)
Resolution: DUPLICATE → ---

What I discovered recently:
I have two PC's, with equal software installation and configuration (Windows release, Thunderbiurd release, calendar configuration)

On one of the systems, I was missing several events. They did not show up, even after severyl tries to synchronize (the reason for writing issueing this bug).
The problem seems to be connected in some way to "Offline-Support". When I did reset this flag (and set it again), the missing events came up.

Status: REOPENED → UNCONFIRMED
Ever confirmed: false

I have two PC's, with equal software installation and configuration (Windows release, Thunderbiurd release, calendar configuration)
On one of the systems, I was missing several events. They did not show up, even after severyl tries to synchronize (the reason for writing issueing this bug).

I'm actually in a similar position, and noticed several synchronization bugs as well. Didn't come around to create a TB bug report yet, but basically I have 2 Thunderbirds and one Android syncing the same caldav calendar. On Android, I see all changes as they're made (both locally and remotely), but the two Thunderbirds only see their own changes. Only completely deleting the calendar and re-adding it solves the problem.

Until I saw your suggestion to check and uncheck the "Offline-Support" option - it immediately synced my missing events. Which makes me wonder what it does, and if this should be a bug reported somewhere else?

Didn't create a new bug report, but found one that is exactly mine, and the checking and unchecking of the Offline Support doesn't fix it anymore: bug 1694709

(In reply to poweredbyblubb from comment #7)

Didn't create a new bug report, but found one that is exactly mine, and the checking and unchecking of the Offline Support doesn't fix it anymore: bug 1694709

Is this still seen this when using version 102?

See Also: → 1694709

102.6.1, build 20221219215418, 64-bit on Fedora 37: cannot reproduce anymore.
102.6.1, build 20221219215418, 64-bit on Windows 10: cannot reproduce anymore.

Previously I had to disable offline support for all of my CalDAV calendars in order to prevent events from disappearing. Now, with offline support enabled, the problem seems to be fixed. Can other users confirm the same results?

(In reply to Wayne Mery (:wsmwk) from comment #10)

Is this still seen this when using version 102?

Yes, I am on 102.0.9, and I am still "losing" events in the same way as described.
It is also still true that disabling/enabling offline support lets the events re-appear.

(Sorry, my version number is 102.9.0)

The problem seems to be resolved for me after trying a solution to a seemingly unrelated problem (not beeing able to dismiss event notifications/reminders).

The only change I made is unchecking the setting: "Show missed reminders for writable calendars" in the settings -> calendar -> reminders.

The issue still persists for me in Thunderbird 115.1.1 on Arch Linux. The synchronization actually works fine for some time, but afterwards new events that were added elsewhere won't appear in Thunderbird, no matter how often I press the sync button. The only fix for this seems to be disabling and then re-enabling Offline Support (as mentioned earlier in this thread).

Note that events created in Thunderbird are always correctly synced to the server. The only problem seems to be receiving new events.

(In reply to David from comment #15)

The issue still persists for me in Thunderbird 115.1.1 on Arch Linux.

I confirm that the bug is still present in 102.15.1 on Ubuntu.
Due to the bug, you miss events and appointments, so this is a SERIOUS issue. There is no acceptable workaround too.

I request that this issue gets upgraded in priority.

Please enable calendar.debug.log and calendar.debug.log.verbose in settings > config editor, then check error console for related log entries.

(In reply to Wayne Mery (:wsmwk) from comment #17)

Please enable calendar.debug.log and calendar.debug.log.verbose in settings > config editor, then check error console for related log entries.

Hi, thanks for answering!

I enabled the flags, and I see errors such as:
"Calendar: id is null when parsing"
"Calendar: Failed to parse item"
related to events which are not shown. Note that these events did show up just a few hours earlier today, and I did not change them. Also they are shown by different applications (such as Android calendar).
Don't know if this is the problem we are discussing here, but this may lead further.

(In reply to public from comment #18)

(In reply to Wayne Mery (:wsmwk) from comment #17)

Please enable calendar.debug.log and calendar.debug.log.verbose in settings > config editor, then check error console for related log entries.

Hi, thanks for answering!

I enabled the flags, and I see errors such as:
"Calendar: id is null when parsing"
"Calendar: Failed to parse item"
related to events which are not shown. Note that these events did show up just a few hours earlier today, and I did not change them. Also they are shown by different applications (such as Android calendar).
Don't know if this is the problem we are discussing here, but this may lead further.

I looked into this some more, and it looks like all the events which show the above mentioned errors "Calendar: id is null when parsing" and "Calendar: Failed to parse item" have something in common in their "DESCRIPTION"-field: there is always some sort of event participation link there, like MS Teams event links, such as this one:

DESCRIPTION:Guten Tag Herr (...) \n\nGerne schicke ich Ihnen hiermit den 
 Termin für das Telefoninterview und danke Ihnen für ihre Zeit.\n\nFreundli
 che Grüsse\n (...) \n................................................
 ..........................................................................
 ...............\nJoin online meeting<https://(...)\n\nFind a local number<https://ucc.ern
 i.ch/dialin>\n\nConference ID: 555900\n\nForgot your dial-in PIN?<https://
 (...)\n.....................................................
 ..........................................................................
 ..........\n

Note that I replaced some sensitive data with "(...)" in the code block above.

So I guess this is not necessarily the problem which we are discussing here, but maybe it is.

(In reply to Wayne Mery (:wsmwk) from comment #17)

Please enable calendar.debug.log and calendar.debug.log.verbose in settings > config editor, then check error console for related log entries.

I have Thunderbird running with these settings for a couple of days now. The issue discussed here (events disappearing, appearing again when switching "offline"-setting) did occur in this timeframe. But so far I could not detect a specific error/warning in the log which seems like it is directly related to this. So far, the only errors/warnings related to the calendar I see in the log are:
"Calendar: Could not find definition for W. Europe Standard Time" (error)
"Calendar: No unique email address for lookup!" (warning)

@Wayne Mery (:wsmwk):
Maybe you have a hint what to look at more specifically / what you would expect to appear in the logs?

Update: I'm running this logging config for a week now. Today, I found a different log error relating to the calender, which also matches the occurence of this issue (events disappearing/reappearing on switching "offline" setting):

"14:31:12.238 TypeError: foundItem is null CalDavCalendar.jsm:1039:24"

Unfortunately, there is no further information, no further log entry at about the same point in time.

(In reply to public from comment #21)

Update: I'm running this logging config for a week now. Today, I found a different log error relating to the calender, which also matches the occurence of this issue (events disappearing/reappearing on switching "offline" setting):

"14:31:12.238 TypeError: foundItem is null CalDavCalendar.jsm:1039:24"

Unfortunately, there is no further information, no further log entry at about the same point in time.

@ public: I was looking at this bug and wanted to chime in with this https://bugzilla.mozilla.org/show_bug.cgi?id=1768207#c18

I was having issues with my Android Calendar app seeing events my TB was not. I was almost certain it was Android's calendar app that was at fault. Can you try what I mentioned in my link above and see if it fixes it for you? I think a few Android Calendar app updates later and I haven't see the issue in TB since.

What I discovered recently:
I have two PC's, with equal software installation and configuration (Windows release, Thunderbiurd release, calendar configuration)

On one of the systems, I was missing several events. They did not show up, even after severyl tries to synchronize (the reason for writing issueing this bug).
The problem seems to be connected in some way to "Offline-Support". When I did reset this flag (and set it again), the missing events came up.

Version 115.8.1 here. I had exactly the same experience.
I do not know what caused it, but events were not appearing on Thunderbird until I re-enabled the Offline flag. Now it is all good without re-enabling it again. Calendar must have been in some invalid state. One error was appearing in console while the problem lasted:

JavaScript error: resource:///modules/CalDavCalendar.jsm, line 1039: TypeError: foundItem is null

(In reply to l3thal2 from comment #23)

Version 115.8.1 here. I had exactly the same experience.
I do not know what caused it, but events were not appearing on Thunderbird until I re-enabled the Offline flag. Now it is all good without re-enabling it again. Calendar must have been in some invalid state. One error was appearing in console while the problem lasted:

JavaScript error: resource:///modules/CalDavCalendar.jsm, line 1039: TypeError: foundItem is null

Helmut does this help you as well?

Flags: needinfo?(hlein)

(In reply to l3thal2 from comment #23)

I do not know what caused it, but events were not appearing on Thunderbird until I re-enabled the Offline flag. Now it is all good without re-enabling it again.

How did you re-enable the Offline flag exactly?

(In reply to Arthur K. (he/him) from comment #25)

(In reply to l3thal2 from comment #23)

I do not know what caused it, but events were not appearing on Thunderbird until I re-enabled the Offline flag. Now it is all good without re-enabling it again.

How did you re-enable the Offline flag exactly?

Calendar view -> Right click on calendar (network calendar) -> Properties -> Disable and then enable "Offline Support" checkbox field. I would attach screenshot but I don't know how to do that here

(In reply to l3thal2 from comment #26)

(In reply to Arthur K. (he/him) from comment #25)

(In reply to l3thal2 from comment #23)

I do not know what caused it, but events were not appearing on Thunderbird until I re-enabled the Offline flag. Now it is all good without re-enabling it again.

How did you re-enable the Offline flag exactly?

Calendar view -> Right click on calendar (network calendar) -> Properties -> Disable and then enable "Offline Support" checkbox field. I would attach screenshot but I don't know how to do that here

Got it. After doing this action, 314 events suddenly just popped up for me.

I actually did these steps:

  1. Calendar view (Alt-3) > right click on a calendar > Properties > Disable "Offline Support" > shutdown TB
  2. Restart TB. Calendar view (Alt-3) > right click on disabled offline calendar > Properties > Enable "Offline Support"

Error Console spitting out a few of these:
15:58:18.169 Calendar: CalDAV: Unexpected status modifying item to <redacted my email>: 403 CalDavCalendar.jsm:756
15:58:18.219 uncaught exception: Server Replied with 403 calProviderUtils.jsm:378:12
15:58:18.219 NS_ERROR_FAILURE: Server Replied with 403 14 calCachedCalendar.js:761

(In reply to Wayne Mery (:wsmwk) from comment #24)

(In reply to l3thal2 from comment #23)

Version 115.8.1 here. I had exactly the same experience.
I do not know what caused it, but events were not appearing on Thunderbird until I re-enabled the Offline flag. Now it is all good without re-enabling it again. Calendar must have been in some invalid state. One error was appearing in console while the problem lasted:

JavaScript error: resource:///modules/CalDavCalendar.jsm, line 1039: TypeError: foundItem is null

Helmut does this help you as well?

I don't know, as I have not encountered this problem since some time.
Just an idea: could this TypeError (null value) result from error handling of timeout/connection problems?

Flags: needinfo?(hlein)

So I have some further Error Console oputput for you Helmut. When I had a "stuck" event that no matter if I did Dismiss, Dismiss All, Reload, etc., TB would not take any successful action against it. This was even after I can done what I stated in comment 27. I was trying to delete the "stuck" event but couldn't. Don't know if it is related to sync or a new bug.

Error Console was showing me this.

08:30:53.720 Error: Polling for changes failed: Server error 503 Service Unavailable. RemoteSettingsComponents.sys.mjs:20:15
pollChanges resource://services-settings/remote-settings.sys.mjs:324

08:47:59.459 NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "cal.manager.getCalendarById(...) is null" {file: "resource:///modules/CalAlarmService.jsm" line: 820}]'[JavaScript Error: "cal.manager.getCalendarById(...) is null" {file: "resource:///modules/CalAlarmService.jsm" line: 820}]' when calling method: [calIAlarmService::isLoading] calDataUtils.jsm:41:17

closeIfEmpty chrome://calendar/content/calendar-alarm-dialog.js:461
removeWidgetFor chrome://calendar/content/calendar-alarm-dialog.js:401
mAlarms resource:///modules/CalAlarmMonitor.jsm:207
onRemoveAlarmsByItem resource:///modules/CalAlarmMonitor.jsm:203
notify resource:///modules/calendar/utils/calDataUtils.jsm:39
removeAlarmsForItem resource:///modules/CalAlarmService.jsm:503
dismissAlarm resource:///modules/CalAlarmService.jsm:302
promptOverwrite resource:///modules/calendar/utils/calProviderUtils.jsm:378
promptOverwrite resource:///modules/CalDavCalendar.jsm:506
doModifyItem resource:///modules/CalDavCalendar.jsm:748

09:55:08.756 TypeError: this.mItemInfoCache[aNewItem.id] is undefinedCalDavCalendar.jsm:712:24

This gets thrown on attempting to delete the "stuck" event.

10:01:44.803 Uncaught (in promise) TypeError: this.mItemInfoCache[item.id] is undefined CalDavCalendar.jsm:823:16
doDeleteItem resource:///modules/CalDavCalendar.jsm:823
deleteItem resource:///modules/CalDavCalendar.jsm:793
doTransaction resource:///modules/CalTransactionManager.jsm:350
commit resource:///modules/CalTransactionManager.jsm:79
doTransaction chrome://calendar/content/calendar-item-editing.js:694
onCommandDeleteItem chrome://calendar/content/calendar-item-iframe.js:3269
receiveMessage chrome://calendar/content/calendar-item-iframe.js:258

Same kind of problems for me with CalDav synch in TB.
Following comment #26, I have disabled offline support.
I will see if that helps.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago1 year ago
Depends on: 1694709
Duplicate of bug: 1694709
Resolution: --- → DUPLICATE
See Also: 1694709
See Also: → 1940193
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: