Contacts birthday are shown double in calendar

my old contacts with included birthday are shown twice in calendar. the new created contacts are shown right.
problem:

new created user:


shown right:

i have always two calendar events on the phone some idea to solve this.

TIA Micha

for test i try to delete one oft this entrys. But it doesn’t work this is the log from davdroid.

SYNCHRONIZATION INFO
Synchronization phase: 4
Account name: MichaDO
Authority: com.android.calendar

HTTP REQUEST:
PUT /remote.php/caldav/calendars/MichaDO/contact_birthdays/431f1fde-fd75-4b8c-8ba9-0854a31dd49b.ics
If-Match: “b24b014ac8d13a5c8a3b128eb95ae215”

BEGIN:VCALENDAR[CR][LF]
VERSION:2.0[CR][LF]
PRODID:+//IDN bitfire.at//DAVdroid/1.3-ose ical4android ical4j/2.x[CR][LF]
BEGIN:VEVENT[CR][LF]
DTSTAMP:20160921T165428Z[CR][LF]
UID:431f1fde-fd75-4b8c-8ba9-0854a31dd49b[CR][LF]
DTSTART;VALUE=DATE:19550921[CR][LF]
DTEND;VALUE=DATE:19550922[CR][LF]
RRULE:FREQ=YEARLY[CR][LF]
SUMMARY:Monika John’s Birthday (1955)[CR][LF]
STATUS:TENTATIVE[CR][LF]
TRANSP:TRANSPARENT[CR][LF]
ORGANIZER:mailto:MichaDO[CR][LF]
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=OPT-PARTICIPANT;RSVP=TRUE:mailto:MichaDO[CR][LF]
END:VEVENT[CR][LF]
BEGIN:VEVENT[CR][LF]
DTSTAMP:20160921T165428Z[CR][LF]
UID:431f1fde-fd75-4b8c-8ba9-0854a31dd49b[CR][LF]
RECURRENCE-ID;VALUE=DATE:20160921[CR][LF]
SEQUENCE:1[CR][LF]
DTSTART;VALUE=DATE:20160921[CR][LF]
DTEND;VALUE=DATE:20160922[CR][LF]
SUMMARY:xxxxxx Birthday (1955)[CR][LF]
STATUS:CANCELLED[CR][LF]
END:VEVENT[CR][LF]
END:VCALENDAR[CR][LF]

HTTP RESPONSE:
http/1.1 404 Not Found
Cache-Control: no-store, no-cache, must-revalidate
Connection: Keep-Alive
Content-Security-Policy: default-src ‘none’;
Content-Type: application/xml; charset=utf-8
Date: Wed, 21 Sep 2016 16:54:29 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=1, max=999
Pragma: no-cache
Server: Apache/2.4.10 (Debian)
Set-Cookie: oc_username=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; secure; HttpOnly
Set-Cookie: oc_token=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; secure; HttpOnly
Set-Cookie: oc_remember_login=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; secure; HttpOnly
Set-Cookie: oc_username=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; secure; HttpOnly
Set-Cookie: oc_token=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; secure; HttpOnly
Set-Cookie: oc_remember_login=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; secure; HttpOnly
Set-Cookie: oca2cf00c606=7pdgdj92vbeqr30e3oijfbqk32; path=/; secure; HttpOnly
Strict-Transport-Security: max-age=31536000
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: Sameorigin
X-Permitted-Cross-Domain-Policies: none
X-Powered-By: PHP/7.0.1
X-Robots-Tag: none
X-XSS-Protection: 1; mode=block

<?xml version="1.0" encoding="utf-8"?>[LF]

<d:error xmlns:d=“DAV:” xmlns:s=“sabre/dav”>[LF]
<s:sabredav-version>3.0.9</s:sabredav-version>[LF]
<s:exception>Sabre\DAV\Exception\NotFound</s:exception>[LF]
<s:message>Node with name ‘431f1fde-fd75-4b8c-8ba9-0854a31dd49b.ics’ could not be found</s:message>[LF]
</d:error>[LF]

EXCEPTION:
at.bitfire.dav4android.exception.NotFoundException: 404 Not Found
at at.bitfire.dav4android.DavResource.checkStatus(DavResource.java:308)
at at.bitfire.dav4android.DavResource.checkStatus(DavResource.java:289)
at at.bitfire.dav4android.DavResource.put(DavResource.java:200)
at at.bitfire.davdroid.syncadapter.SyncManager.uploadDirty(SyncManager.java:317)
at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.java:147)
at at.bitfire.davdroid.syncadapter.CalendarsSyncAdapterService$SyncAdapter.onPerformSync(CalendarsSyncAdapterService.java:69)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)

SOFTWARE INFORMATION
DAVdroid version: 1.3-ose (114) Sun Sep 04 12:13:01 MESZ 2016
Installed from: org.fdroid.fdroid
JB Workaround installed: no

CONFIGURATION
System-wide synchronization: automatically
Account: MichaDO
Address book sync. interval: 1440 min
Calendar sync. interval: 1440 min
OpenTasks sync. interval: 1440 min
WiFi only: false
[CardDAV] Contact group method: CATEGORIES
RFC 6868 encoding: true
[CalDAV] Time range (past days): 90
Manage calendar colors: true

SQLITE DUMP
android_metadata
| locale |

de_DE
settings
setting

services
| _id | accountName | service | principal |
| 1 | MichaDO | carddav | |
| 2 | MichaDO | caldav | |

sqlite_sequence
| name | seq |
| services | 6 |
| collections | 11 |
| homesets | 8 |

homesets
| _id | serviceID | url |
| 3 | 1 | https://xxxxxxxxxxxxx/remote.php/carddav/addressbooks/MichaDO/ |
| 4 | 2 | https://xxxxxxxxxxxxx/remote.php/caldav/calendars/MichaDO/ |

collections
| _id | serviceID | url | readOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | sync |
| 4 | 1 | https://xxxxxxxxxxx/remote.php/carddav/addressbooks/MichaDO/default/ | 0 | default | | | | | | 1 |
| 5 | 2 | https://xxxxxxxxxxxxxx/remote.php/caldav/calendars/MichaDO/contact_birthdays/ | 0 | Geburtstage Ihrer Kontakte | | -3355444 | | 1 | 0 | 1 |
| 6 | 2 | https://xxxxxxxxxxxxxxxx/remote.php/caldav/calendars/MichaDO/persönlich/ | 0 | micha | | -65536 | | 1 | 1 | 1 |

SYSTEM INFORMATION
Android version: 5.1.1 (cm_amami-userdebug 5.1.1 LMY49J e811031fe1 test-keys)
Device: Sony Xperia Z1 Compact (amami)

this appears in the nextcloud.log

Debug caldav Exception: {“Message”:“HTTP/1.1 404 Node with name ‘431f1fde-fd75-4b8c-8ba9-0854a31dd49b.ics’ could not be found”,“Exception”:“Sabre\DAV\Exception\NotFound”,“Code”:0,“Trace”:“#0 /var/www/virtual/xxxxx/htdocs/3rdparty/sabre/dav/lib/DAVACL/Plugin.php(751): OCA\DAV\Connector\Sabre\DavAclPlugin->checkPrivileges(‘calendars/Micha
’, ‘{DAV:}write-con
’)\n#1 [internal function]: Sabre\DAVACL\Plugin->beforeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#2 /var/www/virtual/xxxxxxxxxxxx/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 /var/www/virtual/xxxxxxxxx/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php(446): Sabre\Event\EventEmitter->emit(‘beforeMethod’, Array)\n#4 /var/www/virtual/xxxxxxx/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#5 /var/www/virtual/xxxxxxxxxxxx/htdocs/apps/dav/appinfo/v1/caldav.php(84): Sabre\DAV\Server->exec()\n#6 /var/www/virtual/web41856.pfweb.eu/mdomann.tk/owncloud/htdocs/remote.php(165): require_once(‘/var/www/virtua
’)\n#7 {main}”,“File”:“/var/www/virtual/web41856.pfweb.eu/mdomann.tk/owncloud/htdocs/apps/dav/lib/Connector/Sabre/DavAclPlugin.php”,“Line”:63,“User”:“MichaDO”}

someone a hint or should i create a issue on github?

Micha

Hey,
Check your local client settings.

On iOS i see from xCloud the “calendar” and “contact birthdays” - both from caldav

Additionally when the phone syncs carddav, the phone itself offers its own “contact birthdays” (generated from the cards)

Having both enabled will show double


as shown in fist post, the birthday is also shown in nextcloud calendar twice.
so it has nothing to do with my clients conf

I have the same issue. I experimented a bit with importing contacts (to export/import contact photos) and now have 4 birthday events for each contact. The cause seems to be that Nextcloud creates a birthday event from the contact upon creation/import and deletes that event upon deletion of the contact. However, if one deletes the ADDRESS BOOK, these events are NOT deleted, resulting in multiple events, most of them stale that cannot be deleted. I opened Bug 1506 for it.

Does executing sync-birthday-calendar with the occ command solve your problems?

./occ dav:sync-birthday-calendar

Edit: https://docs.nextcloud.com/server/10.0/admin_manual/configuration_server/occ_command.html#dav-label

sadly I have no shell access because it is a webhosting package. is there a possibility to execute this over the
nextcloud website?

It is not directly possible to use occ commands without shell access.
A workaround is proposed in in this discussion, starting from this comment:

I have the same problem – even tripple events. I tried to understand, what happens in the code, but I am not familiar with the DAV API. Sync didn’t help, either.

I think there was an issue about this on the owncloud github, I have to search again and than we should move to github with the conversation.

after some tests i can get database access if I use

‘dbhost’ => ‘127.0.0.1’, localhost didn’t work.

so I’m able to run the command

ich@owncloud/htdocs$ ./occ dav:sync-birthday-calendar
Start birthday calendar sync for all users 

2 [============================]

sadly the problem did not solve. I still have to birthday entry’s in calendar.

Mhmm
 Is it possible, that you have multiple contacts for one person?
If not, would you mind opening an issue and describe your problem on GitHub:

for me it is solved with deleting the contact birthday calendar.
and let it create new with ./occ dav:sync-birthday-calendar.

6 Likes

i have the same problem with duplicate contacts birthdays and deleted the contacts birthday calender to get rid of the duplicates. but how do you run ./occ dav:sync-birthday-calendar on a nextcloud box? i can ssh to the box (running 10.0.2) but running the command gives no such file or directory

You need to go to the nextcloud directory in your box and zhen issue the command.

that’s /snap/nextcloud/, right? doesn’t make a difference, with or without using sudo.

I am sorry, I don’t know about the folder structure on a nextcloud bix because I don’t have one. Can’t help any further.

You could use the following command to find out where occ is located:
find / -name occ
May take a while until you see a result though


The Nextcloud Box actually uses the Nextcloud Snap, which has the CLI Utility nextcloud.occ you can call, instead off occ.
See: https://github.com/nextcloud/nextcloud-snap/wiki/Included-CLI-utilities

1 Like

thanks @eppfel!

for future reference to other nextcloud box users:

  1. delete contact birthdays calendar
  2. ssh into your nextcloud box
  3. run sudo nextcloud.occ dav:sync-birthday-calendar
1 Like