Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contacts not working since Mojave #750

Closed
TomHohlefeld opened this issue Oct 19, 2018 · 5 comments
Closed

Contacts not working since Mojave #750

TomHohlefeld opened this issue Oct 19, 2018 · 5 comments

Comments

@TomHohlefeld
Copy link

Hello,

Since Mac OS Mojave/iOS 12 our Calendar + Contacts were not working anymore.

Calendar would not sync on Mojave (10.14) Systems but on older (10.13) systems run just fine.

So the first thing i did was to upgrade from 0.2.7 to 0.4.6.
At first nothing worked, but i could figure out how to make the calendar work on both systems (Mac 10.13 and 10.14)

I read that you have to use SSL to work on iOS 12 devices so i moved the installation from a subdomain to a subdirectory (shared hoster and the subdomains are not included in our SSL-Certificate)

so i configured the Calendar like that
server: „server-address.com”
path: „/baikal/html/dav.php/principals/USERNAME”
checked SSL and used Port 443.
Calendar finally worked.

But if i use a similiar setup for the contacts they wont sync on any Mac (10.13 or 10.14) does not matter. The setup will let me finish. No Error.

In the Web Admin Interface my Contacts are listed.

I can setup the the contacts on my iOS 12 Device with no problems. There i only have to enter
„server-address.com/baikal/html/dav.php”
and it works without problems – all contacts

Someone please help me through this?

@elroxar
Copy link

elroxar commented Nov 5, 2018

Hi @TomHohlefeld this issue might be cause by MacOS requiring a link from yourServer.com/.well-known/carddav to yourServer.com/pathToBaikal/dav.php the same for .well-known/caldav.
This is a known issue described on the official website http://sabre.io/baikal/troubleshooting/

@Tntdruid
Copy link

Tntdruid commented Nov 5, 2018

This worked for me
http://sabre.io/dav/service-discovery/

I use the DNS SRV records

@evert
Copy link
Member

evert commented Apr 27, 2019

I'm closing this ticket because it's been a while since the last comment.

If this is indeed still an issue, feel free to comment here so we can continue discussing.

@evert evert closed this as completed Apr 27, 2019
@ghost
Copy link

ghost commented May 12, 2019

Hi,
got the same problem and applied the mentioned service discovery fixes which got the calendar sync working as for @TomHohlefeld. After some more console digging I found what the CardDAV syncing problem caused for me. My setup is as follows:

  • Baikal 0.5.2 (initially updated from 0.2.X and working fine for all my devices except the Mac) in /var/www/sub.domain.com/
  • Symlink from /var/www/another.domain.com/dav to /var/www/sub.domain.com/html
  • https://another.domain.com/.well-known/caldav and /.well-known/carddav redirects with HTTP 308 to /dav/dav.php using .htaccess

Symptoms:

  • Syncing calendars and contacts works native on iOS 12 natively and using DAVDroid on Android 9 devices
  • Syncing calendars works with Calendar.app on Mac OS 10.14
  • Syncing contacts does not work because of an authentication failure with Contacts.app on the same Mac

I found out that executing a sample request with curl https://another.domain.com/dav/dav.php leads to an response containing a LogicException with the message Requested uri (/dav/dav.php) is out of base uri (/domain.com/dav/dav.php/). Applying the suggested update of Core/Frameworks/Flake/Framework.php by @jmkeil in #330 worked for me. Executing the curl request afterwards brings up the expected NotAuthenticated Exception as the credentials were not provided with the sample request on the command line. It seems that the problem of Contacts.app was caused by the wrongly deducted PROJECT_BASEURI which lead to the LogicException, because after fixing it the synchronization worked fine for all my devices including the Mac.

Hopefully this information helps finding a permanent fix.

@ateamlunchbox
Copy link

ateamlunchbox commented Apr 1, 2022

Thanks @TomHohlefeld and @timdemkowsky for the tips here on Baikal with MacOS 10.14 Mojave. My setup:

Debian 11 (bullseye)
Baikal 0.9.2
Apache2 with:

Redirect 301  /.well-known/carddav /baikal/html/dav.php/ 
Redirect 301  /.well-known/caldav  /baikal/html/dav.php/ 
Redirect 301  /principals          /baikal/html/dav.php/principals

I configured calendar.app with:

Server Address: <host_ip>
Server Path: /baikal/html/dav.php/principals/<username>
Port: <blank>
Use SSL: checked

FWIW, I don't think calendar.app will send credentials unless over https://, so I setup a private cert and added its issuing CA cert as a trusted CA on my MBP (Baikal runs on a local network w/o any connectivity inbound from the public Internet).

I have calendar.app syncing now, but I can't get contacts.app to sync changes after an initial load (at which point all the expected cards showed up in the contacts.app UI). I enabled com.apple.addressbook.carddavplugin debugging as seen here.

Settings in the CardDAV account Advanced setup are:

Server Address: <server_ip>
Server Path: /baikal/html/dav.php/principals/<username>
Port: 443
Use SSL: <checked>

I noticed that when I re-opened the new account in the Accounts view of the contacts.app preferences, the Server Path was empty (and appeared to be using its default value of /principals/user/).

I tried re-setting it to /baikal/html/dav.php/principals/&lt;username&gt; and that value was persisted across multiple restarts of contacts.app, so I'm not sure if that has something to do with the issue.

Anyhow, hopefully this helps future travelers.

UPDATE: I tried restarting my MacBook Pro and then confirmed that my updated Server Path value was persisted. After the reboot, everything seems to be working as I would expect: I can see in the logs that changes made in contacts.app result in a PUT to the Baikal server, and then my Android client can fetch the changes. Also, it appears that after I sync changes made on Android up to Baikal, contacts.app successfully fetches them. Perfect.

I don't know if it matters, but I changed Server Path to /baikal/html/dav.php/principals/ (removed my username from the end). I think the reboot (rather than the edit) made the difference as I had seen all the cards sync over when my username was in the Server Path value, but I'm leaving it at this value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants