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

CardDAV sync does not work #79

Closed
phsc84 opened this issue Apr 9, 2021 · 25 comments
Closed

CardDAV sync does not work #79

phsc84 opened this issue Apr 9, 2021 · 25 comments

Comments

@phsc84
Copy link

phsc84 commented Apr 9, 2021

Describe the bug
CardDAV sync does not work

To Reproduce
Steps to reproduce the behavior:

  1. Enable CardDAV synchronization in settings.
  2. Force synchronization.
  3. Error appears.

Expected behavior
Contacts are synchronised and stored in the database.

Desktop (please complete the following information):
Browser: Google Chrome 89, 64-bit
SnappyMail: 2.5.0-RC1

Additional context
error.log

the-djmaze pushed a commit that referenced this issue Apr 9, 2021
DAV[DATA]: PROPFIND /.well-known/carddav
INFO[NOTICE]: SnappyMail\HTTP\Exception: 301 Moved Permanently
@the-djmaze
Copy link
Owner

the-djmaze commented Apr 9, 2021

It crashes on the redirect

PROPFIND /.well-known/carddav
SnappyMail\HTTP\Exception: 301 Moved Permanently

I've modified the dav client to log where it wants to go.
Currently i've disabled redirects for security reasons and:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3
In response to a request other than GET or HEAD, the user agent MUST NOT
automatically redirect the request unless it can be confirmed by the user

My Synology redirects to https://localhost:8443/ which is wrong anyway.

@phsc84
Copy link
Author

phsc84 commented Apr 9, 2021

It would be great if you could allow that, because I've tried to sync with Nextcloud and Nextcloud shows a warning, if well-known/carddav is not configured.
See here for more details: https://docs.nextcloud.com/server/21/admin_manual/issues/general_troubleshooting.html#service-discovery

the-djmaze pushed a commit that referenced this issue Apr 9, 2021
@the-djmaze
Copy link
Owner

the-djmaze commented Apr 9, 2021

I've set the max redirects to 1 for this case.

This will open a security hole when the redirect goes to a different server that listens for 401 status to login.
Might secure it to prevent location to other host.

the-djmaze pushed a commit that referenced this issue Apr 9, 2021
@the-djmaze
Copy link
Owner

Modified to secure it to same host

@phsc84
Copy link
Author

phsc84 commented Apr 9, 2021

Ok, great! I would be happy to test again (but only in the evening), if you could build an RC2.

@the-djmaze
Copy link
Owner

the-djmaze commented Apr 9, 2021

@phsc84
Copy link
Author

phsc84 commented Apr 9, 2021

Just tested the RC2. Now I get the following error:
[2021-04-09 19:10:34.128][4d975b5f] INFO[NOTICE]: Error: Call to undefined method SnappyMail\HTTP\Exception::getHeader() in /home/httpd/vhosts/url.com/httpdocs/apps/mail2/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/http/exception.php:74

@phsc84
Copy link
Author

phsc84 commented Apr 10, 2021

I've just applied your patch and now get the following error:
[2021-04-10 16:58:45.359][8c2dedb9] INFO[NOTICE]: SnappyMail\HTTP\Exception: 405 Method Not Allowed in /home/httpd/vhosts/url.com/httpdocs/apps/mail2/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php:125

@ervee
Copy link

ervee commented Apr 11, 2021

I'm getting this (on v2.5.0-rc.2 without the patch above):

Logs "grepped" with "dav":

[2021-04-11 14:52:08.421][fb364ba9] REQUEST[NOTE]: [POST] https://mydomain.tld/webmail/snappymail/?/Json/&q[]=/_hrs[...snip...]MZw/
[2021-04-11 14:52:08.428][fb364ba9] DAV[DATA]: DavClient: User: myuseraccount, Url: https://mydomain.tld/cloud/remote.php/dav/addressbooks/users/myuseraccount/contacts/
[2021-04-11 14:52:08.428][fb364ba9] DAV[DATA]: PROPFIND /cloud/remote.php/dav/addressbooks/users/myuseraccount/contacts/
[2021-04-11 14:52:09.008][fb364ba9] PHP[NOTICE]: /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php [line:142, code:2]
[2021-04-11 14:52:09.009][fb364ba9] PHP[NOTICE]: /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php [line:142, code:2]
[2021-04-11 14:52:09.009][fb364ba9] PHP[NOTICE]: Error: simplexml_load_string(): t></d:response><d:response><d:href>/cloud/remote.php/dav/addressbooks/users/myuse
[2021-04-11 14:52:09.010][fb364ba9] PHP[NOTICE]: /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php [line:142, code:2]
[2021-04-11 14:52:09.010][fb364ba9] PHP[NOTICE]: /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php [line:142, code:2]
[2021-04-11 14:52:09.010][fb364ba9] PHP[NOTICE]: /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php [line:142, code:2]
[2021-04-11 14:52:09.011][fb364ba9] PHP[NOTICE]: Error: simplexml_load_string(): t></d:response><d:response><d:href>/cloud/remote.php/dav/addressbooks/users/myuse
[2021-04-11 14:52:09.011][fb364ba9] PHP[NOTICE]: /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php [line:142, code:2]
[2021-04-11 14:52:09.011][fb364ba9] PHP[NOTICE]: /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php [line:142, code:2]
[2021-04-11 14:52:09.012][fb364ba9] PHP[NOTICE]: /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php [line:142, code:2]
[2021-04-11 14:52:09.012][fb364ba9] PHP[NOTICE]: Error: simplexml_load_string(): t></d:response><d:response><d:href>/cloud/remote.php/dav/addressbooks/users/myuse
[2021-04-11 14:52:09.012][fb364ba9] PHP[NOTICE]: /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php [line:142, code:2]
[2021-04-11 14:52:09.013][fb364ba9] INFO[NOTICE]: InvalidArgumentException: The passed data is not valid XML in /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php:145
#0 /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(438): SnappyMail\DAV\Client->propFind('https://mydomai...', Array, 1)
#1 /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(536): RainLoop\Providers\AddressBook\PdoAddressBook->checkContactsPath(Object(SnappyMail\DAV\Client), '/cloud/remote.p...')
#2 /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(602): RainLoop\Providers\AddressBook\PdoAddressBook->getDavClient('https://mydomai...', 'myuseraccount', '*******', '')
[2021-04-11 14:52:09.013][fb364ba9] DAV[DATA]: PROPFIND /.well-known/carddav
[2021-04-11 14:52:09.027][fb364ba9] INFO[NOTICE]: SnappyMail\HTTP\Exception: 404 Not Found in /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php:125
#0 /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(231): SnappyMail\DAV\Client->propFind('https://mydomai...', Array, 1)
#1 /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(253): RainLoop\Providers\AddressBook\PdoAddressBook->detectionPropFind(Object(SnappyMail\DAV\Client), '/.well-known/ca...')
#2 /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(540): RainLoop\Providers\AddressBook\PdoAddressBook->getContactsPaths(Object(SnappyMail\DAV\Client), 'myuseraccount', '*******', '')
#3 /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(602): RainLoop\Providers\AddressBook\PdoAddressBook->getDavClient('https://mydomai...', 'myuseraccount', '*******', '')
[2021-04-11 14:52:09.027][fb364ba9] DAV[DATA]: PROPFIND
#0 /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php(125): SnappyMail\HTTP\Exception->__construct('', 405, Object(SnappyMail\HTTP\Response))
#1 /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(438): SnappyMail\DAV\Client->propFind('https://mydomai...', Array, 1)
#2 /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(586): RainLoop\Providers\AddressBook\PdoAddressBook->checkContactsPath(Object(SnappyMail\DAV\Client), '')
#3 /myinstallpathtosnappymail/snappymail/v/2.5.0-rc.2/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(602): RainLoop\Providers\AddressBook\PdoAddressBook->getDavClient('https://mydomai...', 'myuseraccount', '*******', '')

Also, the "hamburger" icon changes to a line and spins out of its designated area :)

image

[edit] Just applied the patch and logs look pretty much the same, except this changed:

[2021-04-11 15:01:19.082][5183991c] INFO[NOTICE]: SnappyMail\HTTP\Exception: 405 Method Not Allowed in /myinstallpathtosnappymail/snappymail/snappymail/v/2.5.0-rc.2/app/libraries/snappymail/dav/client.php:125

the-djmaze pushed a commit that referenced this issue Apr 12, 2021
@the-djmaze
Copy link
Owner

This is annoying.
405 Method Not Allowed should respond with an Allow header to notify the client which methods are allowed.

PROPFIND is not allowed so i'm clueless what is allowed.

So i've made a change to see if that improves logging.

the-djmaze pushed a commit that referenced this issue Apr 12, 2021
the-djmaze pushed a commit that referenced this issue Apr 12, 2021
the-djmaze pushed a commit that referenced this issue Apr 12, 2021
@the-djmaze
Copy link
Owner

the-djmaze commented Apr 12, 2021

I did a test on https://demo2.nextcloud.com

PROPFIND /remote.php/dav/addressbooks/users/ HTTP/1.1
Host: demo2.nextcloud.com
User-Agent: SnappyMail/1.0
Connection: Close
Depth: 1
Content-Type: application/xml
Authorization: Basic UjM3ZHg5VGVtbzlQY0RjQTpkZW1v
Content-Length: 109

Response is:

HTTP/1.1 405 Method Not Allowed
Allow: OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\MethodNotAllowed</s:exception>
  <s:message>Listing members of this collection is disabled</s:message>
</d:error>

It seems there are bugs in NextCloud because the response is wrong.
It should have been 403 Forbidden or an Allow header without PROPFIND.

So i'm improving error logging for this behaviour

@ervee
Copy link

ervee commented Apr 13, 2021

RC3 logs:

--- FlushLogCache: WriteOnErrorOnly
[2021-04-13 14:53:26.214][69a934c1] INFO[DATA]: [DATE:2021-04-13 UTC][RL:2.5.0-rc.3][PHP:7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6][IP:212.61.12.100][PID:9509][nginx/1.18.0][fpm-fcgi]
[2021-04-13 14:53:26.215][69a934c1] INFO[DATA]: [APC:on][MB:on][PDO:mysql,sqlite][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2]
[2021-04-13 14:53:26.215][69a934c1] REQUEST[NOTE]: [POST] https://mydomain.tld/webmail/snappymail/?/Json/&q[]=/_9bS[...snip..]TAZ/
[2021-04-13 14:53:26.215][69a934c1] JSON[NOTE]: Action: DoContactsSync
[2021-04-13 14:53:26.215][69a934c1] POST[DATA]: {"Action":"ContactsSync","XToken":"0a9be594e61eec623bc2fb0608262272"}
[2021-04-13 14:53:26.219][69a934c1] SQL[DATA]: SELECT value_int FROM rainloop_system WHERE sys_name = ?
[2021-04-13 14:53:26.219][69a934c1] SQL[DATA]: SELECT id_user FROM rainloop_users WHERE rl_email = :rl_email
[2021-04-13 14:53:26.220][69a934c1] DAV[DATA]: DavClient: User: myusername, Url: https://mydomain.tld/cloud/remote.php/dav/addressbooks/users/myusername/contacts/
[2021-04-13 14:53:26.220][69a934c1] DAV[DATA]: PROPFIND /cloud/remote.php/dav/addressbooks/users/myusername/contacts/
[2021-04-13 14:53:26.784][69a934c1] DAV[DATA]: PROPFIND /.well-known/carddav
--- FlushLogCache: Trigger
[2021-04-13 14:53:26.796][69a934c1] INFO[NOTICE]: SnappyMail\HTTP\Exception: 404 Not Found: PROPFIND https://mydomain.tld/.well-known/carddav
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html> in /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/snappymail/dav/client.php:128
Stack trace:
#0 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(231): SnappyMail\DAV\Client->propFind('https://mydomai...', Array, 1)
#1 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(253): RainLoop\Providers\AddressBook\PdoAddressBook->detectionPropFind(Object(SnappyMail\DAV\Client), '/.well-known/ca...')
#2 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(540): RainLoop\Providers\AddressBook\PdoAddressBook->getContactsPaths(Object(SnappyMail\DAV\Client), 'myusername', '*******', '')
#3 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(602): RainLoop\Providers\AddressBook\PdoAddressBook->getDavClient('https://mydomai...', 'myusername', '*******', '')
#4 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Providers/AddressBook.php(46): RainLoop\Providers\AddressBook\PdoAddressBook->Sync('myemail@address.tld', 'https://mydomai...', 'myusername', '*******')
#5 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Actions/Contacts.php(53): RainLoop\Providers\AddressBook->Sync('myemail@address.tld', 'https://mydomai...', 'myusername', '*******')
#6 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/ServiceActions.php(143): RainLoop\Actions->DoContactsSync()
#7 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Service.php(135): RainLoop\ServiceActions->ServiceJson('')
#8 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Service.php(64): RainLoop\Service->localHandle()
#9 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Service.php(80): RainLoop\Service->__construct()
#10 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/handle.php(47): RainLoop\Service::Handle()
#11 /pathtosnappymail/snappymail/v/2.5.0-rc.3/include.php(242): include('/pathto......')
#12 /pathtosnappymail/index.php(12): include('/pathto......')
#13 {main}
[2021-04-13 14:53:26.797][69a934c1] INFO[DATA]: Array
(
)

[2021-04-13 14:53:26.797][69a934c1] DAV[DATA]: PROPFIND
[2021-04-13 14:53:26.808][69a934c1] INFO[NOTICE]: SnappyMail\HTTP\Exception: 405 Method Not Allowed: PROPFIND https://mydomain.tld
<html>
<head><title>405 Not Allowed</title></head>
<body>
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx</center>
</body>
</html> in /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/snappymail/dav/client.php:128
Stack trace:
#0 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(438): SnappyMail\DAV\Client->propFind('https://mydomai...', Array, 1)
#1 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(586): RainLoop\Providers\AddressBook\PdoAddressBook->checkContactsPath(Object(SnappyMail\DAV\Client), '')
#2 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(602): RainLoop\Providers\AddressBook\PdoAddressBook->getDavClient('https://mydomai...', 'myusername', '*******', '')
#3 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Providers/AddressBook.php(46): RainLoop\Providers\AddressBook\PdoAddressBook->Sync('myemail@address.tld', 'https://mydomai...', 'myusername', '*******')
#4 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Actions/Contacts.php(53): RainLoop\Providers\AddressBook->Sync('myemail@address.tld', 'https://mydomai...', 'myusername', '*******')
#5 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/ServiceActions.php(143): RainLoop\Actions->DoContactsSync()
#6 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Service.php(135): RainLoop\ServiceActions->ServiceJson('')
#7 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Service.php(64): RainLoop\Service->localHandle()
#8 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Service.php(80): RainLoop\Service->__construct()
#9 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/handle.php(47): RainLoop\Service::Handle()
#10 /pathtosnappymail/snappymail/v/2.5.0-rc.3/include.php(242): include('/pathto......')
#11 /pathtosnappymail/index.php(12): include('/pathto......')
#12 {main}
[2021-04-13 14:53:26.809][69a934c1] INFO[NOTICE]: RainLoop\Exceptions\ClientException: ContactsSyncError[140] in /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Actions/Contacts.php:59
Stack trace:
#0 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/ServiceActions.php(143): RainLoop\Actions->DoContactsSync()
#1 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Service.php(135): RainLoop\ServiceActions->ServiceJson('')
#2 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Service.php(64): RainLoop\Service->localHandle()
#3 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/libraries/RainLoop/Service.php(80): RainLoop\Service->__construct()
#4 /pathtosnappymail/snappymail/v/2.5.0-rc.3/app/handle.php(47): RainLoop\Service::Handle()
#5 /pathtosnappymail/snappymail/v/2.5.0-rc.3/include.php(242): include('/pathto......')
#6 /pathtosnappymail/index.php(12): include('/pathto......')
#7 {main}
[2021-04-13 14:53:26.809][69a934c1] JSON[DATA]: {"Action":"ContactsSync","Result":false,"ErrorCode":140,"ErrorMessage":"","ErrorMessageAdditional":"","Time":605}
[2021-04-13 14:53:26.810][69a934c1] INFO[MEMORY]: Memory peak usage: 2MB
[2021-04-13 14:53:26.810][69a934c1] INFO[TIME]: Time delta: 0.60440015792847

the-djmaze pushed a commit that referenced this issue Apr 13, 2021
@the-djmaze
Copy link
Owner

Yes, i've figured it out!

@ervee
Copy link

ervee commented Apr 13, 2021

That's some commit(ment) there. I'll see if I can verify this tonight.

the-djmaze pushed a commit that referenced this issue Apr 13, 2021
@the-djmaze
Copy link
Owner

the-djmaze commented Apr 13, 2021

Copy/merge my code with other people code somehow opened a lot of bugs.
Mine, theirs and others.

Found RainLoop, NextCloud, Synology and mine, so i hope most are solved!

RainLoop#2089

@phsc84
Copy link
Author

phsc84 commented Apr 14, 2021

Much appreciate your work!
As soon as you release a new RC, I'm happy to test again.

@ervee
Copy link

ervee commented Apr 14, 2021

I pulled the 2 changed file and the new file from your commit above and i though it worked again. No error. But when I now open my contacts there are none (zero, nothing, null) contacts anymore. There are still in my CardDAV thank god :)

Just to be sure, I also checked the commit at RainLoop#2089 but those changes seem to have moved to the new CardDAV.php so I kept the PdoAddressBook.php from the commit above.

the-djmaze pushed a commit that referenced this issue Apr 14, 2021
@the-djmaze
Copy link
Owner

the-djmaze commented Apr 14, 2021

@ervee i know 😢
I've removed RainLoop#2089 because the problem i missed there was that he uses array_change_key_case()
XML != HTML so you should never lowercase XML.

So again i made changes to remove array_change_key_case() and fix the code again.

And moved back registerXPathNamespace() because it has issues with default namespace on Synology.
Now i properly get a .vcf file from Synology CardDAV.

@phsc84
Copy link
Author

phsc84 commented Apr 14, 2021

carddav.log
This is the most recent log. It still does not work...

the-djmaze pushed a commit that referenced this issue Apr 15, 2021
@the-djmaze
Copy link
Owner

the-djmaze commented Apr 15, 2021

@phsc84
401 Unauthorized: PROPFIND https://.../apps/cloud/remote.php/dav/addressbooks/users/user/Kontakte/
Are you sure the username and password are correct?

I've also noticed an issue in AddressBook where it was looking for \class_exists('Sabre\DAV\Client') while it should not.
Try again with:
snappymail-2.5.0-rc.4.tar.gz

I get:

Logger->Write('DavClient: User: Xx392R6wSg9aE49A, Url: https://demo2.nextcloud.com/remote.php/dav/addressbooks/users/Xx392R6wSg9aE49A/contacts/', '0', 'DAV');
Logger->Write('PROPFIND /remote.php/dav/addressbooks/users/Xx392R6wSg9aE49A/contacts/', '0', 'DAV');
Logger->Write('PROPFIND /remote.php/dav/addressbooks/users/Xx392R6wSg9aE49A/contacts/', '0', 'DAV');
Array
(
    [EEEBF44B-6779-4A9A-B39D-F2998380B10E] => Array
        (
            [deleted] => 
            [uid] => EEEBF44B-6779-4A9A-B39D-F2998380B10E
            [vcf] => EEEBF44B-6779-4A9A-B39D-F2998380B10E.vcf
            [etag] => d1b1e250e10dc548c31402ee8ab33b0f
            [lastmodified] => Thu, 15 Apr 2021 13:09:02 GMT
            [changed] => 1618492142
            [changed_] => 2021-04-15T13:09:02+00:00
        )

)
Logger->Write('DavClient: User: the-djmaze, Url: http://synology:8008/addressbooks/users/the-djmaze/addressbook/', '0', 'DAV');
Logger->Write('PROPFIND /addressbooks/users/djmaze/addressbook/', '0', 'DAV');
Logger->Write('PROPFIND /addressbooks/users/djmaze/addressbook/', '0', 'DAV');
Array
(
    [c4153cae-7eb9-4a7f-82b3-3c09c4b1609f] => Array
        (
            [deleted] => 
            [uid] => c4153cae-7eb9-4a7f-82b3-3c09c4b1609f
            [vcf] => c4153cae-7eb9-4a7f-82b3-3c09c4b1609f.vcf
            [etag] => 4594bd00bc653cfd8c8dd03e529332c9
            [lastmodified] => Mon, 05 Apr 2021 13:45:41 GMT
            [changed] => 0
            [changed_] => 1970-01-01T00:00:00+00:00
        )

)

the-djmaze pushed a commit that referenced this issue Apr 15, 2021
the-djmaze pushed a commit that referenced this issue Apr 15, 2021
@phsc84
Copy link
Author

phsc84 commented Apr 15, 2021

Next try with RC4.
carddav_2021-04-15.log

@phsc84
Copy link
Author

phsc84 commented Apr 15, 2021

Btw. the hamburger icon is still a little bit strange. Could you add the same spinner as here?
image

@phsc84
Copy link
Author

phsc84 commented Apr 18, 2021

I've applied your latest 2 commits manually. Now the synchronization does not interrupt anymore. But it still does not work (see log and screenshot).
carddav_2021-04-18.log
carddav_2021-04-18

the-djmaze pushed a commit that referenced this issue Apr 19, 2021
@the-djmaze
Copy link
Owner

the-djmaze commented Apr 19, 2021

Tested and now fully working on demo1.nextcloud.com

@phsc84
Copy link
Author

phsc84 commented Apr 19, 2021

Again, I've applied your patches manually (I do not know, how to build a release).

Now it works like a charm! The spinner is also beautiful!
Congratulations!

@phsc84 phsc84 closed this as completed Apr 19, 2021
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

3 participants