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

CalDav and CardDav Sync not possible with iOS (firt report form iOS version 10.3.3) #6192

Closed
GamerBene19 opened this issue Aug 20, 2017 · 19 comments

Comments

@GamerBene19
Copy link

GamerBene19 commented Aug 20, 2017

Steps to reproduce

  1. Make Nextcloud accessible via https://[Server-IP]/nextcloud via an Alias
  2. Setup a fresh Nextcloud install in /var/www/nextcloud
  3. Activate Contacts, Calendar and Tasks App
  4. Try to add Cal- or CardDav Server in iOS Settings as described here

Notes:

  • As described here I made https://[Server-IP]/nextcloud/.well-known/cal|carddav and via an Redirect entry in the Apache Conf also https://[Server-IP]/.well-known/cal|carddav pointing at https://[Server-IP]/nextcloud/remote.php/dav
  • Sync between Nextcloud and Thunderbird (CardBook for Contacts and Lightning for Calendars works just like it should

Expected behaviour

iOS beeing able to find and setup the Cal-/CardDav Server correctly

Besides the fact that it requires manual editing of Cal-/CardDav Settings to get (at least CardDav) working
is this a known problem and is there a fix for it (after searching multiple days I didn´t find a solution)?
And is there a way to get it working without manual editing?

Actual behaviour

iOS displays message that sync via SSL is not possible (SSL enabled and working correctly)
After manual setting up the settings for SSL and the Account URL at least CardDav seems to work somehow, but CalDav doesn´t

Server configuration

Operating system: Rasbian (Debian) Jessie/8

Web server: Apache2

Database: MySQL

PHP version: PHP 5.6.30 (output of php -v)

Nextcloud version: The current stable release (12.0.2)

Updated from an older Nextcloud/ownCloud or fresh install: Fresh install

Where did you install Nextcloud from: As described here from the .tar.bz2 archive

Signing status: No errors have been found.

Signing status No errors have been found.

List of activated apps:

App list

Enabled:

  • activity: 2.5.2
  • bruteforcesettings: 1.0.2
  • calendar: 1.5.3
  • comments: 1.2.0
  • contacts: 1.5.3
  • dav: 1.3.0
  • federatedfilesharing: 1.2.0
  • federation: 1.2.0
  • files: 1.7.2
  • files_pdfviewer: 1.1.1
  • files_sharing: 1.4.0
  • files_texteditor: 2.4.1
  • files_trashbin: 1.2.0
  • files_versions: 1.5.0
  • files_videoplayer: 1.1.0
  • firstrunwizard: 2.1
  • gallery: 17.0.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.0.0
  • nextcloud_announcements: 1.1
  • notifications: 2.0.0
  • oauth2: 1.0.5
  • password_policy: 1.2.2
  • provisioning_api: 1.2.0
  • serverinfo: 1.2.0
  • sharebymail: 1.2.0
  • survey_client: 1.0.0
  • systemtags: 1.2.0
  • tasks: 0.9.5
  • theming: 1.3.0
  • twofactor_backupcodes: 1.1.1
  • updatenotification: 1.2.0
  • workflowengine: 1.2.0
    Disabled:
  • admin_audit
  • encryption
  • files_external
  • user_external
  • user_ldap

Nextcloud configuration:

Config report "instanceid": "ocvf2bnn26s2", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "Server-IP" ], "datadirectory": "\/media\/hdd1\/NextcloudData", "overwrite.cli.url": "https:\/\/Server-IP\/nextcloud", "dbtype": "mysql", "version": "12.0.2.0", "dbname": "nextcloud", "dbhost": "localhost", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "memcache.local": "\\OC\\Memcache\\APCu"

Are you using external storage, if yes which one: None

Are you using encryption: No

Are you using an external user-backend, if yes which one: None

Client configuration

Browser: None, as it is iOS itself acessing the Server.

Operating system: iOS 10.3.3

Logs

Web server error log

