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 synchronization error #4

Closed
phsc84 opened this issue Aug 23, 2020 · 12 comments
Closed

CardDAV synchronization error #4

phsc84 opened this issue Aug 23, 2020 · 12 comments

Comments

@phsc84
Copy link

phsc84 commented Aug 23, 2020

RainLoop version, browser, OS:
the-djmaze4, Chrome, Windows 10

Expected behavior and actual behavior:
Rainloop should get all the contacts from the CardDAV server (Nextcloud 18.0.7).

Steps to reproduce the problem:
Click on Synchronization (CardDAV)
image

Logs or screenshots:
[12:03:27.573][7186fcd4] AJAX[NOTE]: Action: DoContactsSync
[12:03:27.573][7186fcd4] POST[DATA]: {"Action":"ContactsSync","XToken":"bdf3cef0a5c3974daaa3fbc0a30c5d35"}
[12:03:27.578][7186fcd4] SQL[DATA]: SELECT value_int FROM rainloop_system WHERE sys_name = ?
[12:03:27.578][7186fcd4] SQL[DATA]: SELECT id_user FROM rainloop_users WHERE rl_email = :rl_email
[12:03:27.581][7186fcd4] DAV[DATA]: DavClient: User: user, Url: https://www.url.com/apps/cloud/remote.php/dav/principals/users/user/
[12:03:27.581][7186fcd4] DAV[DATA]: PROPFIND /apps/cloud/remote.php/dav/principals/users/user/
[12:03:30.357][7186fcd4] DAV[DATA]: PROPFIND /.well-known/carddav
[12:03:30.365][7186fcd4] INFO[NOTICE]: SabreForRainLoop\DAV\Exception: [CURL] Error while making request: (error code: 3) in /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/SabreForRainLoop/DAV/Client.php:421
Stack trace:
#0 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/SabreForRainLoop/DAV/Client.php(178): SabreForRainLoop\DAV\Client->request('PROPFIND', 'https://www.url...', '<?xml version="...', Array)
#1 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(230): SabreForRainLoop\DAV\Client->propFind('/.well-known/ca...', Array, 1)
#2 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(257): RainLoop\Providers\AddressBook\PdoAddressBook->detectionPropFind(Object(SabreForRainLoop\DAV\Client), '/.well-known/ca...')
#3 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(554): RainLoop\Providers\AddressBook\PdoAddressBook->getContactsPaths(Object(SabreForRainLoop\DAV\Client), 'user', '', '')
#4 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(625): RainLoop\Providers\AddressBook\PdoAddressBook->getDavClient('https://www.url...', 'user', '
', '')
#5 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Providers/AddressBook.php(46): RainLoop\Providers\AddressBook\PdoAddressBook->Sync('[email protected]...', 'https://www.url...', 'user', '')
#6 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Actions.php(5672): RainLoop\Providers\AddressBook->Sync('[email protected]...', 'https://www.url...', 'user', '
')
#7 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/ServiceActions.php(133): RainLoop\Actions->DoContactsSync()
#8 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Service.php(129): RainLoop\ServiceActions->ServiceAjax('')
#9 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Service.php(59): RainLoop\Service->localHandle()
#10 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Service.php(75): RainLoop\Service->__construct()
#11 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/handle.php(67): RainLoop\Service::Handle()
#12 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/include.php(229): include('/home/httpd/vho...')
#13 /home/httpd/vhosts/url.com/httpdocs/apps/mail/index.php(13): include('/home/httpd/vho...')
#14 {main}
[12:03:30.366][7186fcd4] INFO[NOTICE]: TypeError: Return value of RainLoop\Providers\AddressBook\PdoAddressBook::detectionPropFind() must be of the type bool, null returned in /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php:239
Stack trace:
#0 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(257): RainLoop\Providers\AddressBook\PdoAddressBook->detectionPropFind(Object(SabreForRainLoop\DAV\Client), '/.well-known/ca...')
#1 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(554): RainLoop\Providers\AddressBook\PdoAddressBook->getContactsPaths(Object(SabreForRainLoop\DAV\Client), 'user', '', '')
#2 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php(625): RainLoop\Providers\AddressBook\PdoAddressBook->getDavClient('https://www.url...', 'user', '
', '')
#3 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Providers/AddressBook.php(46): RainLoop\Providers\AddressBook\PdoAddressBook->Sync('[email protected]...', 'https://www.url...', 'user', '')
#4 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Actions.php(5672): RainLoop\Providers\AddressBook->Sync('[email protected]...', 'https://www.url...', 'user', '
')
#5 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/ServiceActions.php(133): RainLoop\Actions->DoContactsSync()
#6 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Service.php(129): RainLoop\ServiceActions->ServiceAjax('')
#7 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Service.php(59): RainLoop\Service->localHandle()
#8 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/libraries/RainLoop/Service.php(75): RainLoop\Service->__construct()
#9 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/app/handle.php(67): RainLoop\Service::Handle()
#10 /home/httpd/vhosts/url.com/httpdocs/apps/mail/rainloop/v/1.14.0-djmaze4/include.php(229): include('/home/httpd/vho...')
#11 /home/httpd/vhosts/url.com/httpdocs/apps/mail/index.php(13): include('/home/httpd/vho...')
#12 {main}
[12:03:30.366][7186fcd4] AJAX[DATA]: {"Action":"ContactsSync","Result":false,"ErrorCode":999,"ErrorMessage":"0 - Return value of RainLoop\Providers\AddressBook\PdoAddressBook::detectionPropFind() must be of the type bool, null returned","ErrorMessageAdditional":"","Time":2877}

