Z-Hub / Z-Push

Home of Z-Push
https://z-push.org
GNU Affero General Public License v3.0
97 stars 47 forks source link

Can not sync calendar on Android 10 #34

Closed jinhill closed 6 months ago

jinhill commented 1 year ago

Server ver: nginx+php8.2+z-push2.7.1 My caldav backend is Synology DSM7.1.1 calendar, my phone is Android 10. After adding an exchange account to my phone's calendar, no any error log. However, there is no account just added in the calendar, and the calendar cannot be synchronized to my phone. config.php define('BACKEND_PROVIDER', 'BackendCalDAV'); backend/caldav/config.php

// Server protocol: http or https
define('CALDAV_PROTOCOL', 'https');

// Server name
define('CALDAV_SERVER', 'mynas.com');

// Server port
define('CALDAV_PORT', '5001');

// Base URL to principals calendar collection: use '%l' for local part or '%u' for full username
define('CALDAV_PATH', '/caldav/%u/');

// Default CalDAV folder (calendar folder/principal). This will be marked as the default calendar in the mobile
define('CALDAV_PERSONAL', 'PRINCIPAL');

// If the CalDAV server supports the sync-collection operation
// DAViCal, SOGo and SabreDav support it
// SabreDav version must be at least 1.9.0, otherwise set this to false
// Setting this to false will work with most servers, but it will be slower
define('CALDAV_SUPPORTS_SYNC', false);

// Maximum period to sync.
// Some servers don't support more than 10 years so you will need to change this
define('CALDAV_MAX_SYNC_PERIOD', 2147483647);
matidau commented 1 year ago

Hi,

Can you check the autodiscover-error.log and autodiscover.log logs?

Cheers, Mat

jinhill commented 1 year ago

Thank you for your reply! I did not configure Autodiscover, and I used manual configuration of the exchange account. autodiscover-error.log and autodiscover.log are empty. /var/log/nginx -rw-r----- 1 nginx adm 4527 Nov 14 22:09 z-push-access.log -rw-r--r-- 1 nginx nginx 0 Jul 16 18:51 z-push-autodiscover-access.log -rw-r--r-- 1 nginx nginx 0 Jul 16 18:51 z-push-autodiscover-error.log -rw-r----- 1 nginx adm 0 Nov 13 22:11 z-push-error.log /var/log/z-push -rw-r--r-- 1 nginx nginx 0 Nov 14 22:06 z-push-error.log -rw-r--r-- 1 nginx nginx 199154 Nov 14 22:09 z-push.log z-push.log

matidau commented 1 year ago

Thanks for the log. Your caldav settings are working and Z-Push is talking with it.

There are a few loop detections firing, this came up for people with large mailboxes or a large number of contacts and calendar items, and after some time letting the device to sync it would sort itself out.

Perhaps if you could create another calendar user, place 1 or two items in it, and test with that on the same device.

Cheers, Mat

jinhill commented 1 year ago

@matidau I have replaced a new user and created two records. However, I still cannot synchronize the calendar and there are no error logs, but z-push.log has been outputting many logs in a loop. z-push.log

matidau commented 1 year ago

Hi @jinhill To my eyes that looks like it is working and it has passed the items to the phone. What Calendar App are you using on the phone?

jinhill commented 1 year ago

Hi @matidau My Calendar App is default calendar app of android 10 os, not third-party app. And the calendar sync sometimes reports exceptions. caldav-error

matidau commented 1 year ago

Is there any further info in those messages on the device?

I'm hoping to get a more detailed error of what it doesn't like.

You may be able to use Thunderbird with the TbSync extension, to get more information. I found this quite valuable for calendar and contact debugging earlier this year.

matidau commented 6 months ago

Going to close this off, feel free to comment if you are able to provide more information.