Web server error log
  • (Later described as Try 1) When Trying to setup the CardDav Server (using https://[Server-IP]/ as value for Server; as described here )

Client-IP - - [20/Aug/2017:22:03:03 +0200] "PROPFIND /.well-known/carddav HTTP/1.1" 302
2842 "-" "iOS/10.3.3 (14G60) accountsd/1.0"
Client-IP - - [20/Aug/2017:22:03:03 +0200] "PROPFIND /nextcloud/remote.php/dav HTTP/1.1" 401 1868 "-" "iOS/10.3.3 (14G60) accountsd/1.0"
Client-IP - Benedikt Nerb [20/Aug/2017:22:03:03 +0200] "PROPFIND /nextcloud/remote.php/dav HTTP/1.1" 207 2371 "-" "iOS/10.3.3 (14G60) accountsd/1.0"
Client-IP - - [20/Aug/2017:22:03:05 +0200] "PROPFIND / HTTP/1.1" 405 707 "-" "iOS/10.3.3 (14G60) accountsd/1.0"
Client-IP - - [20/Aug/2017:22:03:05 +0200] "PROPFIND /principals/ HTTP/1.1" 405 708 "-" "iOS/10.3.3 (14G60) accountsd/1.0"

  • (Later described as Try 2) After manual editing the SSL and Account URL options and saving (note that this automatically changed the "Server" value to the Account URL (in my case https://[Server-IP]/nextcloud/remote.php/dav/principals/users/Benedikt%20Nerb/) it worked.

Client-IP - - [20/Aug/2017:22:19:35 +0200] "PROPFIND /nextcloud/remote.php/dav/principals/users/Benedikt%20Nerb/ HTTP/1.1" 401 2006 "-" "iOS/10.3.3 (14G60) accountsd/1.0"
Client-IP - Benedikt Nerb [20/Aug/2017:22:19:35 +0200] "PROPFIND /nextcloud/remote.php/dav/principals/users/Benedikt%20Nerb/ HTTP/1.1" 207 2525 "-" "iOS/10.3.3 (14G60) accountsd/1.0"

  • (Later described as Try 3) When Trying to setup the CalDav Server (using https://[Server-IP]/ as value for Server; as described here )

Client-IP - - [20/Aug/2017:22:39:31 +0200] "PROPFIND /nextcloud/remote.php/dav HTTP/1.1" 401 1864 "-" "iOS/10.3.3 (14G60) accountsd/1.0"
Client-IP - Benedikt Nerb [20/Aug/2017:22:39:32 +0200] "PROPFIND /nextcloud/remote.php/dav HTTP/1.1" 207 1823 "-" "iOS/10.3.3 (14G60) accountsd/1.0"
Client-IP - - [20/Aug/2017:22:39:33 +0200] "PROPFIND / HTTP/1.1" 405 707 "-" "iOS/10.3.3 (14G60) accountsd/1.0"
Client-IP - - [20/Aug/2017:22:39:33 +0200] "PROPFIND /principals/ HTTP/1.1" 405 708 "-" "iOS/10.3.3 (14G60) accountsd/1.0"
Client-IP - - [20/Aug/2017:22:39:33 +0200] "PROPFIND /calendar/dav/Benedikt%20Nerb/user/ HTTP/1.1" 405 729 "-" "iOS/10.3.3 (14G60) accountsd/1.0"

  • (Later described as Try 4) After manual editing the SSL and Account URL options and saving (note that this automatically changed the "Server" value to the Account URL (in my case https://[Server-IP]/nextcloud/remote.php/dav/principals/users/Benedikt%20Nerb/) it results in the calendars beeing detected correctly and everthing seems to be fine until the calendars vanish

Client-IP - - [20/Aug/2017:22:59:55 +0200] "PROPFIND /nextcloud/remote.php/dav/calendars/Benedikt%20Nerb/ HTTP/1.1" 401 1320 "-" "iOS/10.3.3 (14G60) dataaccessd/1.0"
Client-IP - Benedikt Nerb [20/Aug/2017:22:59:56 +0200] "REPORT /nextcloud/remote.php/dav/addressbooks/users/Benedikt%20Nerb/contacts_shared_by_Johanna%20Nerb/ HTTP/1.1" 207 1785 "-" "iOS/10.3.3 (14G60) dataaccessd/1.0"
Client-IP - Benedikt Nerb [20/Aug/2017:22:59:56 +0200] "PROPFIND /nextcloud/remote.php/dav/calendars/Benedikt%20Nerb/ HTTP/1.1" 207 17420 "-" "iOS/10.3.3 (14G60) dataaccessd/1.0"
Client-IP - Benedikt Nerb [20/Aug/2017:22:59:58 +0200] "PROPFIND /nextcloud/remote.php/dav/calendars/Benedikt%20Nerb/feiertageoliver-nerb/ HTTP/1.1" 207 1630 "-" "iOS/10.3.3 (14G60) dataaccessd/1.0"
Client-IP - Benedikt Nerb [20/Aug/2017:22:59:59 +0200] "PROPFIND /nextcloud/remote.php/dav/calendars/Benedikt%20Nerb/personal_shared_by_Alexandra%20Nerb/ HTTP/1.1" 207 1645 "-" "iOS/10.3.3 (14G60) dataaccessd/1.0"
Client-IP - Benedikt Nerb [20/Aug/2017:23:00:00 +0200] "PROPFIND /nextcloud/remote.php/dav/calendars/Benedikt%20Nerb/personal/ HTTP/1.1" 207 1618 "-" "iOS/10.3.3 (14G60) dataaccessd/1.0"
Client-IP - Benedikt Nerb [20/Aug/2017:23:00:01 +0200] "PROPFIND /nextcloud/remote.php/dav/calendars/Benedikt%20Nerb/contact_birthdays/ HTTP/1.1" 207 1629 "-" "iOS/10.3.3 (14G60) dataaccessd/1.0"
Client-IP - Benedikt Nerb [20/Aug/2017:23:00:02 +0200] "PROPFIND /nextcloud/remote.php/dav/calendars/Benedikt%20Nerb/erc-heimspiele/ HTTP/1.1" 207 1624 "-" "iOS/10.3.3 (14G60) dataaccessd/1.0"
Client-IP - Benedikt Nerb [20/Aug/2017:23:00:03 +0200] "REPORT /nextcloud/remote.php/dav/calendars/Benedikt%20Nerb/feiertageoliver-nerb/ HTTP/1.1" 207 11016 "-" "iOS/10.3.3 (14G60) dataaccessd/1.0"

I think (quite sure) it´s this request, that ends the (working) sync of calendars

Client-IP - - [20/Aug/2017:23:07:14 +0200] "PROPFIND / HTTP/1.1" 405 707 "-" "iOS/10.3.3 (14G60) dataaccessd/1.0"

After this sync the Account URL in the CalDav Server value got set to https://[Server-IP]/.

Nextcloud log

Nextcloud log

Containing nothing regarding the Problems with iOS

Thanks for any help

@GamerBene19
Copy link
Author

If needed I could also provide extra log files or try some solution approaches, to help solving the issue.

Also, i can confirm that the same error also exists in ownCloud 10.0.2.1. Calendars show up and start sycing just fine before they vanish.

Any possible solution for this issue yet?

@ghost
Copy link

ghost commented Sep 28, 2017

I experienced the exactly the same issue on a Nextcloud 12 server given by a provider (ncloud.zaclys.com) and iOS 11.0.

@ghost
Copy link

ghost commented Sep 29, 2017

After several tries, the server adress https://ncloud.[Server-IP]/remote.php/dav worked but not the one given by the contact app (https://ncloud.[Server-IP]/remote.php/dav/addressbooks/users/[User_ID]/contacts/).
Is this repo the good place to send this issue ? Or should we open an issue in the contact app repo ?

@j-ed
Copy link
Contributor

j-ed commented Sep 29, 2017

@jomuller A good point to start looking for a solution is always to read the manual and/or ask ant G. 😉
There you will find a detailed description how an iOS synchronization need to be setup https://docs.nextcloud.com/server/12/user_manual/pim/sync_ios.html and how you can troubleshoot https://docs.nextcloud.com/server/12/admin_manual/issues/general_troubleshooting.html#troubleshooting-contacts-calendar .
or e.g.
https://wayneoutthere.com/tutorial-nextcloud-owncloud-calendar/

@ghost
Copy link

ghost commented Sep 29, 2017

@j-ed I agree with you (RTFM principle). But I can't figure out why it doesn't work with the given URL in the App. I'm closer to an end-user than a developer, and I was about to give up after several tries, reading docs, forums... but it was my fault if I didn't read the general troubleshooting documentation. Can't it be possible to have only one way to sync that instead of 3 or 4 URL to try (with the risk to loose some users during the process) ?

@j-ed
Copy link
Contributor

j-ed commented Sep 29, 2017

As far as I understood Apple is using a different approach than all others to address CardDAV/CalDAV ressources. I don't know why they're not using the usual address format, maybe the specialists could answer this question.

@GamerBene19
Copy link
Author

Thanks for the answer @j-ed.
And thanks for referring me to the manuals (and the blog entry). But for solving my problem (which btw still exists) I already read and executed the steps described in the manuals and the blog entry.
And if those steps would have solved my problem, this issue wouldn´t exist.
Thanks for commenting anyway (and sorry if the tone was a bit rough; not on purpose)

@GamerBene19
Copy link
Author

GamerBene19 commented Nov 19, 2017

After some troubleshooting this weekend I found, what caused the problem (at least for me).
I started from scratch and began with installing Nextcloud as described here and after setting everything up I discoverd the exact same issue again.

I just found out, that the error was caused by a space (" ") in the username. (My username was like "XY Z")

I added an account named test (for testing obviously) and with no space in the username everthing works just fine (for me).

For me this was the solution for the issue. Idk if anything configured before the reset was related to the problem.

@j-ed
Copy link
Contributor

j-ed commented Nov 19, 2017

@GamerBene19 To understand the problem better, can you please explain where the space has exactly been entered, on your iPhone, as you set-up the Nextcloud account etc.? Has it been entered erroneously or was it part of the original account name?

@GamerBene19
Copy link
Author

GamerBene19 commented Nov 19, 2017

@j-ed The 'old' account name was sth like "XY Z". Created under this name via the admin login of Nexcloud.
It made no problem with no clients exept for this one specific iOS Calendar thing.

@j-ed
Copy link
Contributor

j-ed commented Nov 19, 2017

@GamerBene19 Thank you for the clarification. Just out of curiosity, have you tried to use %20 as a replacement for the space?

@GamerBene19
Copy link
Author

@j-ed In the account url it is replaced automaticly (e.g. in the webserver log given) yes, but for the account name not.
Could be worth a try, if I find time for it.

@GamerBene19
Copy link
Author

A thing to note here is that I updated form iOS 10.3.3 to 11.0.3.
But I don´t think, apple changed anything, since the error also occured wit iOS 11

@kramer65
Copy link

kramer65 commented Apr 16, 2018

I'm still having this issue. I have the latest nextcloud installed using the Snap and letsencrypt for ssl. I tried the suggestions in the instructions, the docs on troubleshooting, and this frustration filled post, but none of that works. I of course tried a zillion variations on it, but that doesn't seem to work either (and I have no space in my username). In that post he talks about the fact that Letsencrypt isn’t support by Apple (why, Apple, why?). So could it be that because I use letsencrypt, and I have a redirect from http to https, that this doesn’t work? If so, how could I disable the redirect from http to https? I checked, but neither apache nor nginx is installed on the server. I guess the snap includes a server, but I have no experience with Snaps so far, so they're kind of a black box for me.

Could anybody help me out on getting this to work or debugging this? All tips are welcome!

ps. I also wrote a post about this on the Nextcloud Forum here

@j-ed
Copy link
Contributor

j-ed commented Apr 17, 2018

@kramer65 I don't have any problems with a Let's Encrypt certificate on an iPhone . You can easily check this by entering https://letsencrypt.org in your browser. If a lock symbol is shown in front of the URL the root certificate has been accepted.
Are you able to login to Nextcloud using the browser on your mobile phone using a https secured connection? Before trying to use CalDAV/CardDAV sync you try to test the simpliest access method first.

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@nextcloud-bot
Copy link
Member

Hey, this issue has been closed because the label stale is set and there were no updates for 14 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@ChildLearningClub
Copy link

ChildLearningClub commented Dec 16, 2018

This issue still exists, I have Nextcloud 14.04 with iOS 12.1.1 if, when setting up your Nextcloud account you create a username with a space, it is not possible to import the CalDav into the iphones calender. Have tried adding %20 between the first and last names enclosing with “” and single’ as well as using a backslash. If the username is a single string of letters or numbers without a space it connects just fine.

@Webbeh
Copy link

Webbeh commented Jun 15, 2020

I have the same issue with NextCloud 18.0.4 and iOS 13.5.1.

Server is SSL-only with Let's Encrypt certificate, phone's time and date are in sync with the server, and there is no white space or any special character in either the username or the URL in any way.

iOS displays "Cannot Connect Using SSL" message, no matter which URL I use.

/.well-known/caldav redirects properly.

Apache logs don't even show any connection attempt from the phone. Using the web browser works fine.

@GamerBene19 GamerBene19 changed the title CalDav and CardDav Sync not possible with iOS (10.3.3) CalDav and CardDav Sync not possible with iOS (firt report form iOS version 10.3.3) Jan 7, 2021
@GamerBene19
Copy link
Author

I don't have the rights to re-open the issue, but just a quick update:

The SD-Card of the RapsberryPi on which the server from the original issue ran on died a few days ago.

I did a fresh install into an LXC on proxmox, and as of today (Nextcloud Version 20.0.4) this issue still exists.

An account called "John Doe" is not able to sync from iOS (tested with 13.5; I'm not using an iPhone anymore, had to pull out my old phone), meanwhile an account called "JohnDoe" is able to sync just fine. (Even the autosetup works now (which it did not on my wonky old install...))

So yeah, this is still an issue as of version 20.0.4.

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

No branches or pull requests

7 participants