@phsc84
Copy link
Author

phsc84 commented Aug 23, 2020

Please note, that I did a fresh installation of rainloop-djmaze4. I also noticed, that the djmaze4 version does not store anything in the database. I setup a MariaDB database. The connection to the database is fine (although I had to choose PostgreSQL, because MySQL is greyed out), but no contacts are stored.

@the-djmaze
Copy link
Owner

Curl error code 3 means a malformed url, so i've modified the code a bit to log the url in the error.
aea3389

This way we can trace the issue better.

@phsc84
Copy link
Author

phsc84 commented Sep 22, 2020

Unfortunately it still does not work with the djmaze7 version (see attached log file). Logging and debug mode are both enabled.
log_carddav.txt

@phsc84
Copy link
Author

phsc84 commented Sep 23, 2020

Unfortunately this is still not resolved.
log_carddav-djmaze8.txt

@phsc84
Copy link
Author

phsc84 commented Sep 24, 2020

@the-djmaze
I don't want to stress you, but in my opinion this is quite an important issue. Unfortunately I cannot reopen it.
Btw: I extremely appreciate your work! Your SnappyMail is a big step forward compared to the original Rainloop. It is really "snappy" and much more future proof!

@the-djmaze the-djmaze reopened this Sep 24, 2020
the-djmaze pushed a commit that referenced this issue Sep 24, 2020
@the-djmaze
Copy link
Owner

Thanks for tracking. It seems RainLoop had more PHP 7 incompatible bugs in the code.
I've walked through all AddressBook files and hopefully found them all now.

@phsc84
Copy link
Author

phsc84 commented Sep 24, 2020

Thanks! I will test it again later and give you feedback.

@phsc84
Copy link
Author

phsc84 commented Sep 24, 2020

Could it make sense to upgrade the sabre-io/dav library?
https://github.com/sabre-io/dav/releases

At least the current versions used by Rainloop are quite old dinosaurs:
https://github.com/the-djmaze/snappymail/tree/master/rainloop/v/0.0.0/app/libraries/SabreForRainLoop

the-djmaze pushed a commit that referenced this issue Sep 24, 2020
I need a coffee break.
@the-djmaze
Copy link
Owner

Upgrad Sabre might be possible. RainLoop did modify the original so i need to find the original diff for his changes.

@phsc84
Copy link
Author

phsc84 commented Sep 26, 2020

I applied your patch to my installation, but unfortunately I still get an error (see attached log file).
log_carddav2.txt

@the-djmaze
Copy link
Owner

According to your log, you are missing parts of the required changes.
Will make a new pre-release so you can test again ;)

@phsc84
Copy link
Author

phsc84 commented Sep 26, 2020

With SnappyMail 2.0.0-rc1 CardDAV works perfectly with the default SQLite database! Many thanks, this is so great! 👍

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

2 participants