NextCloud / MacOS / CalDav / Woes

Nextcloud version: 13.0.5
Operating system: Shared Hosting (Debian)
Apache version: Apache/2.4.25 (Debian)
PHP version: 7.2.5

The issue you are facing:

Internet accounts preference pane claims it is Unable to verify account or password.

I have Little Snitch and when I want to add the account, it warns me twice that there is an outbound connection to my server. The URL seems weird…


Is this the first time you’ve seen this error?: No.

Steps to replicate it:

  1. Trying to connect my NC calendar to my MacOS calendar.
  2. Copy Paste the iOS/OS X CalDav address
  3. Click “Sign In”.

The output of your Nextcloud log in Admin > Logging:
No logs created...

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' => 
  array (
    0 => 'cloud.mydomain.com',
  ),
  'datadirectory' => '/domains/mydomain.com/cloud/data',
  'overwrite.cli.url' => 'http://cloud.mydomain.com',
  'dbtype' => 'mysql',
  'version' => '13.0.5.2',
  'dbname' => 'mydomain_com_cloud',
  'dbhost' => 'mydomain20.sql.hoster.net',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'USER',
  'dbpassword' => 'PASSWORD',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'updater.secret' => '$xxxxx',
);

The output of your Apache/nginx/system log in /var/log/____:
Do not have this.

All other Nextcloud functionality works fine and I am also able to add calendars to my Android phone.

These _caldavs._tcp* domains seem to be some default subdomain mac uses to load the configuration:
https://wiki.wocommunity.org/display/~probert/CalDAV+and+CardDAV+handshake

1 Like

First check if service discovery is working:

Then have a look at the table with the bruteforce attempts in the database and delete all entries there.

Then add the caldav account to your Mac following this description:

1 Like

I get redirected to https://example.xyz/remote.php/dav
Then my browser asks me for login credentials
Then it says: “This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client.”

I removed all.

No luck…

@Bernie_O Do you have any more ideas?

Unfortunately not.
Well, actually…

Have you tried the same with Little Snitch disabled?

Yes. No change in result…

https://cloud.MYDOMAIN.com/remote.php/dav/principals/users/USERNAME/

This is setup at a managed hosting provider and I use Let’s Encrypt. So yes, port is 443 and no, not self-signed.

I hope that helps!

What I do when I have a persistent account problem with macOS:

  • delete account, make sure it’s completely gone (in program settings and global settings)
  • restart Mac (complete restart, logging off and on again is not sufficient)
  • create account in global internet accounts settings (in CardDAV case, using “automatic”)

I remember a case where I deleted all internet accounts to make one of them work again. This seems voodoo and I am not sure what was really the reason for the whole system not working, but hey – it worked…

Good luck.

1 Like

Hey, thnx for asking the extra verification steps.

I use nextcloud on a daily basis on multiple devices; so login works. (In the browser and with apps on both Android, iOS and MacOS)

Also, the calendar already has a task list in it which I use on two Android phones daily Since somewhere in April. So that is also really working.

The only thing that keeps me from migrating all my calendars to my NC, is the sync with my MacBook…

Edit to add: I also got it working on an iPad…

MacOS High Sierra 10.13.6

I have the cert, and set it to be always trusted in any case in the keychain.


Assuming that the proper url is the one given to me by the Calendar app in my NC instance, I still fail in both manual and automatic mode… :cry:

Please note, I tried this both on my Macbook Pro and my Mac Mini; both have the same MacOS as mentioned above. Both use, successfully, the nextcloud app.

Adding CardDav also does not work, by the way…

That is very kind of you. I’ll send you a DM.

@Nextcloud-User you solved it. I need 'Advanced Settings: and add the port number and cut up the url in two input boxes.

Here for reference a screenshot of my working input:

Thanx all in this thread who contributed!

5 Likes

Hi, let me add some other detail.

I faced a problem on macOS 10.14 setting up a CardDAV connection to a Nextcloud 15 instance.

While there’s no problem for CalDAV using an URL, I had to be a little more careful regarding the Server Address format for CardDAV:

Make sure to provide only a host name, e.g. nextcloud.example.com instead of an URL (https://nextcloud.example.com/) in the Server Address field (using Account Type: Advanced)

That solved it for me.

HTH

1 Like

sigh, this is, once again, not working for me…

Here we are, two years onward. CalDav is much older already.
And Nextcloud gives the wrong URL and no help to MacOS users and Apple doesn’t give a sh*t about following standards… What a mess…

edit: after a few failed attempts, Nextcloud bans your IP. This is also something to think about… So change IP if you keep running into errors.