Closed Bug 1649036 Opened 4 years ago Closed 4 years ago

Blank calendar possibly related to DavMail PROPFIND not returning D:supported-report-set

Categories

(Calendar :: Provider: CalDAV, defect)

Thunderbird 78
defect

Tracking

(thunderbird_esr78 fixed)

RESOLVED FIXED
Thunderbird 80.0
Tracking Status
thunderbird_esr78 --- fixed

People

(Reporter: carl.lewis, Assigned: pmorris)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.30 Safari/537.36

Steps to reproduce:

Set up a CalDav calendar as normal using DavMail as the provider.

Actual results:

Setup proceeds normally and calendar is created, but is blank. Events can be created through thunderbird and show up in the Exchange Calendar, but no events from the Exchange calendar (existing or new) are displayed in the Thunderbird calendar.
Error Log shows (username edited):

Lightning: CalDAV: send (PROPFIND http://localhost:1080/users/USER.NAME%40ACME.COM/calendar/): <?xml version="1.0" encoding="UTF-8"?>
<D:propfind xmlns:D='DAV:' xmlns:C='urn:ietf:params:xml:ns:caldav' xmlns:CS='http://calendarserver.org/ns/'><D:prop><D:resourcetype/><D:owner/><D:current-user-principal/><D:supported-report-set/><C:supported-calendar-component-set/><CS:getctag/></D:prop></D:propfind> CalDavRequest.jsm:121
TypeError: impl is null
network-response-listener.js:104:7
TypeError: impl is null
network-response-listener.js:104:7
TypeError: impl is null
network-response-listener.js:104:7
TypeError: impl is null
network-response-listener.js:104:7
Lightning: CalDAV: recv: <?xml version="1.0" encoding="UTF-8"?><D:multistatus xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:E="urn:ietf:params:xml:ns:carddav"><D:response><D:href>/users/USER.NAME@ACME.COM/calendar/</D:href><D:propstat><D:prop><D:resourcetype><D:collection/><C:calendar/></D:resourcetype><D:owner><D:href>/principals/users/USER.NAME@ACME.COM</D:href></D:owner><CS:getctag xmlns:CS="http://calendarserver.org/ns/">MjAyMC0wNi0yOFQxMjo1NToxNFoyMDIwLTAzLTIwVDEyOjA3OjQ1Wg==</CS:getctag><C:supported-calendar-component-set><C:comp name="VEVENT"/><C:comp name="VTODO"/></C:supported-calendar-component-set></D:prop><D:status>HTTP/1.1 200 OK</D:status></D:propstat></D:response></D:multistatus> CalDavRequest.jsm:140
Lightning: CalDAV: Status 207 on initial PROPFIND for calendar WorkExchange CalDavCalendar.jsm:1460
Lightning: CalDAV: Authentication scheme for WorkExchange is Basic CalDavCalendar.jsm:1495
TypeError: response.firstProps['D:supported-report-set'] is undefined
CalDavCalendar.jsm:1521:13

Version of DavMail source code I looked at seemed to have no obvious code to return D:supported-report-set.

Expected results:

Remote Calendar should have been displayed. This worked fine up until recent betas.
Version of Davmail is unchanged, have now tested multiple versions of Davmail in both local and server mode. The log above is consistent in all scenarios. The output above is against DavMail 5.5.1-3299-1 (5.5.1 on Debian 10) in local mode and Thunderbird 78.0b3

Status: UNCONFIRMED → NEW
Ever confirmed: true
Regressed by: 1546606
Keywords: regression

I have the same issue. I have modified resource:///modules/CalDavCalendar.jsm so that line 1521 is now

    if (response.firstProps["D:supported-report-set"] && response.firstProps["D:supported-report-set"].has("D:sync-collection")) {

instead of

    if (response.firstProps["D:supported-report-set"].has("D:sync-collection")) {

and it seems to work.
Not sure if it is a good solution but since it is only influencing setting a capability flag it should not be harmful.
However the file is full of such blind function chaining on unchecked input - is that OK?

Flags: needinfo?(paul)

Thanks janos.szentpali. I have not reproduced the problem to test locally, but since this small change apparently fixes it and won't cause any other problems, let's go ahead and do it and then see if it resolves the problem.

Assignee: nobody → paul
Status: NEW → ASSIGNED
Flags: needinfo?(paul)
Attachment #9163276 - Flags: review?(geoff)
Attachment #9163276 - Flags: review?(geoff) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/c1b4d73fabbd
Fix the check for "D:sync-collection" in CalDavCalendar.jsm. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 80.0
Comment on attachment 9163276 [details] [diff] [review]
fix-check-for-sync-collection-0.diff

[Approval Request Comment]
Regression caused by (bug #): 1546606
User impact if declined: Calendars fail to sync with DavMail Exchange gateway software, and possibly other calendar servers.
Testing completed (on c-c, etc.): Has been on c-c for about a week.
Risk to taking this patch (and alternatives if risky): Very low, it just adds an existence check to prevent a failed property lookup.
Attachment #9163276 - Flags: approval-comm-esr78?
Comment on attachment 9163276 [details] [diff] [review]
fix-check-for-sync-collection-0.diff

Approved for esr78
Attachment #9163276 - Flags: approval-comm-esr78? → approval-comm-esr78+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: