nextcloud / nextcloud/server

[Bug]: Error saving calendar event after participant removal

Open
#50,313 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

30-feedback bug feature: caldav
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

After removing participant from calendar event using calendar web UI , saving event throws errors in UI and generated error messages in log like

2025-01-22 13:33:45 [...] {"reqId":"1737549225338589988","level":3,"time":"2025-01-22T12:33:45+00:00","remoteAddr":"[...]","user":"redacted","app":"PHP","method":"PUT","url":"/remote.php/dav/calendars/redacted/personal/E3F4E3A5-84F5-4189-81FB-4B712FDA36D4.ics","message":"Undefined array key \"master\" at /var/www/nextcloud/apps/dav/lib/CalDAV/TipBroker.php#104","userAgent":""[...]Firefox[...]","version":"30.0.5.1","data":{"app":"PHP"}}

2025-01-22 13:33:45 [...] {"reqId":"1737549225338589988","level":3,"time":"2025-01-22T12:33:45+00:00","remoteAddr":"[...]","user":"redacted","app":"webdav","method":"PUT","url":"/remote.php/dav/calendars/redacted/personal/E3F4E3A5-84F5-4189-81FB-4B712FDA36D4.ics","message":"{\"Exception\":\"Error\",\"Message\":\"__clone method called on non-object\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/3rdparty/sabre/vobject/lib/ITip/Broker.php\",\"line\":244,\"function\":\"parseEventForOrganizer\",\"class\":\"OCA\\\\DAV\\\\CalDAV\\\\TipBroker\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php\",\"line\":616,\"function\":\"parseEvent\",\"class\":\"Sabre\\\\VObject\\\\ITip\\\\Broker\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/dav/lib/CalDAV/Schedule/Plugin.php\",\"line\":204,\"function\":\"processICalendarChange\",\"class\":\"Sabre\\\\CalDAV\\\\Schedule\\\\Plugin\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php\",\"line\":89,\"function\":\"calendarObjectChange\",\"class\":\"OCA\\\\DAV\\\\CalDAV\\\\Schedule\\\\Plugin\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php\",\"line\":889,\"function\":\"emit\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php\",\"line\":733,\"function\":\"validateICalendar\",\"class\":\"Sabre\\\\CalDAV\\\\Plugin\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php\",\"line\":89,\"function\":\"beforeWriteContent\",\"class\":\"Sabre\\\\CalDAV\\\\Plugin\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":1133,\"function\":\"emit\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php\",\"line\":492,\"function\":\"updateFile\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\",\"args\":[\"*** sensitive parameters replaced ***\"]},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php\",\"line\":89,\"function\":\"httpPut\",\"class\":\"Sabre\\\\DAV\\\\CorePlugin\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":472,\"function\":\"emit\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php\",\"line\":43,\"function\":\"invokeMethod\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/dav/lib/Server.php\",\"line\":371,\"function\":\"start\",\"class\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php\",\"line\":19,\"function\":\"exec\",\"class\":\"OCA\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/remote.php\",\"line\":146,\"args\":[\"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php\"],\"function\":\"require_once\"}],\"File\":\"/var/www/nextcloud/apps/dav/lib/CalDAV/TipBroker.php\",\"Line\":104,\"message\":\"__clone method called on non-object\",\"exception\":{},\"CustomMessage\":\"__clone method called on non-object\"}","userAgent":"[...]Firefox[...]","version":"30.0.5.1"}

Event is not updated in db (participant is not removed after page reload).

NC server and calendar app build from sources:

  • server: stable30 (ad96892cce103b012765d62e12e8554bebd5a4f5)
  • 3rdparty: v30.0.5
  • calendar: stable5.0 (693b2db9a6e342d7ca40032d17d99658d9d37a73)

Same problem in v30.0.4. No such problem in v29.0.2.

Steps to reproduce
  1. In NC 30 web UI create event and add 1 participant other than you. Save an event.
  2. In NC 30 web UI open created event (detailed view) and remove other participant and press button to update event. Alternative: sync event to Thunderbird, remove other participant from event and sync calendar.
  3. See errors in log.
Expected behavior

Event should be saved without errors and no other participant should be present in saved event.

Nextcloud Server version

30

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/dav/lib/CalDAV/TipBroker.php at line 104, then follow the stack trace through sabre/vobject's ITip Broker and CalDAV scheduling plugin. Reproduce the participant-removal update in Nextcloud 30 and verify that the event saves without errors and the participant remains removed after reload.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
54/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.