Cached CalDAV calendar stops syncing until restart after a network error during the ctag check
Categories
(Calendar :: Provider: CalDAV, defect)
Tracking
(Not tracked)
People
(Reporter: ndo84bw, Assigned: ndo84bw)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
Only affects servers without WebDAV sync, where Thunderbird checks the calendar's ctag first (e.g. Posteo, going by bug 1694709 comment 3).
Steps to reproduce:
- Subscribe to such a calendar with offline support.
- Let a sync fail on a network error, e.g. the server is unreachable for a moment.
- Bring the network back, add an event on the server and synchronize.
Actual results:
The event never arrives. Thunderbird sends no more requests for that calendar and shows no error. Only a restart or toggling offline support helps.
Expected results:
One failed sync, then recovery.
The ctag request handles only a response, not a failed request: https://searchfox.org/comm-central/rev/46e0b0479e93ccd58ac1c501446137ad77d24b12/calendar/providers/caldav/CalDavCalendar.sys.mjs#1373-1411
On a network error the sync is never told it failed, so the cached calendar keeps waiting for it and every later sync is skipped. Before bug 1546606 this case was handled ("Error without status on checking ctag"). The neighbouring etag request shows the missing part: https://searchfox.org/comm-central/rev/46e0b0479e93ccd58ac1c501446137ad77d24b12/calendar/providers/caldav/CalDavCalendar.sys.mjs#1489-1496
Reproduced in xpcshell with CalDAVServer (canDoSyncCollection = false, server closed during a sync). Same symptom as bug 2076351, different cause.
I can write a patch, but not right away. If someone gets to it first, go ahead.
Seen in the wild in bug 1694709 comment 66: Thunderbird 156.0.1 on Windows 11, laptop waking up with DNS not yet available (NS_ERROR_UNKNOWN_HOST). The calendars that stopped syncing left exactly this unhandled rejection in the Error Console, and sent no more requests afterward. Calendars that took the etag route instead recovered.
A failed ctag request was never reported, so the cached calendar waited for it forever and skipped every later sync until a restart.
Updated•10 days ago
|
Updated•6 days ago
|
Pushed by corey@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/ee92ed604e28
Keep syncing a CalDAV calendar after a network error while checking for changes. r=tobyp
Description
•