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?

There are few key details missing in your description which can go a long way to resolving your issue.

What is the full URL you’re using, minus your domain particulars of course?

Are you using SSL at the default port of 443?

Are you using a self-signed cert?

Your url should look like this, keeping the use of an alternate SSL port in mind:

https:://example.com/remote.php/dav/principals/users/USERNAME/

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

Ok, at least that was clarified.

When you can, use a web browser to login to the Nextcloud instance. This is double-check the user and password.

Take note of the login URL. Is it similar to what you wrote in your previous response? Or does it have /nextcloud or some other directory name after?

Click on the Calendar icon up top to ensure that at least the web version is working. I mention this step as I’m not sure if you’re using the calendar function without issue on an Android for example.

If Calendar function doesn’t or has the icon available, login as the NC admin and check in Apps for the Calendar app to make sure it’s up to date and enabled.

Once those things are verified, we can proceed to the next step.

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…

From experience helping others, your issue on the MacBook laptop usually boils down to certificate issues, which are oddly handled differently on the iOS side.

In your case, you’re using let’s encrypt. What version of the operating system are you using on your laptop? OSX (Mavericks, Yosemite, etc) or MacOS (Sierra, High Sierra)?

What tends to confuse people troubleshooting such issues is that it will work with the Nextcloud sync client as well as accessing the web page through a browser.

Depending on which version of the operating system you’re using, the MacBook may not have the proper intermediate certificate from let’s encrypt.

Found here: https://letsencrypt.org/certificates

If you’re familiar on how to import certs into the system, import the ones under the “Active” heading.

Once imported…

Remove your Calendar account and re-create it using Manual or Advanced option using the proper URL discussed in previous messages.

Hopefully that takes care of your laptop CalDav issue.

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…

You’ve certainly done your homework, which is great. The downside is that you’ve seemingly run out of avenues in getting it going. I understand your frustration my friend.

If ok with you, create a test account for me and send me a private message with the information so I can run through some additional steps directly, which is certainly much faster.

1 Like

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

You’re very welcome.

Check your Inbox. I was able to connect properly with the MacOS Calendar apps. Hopefully it works for you as outlined in the screenshot.

@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!

7 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.