Closed Bug 1854779 Opened 1 year ago Closed 5 months ago

iCloud calendar and contacts cannot be added (CalDAV/CardDAV)

Categories

(Thunderbird :: Address Book, defect)

Thunderbird 102
Unspecified
All
defect

Tracking

(Not tracked)

RESOLVED FIXED
126 Branch

People

(Reporter: fj4843t6asbjd8z7456zfgdhfhfr348943zfnhknd, Assigned: TbSync)

References

Details

Attachments

(4 files)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0

Steps to reproduce:

On Ubuntu with Thunderbird 102.15.1:

  1. Create an app specific password for your Apple ID
  2. Try to add CalDAV and CardDAV to Thunderbird using the common URLs and the app specific password:

Actual results:

Errors are shown (see attachments):

CalDAV: "Could not find calendars at this location. Please check your settings."
CardDAV: "Failed to connect"

Expected results:

Thunderbird should add iCloud calendar and contacts. It works fine with Evolution so it is NOT an issue with the Apple account.

Same problem here on Windows 11 with Thunderbird 115.3.1.

Since iCloud is not some niche-provider service, can this ticket please get a high priority?

Help is very appreciated!

(In reply to Magnus Melin [:mkmelin] from comment #1)

Bug 1849849. Or bug 1795862?

Sledge ?

Flags: needinfo?(fj4843t6asbjd8z7456zfgdhfhfr348943zfnhknd)
Attached image caldav.jpg

Still reproducible with 115.4.3

Still reproducible with 115.9.0. Could this get some priority? It's one of the biggest CalDAV/CardDAV provider (Apple) that is simply not working since a long time now.

I tend to officially sunset DAV-4-TbSync, and the only remaining
"feature" it supports which is not yet supported by Thunderbird is the
detection of iCloud calendars and address books.

I poked around the source and found that the detectCollection()
routine already has the calendar-home-set, but it is ignored and instead
it calls handlePrincipal(), trying to get the home-set from another
PROPFIND request, which fails.

This patch adds an early exit and uses the already found home-set,
instead of issuing another server request.

If this is not the right fix, it may at least give an idea of what is
going on. I can provide iCloud access credentials.

With this patch, I can enter my Apple-ID as username using a dedicated
app password created for Thunderbird, and the server icloud.com, to get
my calendars discovered and added.

Assignee: nobody → john
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

I tend to officially sunset DAV-4-TbSync, and the only remaining
"feature" it supports which is not yet supported by Thunderbird is the
detection of iCloud calendars and address books.

Fixing iCloud CalDAV discovery is handled in D206253.

The reason CardDAV discovery currently fails is: iCloud returns a 207
response for ${url.origin}/.well-known/carddav, but it does not
contain any useful information. The returned multi-response only
includes one entry, which has a 404 status. The actual good response is
retrievable from ${url.origin}, but since we have a response already,
it is skipped.

This patch clears the response, if it has no useful information, and that
seems to be enough. One could of course also check for the 404 status
inside the multi-response. But I see no need for it. The code used in
this patch is already used a few lines earlier, probably to work around
a similar issue.

This patch has two unresolved issues (when it comes to iCloud):

  • iCloud does not send a displayname and "card" is used. It should
    fall back to "contacts" or a similar name, if no displayname is found
  • the original request was made to https://icloud.com, and the code
    is currently not smart enough to use the same provided password for the
    follow-up request to https://p119-contacts.icloud.com (in my case) and
    a second password prompt is shown.

I can provide iCloud access credentials.

With this patch, I can enter my Apple-ID as username using a dedicated
app password created for Thunderbird, and the server icloud.com, to get
my address book discovered and added.

Component: Untriaged → Address Book
OS: Unspecified → All

Pushed by john@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/7435a60e1c7c
Support discovery of iCloud address books. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Target Milestone: 127 Branch → 126 Branch

Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/416f06fbe3cb
Support discovery of iCloud calendars. r=darktrojan

Flags: needinfo?(fj4843t6asbjd8z7456zfgdhfhfr348943zfnhknd)
Duplicate of this bug: 700237
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: