Radicale icon indicating copy to clipboard operation
Radicale copied to clipboard

Apple's Contacts Support

Open q6276270 opened this issue 7 years ago • 36 comments

Hello, is there any possibility for support of Apple’s Contacts on Mac OSX? I’ve tried to login on both on radicale 0.9 and 2.x and both times (for 2.x considering the fix given in #269) I managed to login but not to write to contacts. Thanks for your time!

q6276270 avatar Nov 05 '17 11:11 q6276270

I have the same problem, radicale 2.0.8, here's the log of my reverse proxy.

- [08/Nov/2017:20:39:37 +0000] "PROPFIND /.well-known/carddav HTTP/1.1" 404 60 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
- [08/Nov/2017:20:39:37 +0000] "PROPFIND / HTTP/1.1" 401 61 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:39:37 +0000] "PROPFIND / HTTP/1.1" 207 230 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:39:37 +0000] "OPTIONS /martin/ HTTP/1.1" 200 0 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:39:42 +0000] "PROPFIND /martin/ HTTP/1.1" 207 384 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:39:43 +0000] "PROPFIND /martin/ HTTP/1.1" 207 756 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:39:43 +0000] "PROPFIND /.well-known/carddav HTTP/1.1" 404 60 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:39:43 +0000] "PROPFIND / HTTP/1.1" 207 230 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:39:43 +0000] "OPTIONS /martin/ HTTP/1.1" 200 0 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:39:48 +0000] "PROPFIND /martin/ HTTP/1.1" 207 384 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:39:48 +0000] "PROPFIND /martin/ HTTP/1.1" 207 756 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
- [08/Nov/2017:20:46:29 +0000] "PROPFIND /martin/f4cda0ec-2f65-8f51-b17f-25bae7eed16e/ HTTP/1.1" 401 61 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:46:29 +0000] "PROPFIND /martin/f4cda0ec-2f65-8f51-b17f-25bae7eed16e/ HTTP/1.1" 207 298 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
- [08/Nov/2017:20:46:29 +0000] "OPTIONS /martin/ HTTP/1.1" 200 0 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
- [08/Nov/2017:20:46:34 +0000] "PROPFIND /martin/ HTTP/1.1" 401 61 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:46:34 +0000] "PROPFIND /martin/ HTTP/1.1" 207 384 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:46:34 +0000] "PROPFIND /martin/ HTTP/1.1" 207 756 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:46:35 +0000] "PROPFIND /martin/f4cda0ec-2f65-8f51-b17f-25bae7eed16e/ HTTP/1.1" 207 298 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:46:35 +0000] "OPTIONS /martin/ HTTP/1.1" 200 0 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:46:40 +0000] "PROPFIND /martin/ HTTP/1.1" 207 384 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"
martin [08/Nov/2017:20:46:40 +0000] "PROPFIND /martin/ HTTP/1.1" 207 756 "-" "Mac OS X/10.13.1 (17B48) AddressBook/1806" "-"

After setting up, the account is shown in radicale but no contacts are shown. f4cda0ec-2f65-8f51-b17f-25bae7eed16e is an addressbook created and synced from another application.

Any ideas what could fix the problem?

martinhoefling avatar Nov 08 '17 20:11 martinhoefling

I had Radicale 0.7 events and contacts set up on my old Mac running 10.5. Everything worked as expected. Radicale was running on Linux over the local network. I sure miss the old thing after using Linux on the desktop.

tmst avatar Nov 11 '17 20:11 tmst

I tried Radicale 2.1.8 with high sierra contacts app.

martinhoefling avatar Nov 11 '17 22:11 martinhoefling

Have you tried getting Radicale to work with any other client besides the contacts app? On Sat, Nov 11, 2017, at 02:05 PM, Martin Hoefling wrote:

I tried Radicale 2.1.8 with high sierra contacts app.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub[1], or mute the thread[2].>

Links:

  1. https://github.com/Kozea/Radicale/issues/740#issuecomment-343697314
  2. https://github.com/notifications/unsubscribe-auth/AAzjDte263Fz1rF9lJupKRoyqKH6mI2mks5s1hopgaJpZM4QSV72

tmst avatar Nov 12 '17 02:11 tmst

No I haven't. I wanted my server software to be open source and to be able to interface with the native mac programs. Contacts are not that important to me. However I was hopeful that the issue would be resolved after some time. Mind you, I'm not trying to insist in any way. If support for Apple's contacts is not desired or too much work for whatever reason, just let me know and I'll be happy.

q6276270 avatar Nov 27 '17 12:11 q6276270

Here, Radicale 2.x on a Linux host behind Apache works like a charm with Apple's Contacts and "Calendar" client. If you really want to get some help from community, please study the logs. If this does not help, come back with more detail information.

return42 avatar Nov 29 '17 07:11 return42

I have the same problem, radicale 2.0.8, here's the log of my reverse proxy.

We need the logging output from Radicale. Start it with the --debug argument.

works like a charm with Apple's Contacts

Does it work without any special configuration?

Unrud avatar Nov 30 '17 19:11 Unrud

I also tried Radicale 2.1.8 with high sierra contacts app and activated debugging. But I can't log in to radicale: Contacts app throws an error - Account/Password could not be verified (in German "Accountname/Passwort konnte nicht überprüft werden") But the contactas app does not ask radicale at all, since there is not entry in the log file. Btw. The calendar app work as expected with radicale on Mac High Sierra.

HaJoSa avatar Dec 13 '17 16:12 HaJoSa

After doing some research on the owncloud forum I found following solution thanks to user calmch on central.owncloud.org:

  • In the Add Account window I choose the "Manual" option;
  • I entered with username and password;
  • In the server address I entered with a complete address in one line, i. e., http://EXAMPLE.COM:MY_SERVER_PORT/USERNAME/ADdRESSBOOK

It seems that there is a bug in MacOS contacts client software, as it cannot compose the correct server link from the separated parameters we give to it. When we write manually the complete server link, as shown above, there is no need to compose the link and the login process succeeds. I hope this solution could be useful to someone.

HaJoSa avatar Dec 13 '17 17:12 HaJoSa

@HaJoSa I tried this some time ago. It was not successful, i.e. I couldn't login or I still couldn't write to the server. I only remember that it didn't solve my problem.

q6276270 avatar Dec 13 '17 17:12 q6276270

@HaJoSa : I guess you are german speaker .. may it helps if you read my (german) article about macOS Contacts & Radicale. http://return42.github.io/handsOn/radicale/dav_client.html#apple-kontakte

return42 avatar Dec 13 '17 17:12 return42

@return42 : Thanks for the link. Before my friend upgraded his Mac to High Sierra I never had problems with the contacts app.

HaJoSa avatar Dec 13 '17 17:12 HaJoSa

@HaJoSa : Does the link help?

Before my friend upgraded his Mac to High Sierra I never had problems with the contacts app.

Ok, I have to say, that I have not tested with "high Sierra". What I have tested was "Sierra" (10.12.6). I have a handfull of old mac's with a remaining period. I don't buy these new macs (IMO crap hardware) and I upgrade mac OS as late as possible. My experience; every time I upgrade mac OS I got new iTunes & Cloud crap and apps like Calender & Contatcs are broken by some means or other .. Mac has had its days .. so sad.

return42 avatar Dec 13 '17 17:12 return42

@return42 : your link is very helpfull. I do not own a Mac myself but I give help to people with Macs ;-) And they want support even on new system updates.

HaJoSa avatar Dec 13 '17 19:12 HaJoSa

but I give help to people with Macs ;-) And they want support even on new system updates.

you got my commiseration :)

If you think I can help you, contact me directly via eMail (my adress is given under the linked page) or leave an issue on https://github.com/return42/handsOn (its all german)

return42 avatar Dec 13 '17 21:12 return42

Thanks @HaJoSa that worked for me logging in on the Contacts desktop app.

I think this issue may be related to the latest High Sierra update? I am running it on 2 Macs with the same behavior. I just recently set up Radicale so I can't compare to previous OS X.

I am unable to write or sync contacts from the desktop Contacts or the iOS app although both will connect and login.

On the desktop Calendar I can read the server but not write to it, and it gets very beachbally when syncing to the Radicale server. The iOS Calendar and Reminders apps both work perfectly. All other CalDAV clients I've tried work perfectly (Fantastical, BusyCal, AgenDAV).

I tried Baikal as well and had the exact same behavior with these clients. Will try a different CardDAV client and see if that works...

oakbrad avatar Dec 27 '17 20:12 oakbrad

@oakbrad Yes I think, High Sierra messed up especially carddav. So searched for some other apps to overcome the problems with the build-in Calendar and Contacts. Now I'm testing successfully BusyCal and BusyContacts on a MacBook with the latest High Sierra OS. There are some problems left on an old iPad running IOS 9. iPhones with IOS 11 work perfectly with calendar and contacts.

HaJoSa avatar Dec 29 '17 16:12 HaJoSa

You are right I tried BusyContacts and was able to import my address book into the server. Now Contacts can read that, but it won't write. The iOS app works perfectly.

Not sure what Apple did here to break things on the desktop, happy to provide logs or more info if devs can point me to where that would be.

oakbrad avatar Dec 29 '17 23:12 oakbrad

To end the never ending story I'll check if BusyCal and BusyContacts will be running on an iMac with HighSierra. If so my friend has to decide buying and using BusyCal & BusyContacts instead of the Apple apps.

HaJoSa avatar Dec 30 '17 11:12 HaJoSa

My friend bought BusyCal and BusyContacts and now his iMac and Macbook both sync fine with Radicale. On his old iPad running IOS 9 he installed BusyCal for IOS and successfully syncronized with Radicale, too. So BusyCal & BusyContacts may be an option for others who have problems with syncing to Radicale.

HaJoSa avatar Jan 18 '18 10:01 HaJoSa

If anyone of you are still having a issue with sync Apple Contacts with HTTP 405 Error (CoreDAVHTTPStatusErrorDomain error 405), I have just resolved it by redirect the traffics from /.well-known/carddav to /radicale/ by nginx or apache or lighttpd.

As stated in another repo issue:

OSX 10.11 tries always to read /.well-known/carddav and stops syncing if this path does not exist. So just add an redirect to your apache/lighttpd or ngnix configuration.

For example, nginx:

location /radicale/ {
  proxy_pass ...
  ...
}

rewrite ^/.well-known/carddav /radicale/ redirect;

skyuplam avatar May 08 '18 19:05 skyuplam

@skyuplam I am still having this issue, and as I am using Radicale on a QNAP, I don't have access to the web server directly. I believe the option to do redirect well-known by default has been removed in #451 and discussed in #126, but at one point is was possible to control this via the config file.

I would be happy to know if there was another way to make macOS Contacts on High Sierra work. I have activated the debug mode in Radicale, but I am unsure how to get useful logs for the client Contacts app. Any help is is welcome.

mxdvl avatar Jun 04 '18 02:06 mxdvl

@mxdvl I don't have a QNAP, but you can do the redirect/routing via any kind of routing capabled application to re-router the traffic, for example, your firewall, like iptables/nftables. Perhaps, you can simply modify the source of Radicale to fit your needs.

skyuplam avatar Jun 04 '18 06:06 skyuplam

I will try to figure out how to do that redirect, but looking at my current setup, it seems that actually, my contacts are syncing, albeit only partially. Only the first address book and its name is not converted into a group name. This seem to suggest that the issue has little to do with the /.well-know/carddav redirect.

screen shot 2018-06-04 at 16 35 45

Looking at the Radicale logs, I can see that the macOS AddressBook is making REPORT requests for the /user/addressbook-1/ but never /user/adressbook-2/. When creating a group using the app, it creates a contact that can only be seen by the macOS app (above called "New Group of Contacts").

I would be more than happy to help debug this and file a bug report towards Apple if the problem lies within the macOS Contacts app.

mxdvl avatar Jun 04 '18 07:06 mxdvl

I just got it to work on my newly installed radicale (on port 5253) and on my High Sierra MacOS. I used "Manual" configuration and gave the server address as "http://192.168.0.36:5253/raj/". (Yes, this is only inside my house for now.) After creating the addressbook using the radicale web interface, this configuration worked to access it on my mac.

However, after also configuring it on my iphone, I don't see entries created on either system syncing to the other. Strange.

The entries actually stored in the radicale DB are the entries from my iphone's version. I don't know where the macos version entries are being stored; perhaps on my mac itself. They aren't on the radicale server.

rajid avatar Jul 27 '18 17:07 rajid

I am having the same issue as rajid, identical setup

AddoSolutions avatar Nov 03 '18 04:11 AddoSolutions

I finally moved to using "calendarserver" under Ubuntu. It seems to work just fine. Of course, you don't have Apple push notifications, but you can't have that with Radicale either. I'm actually going to just try to continue using Apple's server for contacts and calendar. Just move all other services (mail, web, etc.) to the new external server. This means I can still ultimately move to a residential connection, since contacts and calendar can be run on any port.

rajid avatar Nov 03 '18 04:11 rajid

is the issue resolved ?

damionx7 avatar Feb 09 '19 01:02 damionx7

I decided to stick with Apple server for Contacts, at least for now, since it also supports push notifications, on which Apple's clients tend to depend (since they don't have a manual "update" function in most cases).

/raj

On Feb 8, 2019, at 5:09 PM, Rohit <[email protected] mailto:[email protected]> wrote:

is the issue resolved ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Kozea/Radicale/issues/740#issuecomment-461997841, or mute the thread https://github.com/notifications/unsubscribe-auth/AFAlZflSOHMA5Wxl0w-CQMdB34M9L05Qks5vLh_egaJpZM4QSV72.

rajid avatar Feb 09 '19 01:02 rajid

Contacts by default searches on .well-known/caldav rewrite ^/.well-known/carddav /radicale/ redirect; rewrite ^/.well-known/caldav /radicale/ redirect; Use this redirect for nginx

damionx7 avatar Feb 09 '19 09:02 damionx7