nextcloud / nextcloud/server

Unable to save calendar events with resources in them

Open
#58,961 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 32-feedback bug
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce
  1. Have event_update_notification and calendar_resource_management enabled
  2. Try to create an Event with a Resource in it
  3. Unable to save the event
Expected behaviour

The event should be saved correctly

Actual behaviour

The event is not saved

Server configuration

Web server: Nginx

Database: Maria

PHP version: 8.3

Nextcloud version: 32.0.6

List of activated apps
www-data@nextcloud:~/nextcloud$ php occ app:list
Enabled:
  - activity: 5.0.0
  - admin_audit: 1.22.0
  - app_api: 32.0.0
  - bruteforcesettings: 5.0.0
  - calendar: 6.2.1
  - calendar_resource_management: 0.11.0
  - cloud_federation_api: 1.16.0
  - comments: 1.22.0
  - contacts: 8.3.4
  - contactsinteraction: 1.13.1
  - dashboard: 7.12.0
  - dav: 1.34.2
  - deck: 1.16.3
  - drawio: 4.1.4
  - external: 7.0.0
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_accesscontrol: 3.0.2
  - files_automatedtagging: 3.0.3
  - files_downloadlimit: 5.0.0-dev.0
  - files_external: 1.24.1
  - files_pdfviewer: 5.0.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.1
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - flow_notifications: 3.0.0
  - forms: 5.2.5
  - groupfolders: 20.1.12
  - logreader: 5.0.0
  - lookup_server_connector: 1.20.0
  - mail: 5.7.2
  - nextcloud_announcements: 4.0.0
  - notes: 4.13.0
  - notifications: 5.0.0
  - notify_push: 1.3.0
  - oauth2: 1.20.0
  - password_policy: 4.0.0
  - photos: 5.0.0
  - polls: 8.6.3
  - privacy: 4.0.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - qownnotesapi: 26.2.2
  - related_resources: 3.0.0
  - richdocuments: 9.0.3
  - serverinfo: 4.0.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - side_menu: 5.2.1
  - spreed: 22.0.9
  - support: 4.0.0
  - survey_client: 4.0.0
  - systemtags: 1.22.0
  - tables: 1.0.5
  - tasks: 0.17.1
  - text: 6.0.1
  - theming: 2.7.0
  - twofactor_admin: 4.9.0
  - twofactor_backupcodes: 1.21.0
  - twofactor_email: 2.8.5
  - twofactor_totp: 14.0.0
  - twofactor_webauthn: 2.6.0
  - updatenotification: 1.22.0
  - user_ldap: 1.23.0
  - viewer: 5.0.0
  - weather_status: 1.12.0
  - webhook_listeners: 1.3.0
  - welcome: 1.4.0
  - workflowengine: 2.14.0
Disabled:
  - admin_notifications: 1.0.2 (installed 1.0.2)
  - approval: 2.7.1 (installed 2.7.1)
  - checksum: 2.0.3 (installed 2.0.3)
  - circles: 32.0.0 (installed 24.0.0)
  - encryption: 2.20.0 (installed 2.0.0)
  - event_update_notification: 2.8.0 (installed 2.8.0)
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - firstrunwizard: 5.0.0 (installed 2.14.0)
  - integration_documenso: 1.1.2 (installed 1.1.2)
  - recommendations: 5.0.0 (installed 1.4.0)
  - suspicious_login: 10.0.0
  - twofactor_nextcloud_notification: 6.0.0
  - user_status: 1.12.0 (installed 1.4.0)
Nextcloud configuration
www-data@nextcloud:~/nextcloud$  php occ config:list system
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.domain.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nextcloud.domain.de",
        "dbtype": "mysql",
        "version": "32.0.6.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "filelocking.enabled": true,
        "proxy": "domain-proxy:3128",
        "proxyexclude": [
            ".domain.de",
            ".domain.de"
        ],
        "memcache.local": "OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": 0,
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "updater.release.channel": "stable",
        "theme": "",
        "app_install_overwrite": [
            "calendar",
            "admin_notifications",
            "twofactor_rcdevsopenotp",
            "twofactor_yubikey",
            "twofactor_email",
            "rainloop",
            "twofactor_admin",
            "shifts",
            "approval",
            "issuetemplate"
        ],
        "mysql.utf8mb4": true,
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "Mitarbeiter",
            "lokale_NC_user"
        ],
        "twofactor_enforced_excluded_groups": [],
        "encryption.legacy_format_support": false,
        "encryption.key_storage_migrated": false,
        "default_phone_region": "DE",
        "app.mail.verify-tls-peer": false,
        "maintenance_window_start": 2,
        "trashbin_retention_obligation": "auto, 15",
        "htaccess.RewriteBase": "\/",
        "htaccess.IgnoreFrontController": true
    }
}
Browser

Browser name: Firefox

Browser version: 148

Operating system: Windows/Arch

Server log
{"reqId":"aZJyojF3OluVqNDkzlGb","level":3,"time":"2026-03-06T17:35:49+00:00","remoteAddr":"192.168.89.8","user":"0D09054F-D2CA-4F35-8EF4-74B155B69AA6","app":"dav","method":"PUT","url":"/remote.php/dav/calendars/0D09054F-D2CA-4F35-8EF4-74B155B69AA6/personal/012D9BAC-4FE2-4133-B05A-428461620FF3.ics","scriptName":"/remote.php","message":"Error generating activity for a new calendar object: Value provided for affectedUser is not valid","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:148.0) Gecko/20100101 Firefox/148.0","version":"32.0.6.1","exception":{"Exception":"OCP\\Activity\\Exceptions\\InvalidValueException","Message":"Value provided for affectedUser is not valid","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/Activity/Backend.php","line":468,"function":"setAffectedUser","class":"OC\\Activity\\Event","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Listener/ActivityUpdaterListener.php","line":129,"function":"onTouchCalendarObject","class":"OCA\\DAV\\CalDAV\\Activity\\Backend","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":57,"function":"handle","class":"OCA\\DAV\\Listener\\ActivityUpdaterListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":220,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":56,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":67,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":79,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php","line":1417,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/TTransactional.php","line":45,"function":"OCA\\DAV\\CalDAV\\{closure}","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php","line":1356,"function":"atomic","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Calendar.php","line":199,"function":"createCalendarObject","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php","line":526,"function":"createFile","class":"Sabre\\CalDAV\\Calendar","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/Schedule/Plugin.php","line":241,"function":"scheduleLocalDelivery","class":"Sabre\\CalDAV\\Schedule\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"scheduleLocalDelivery","class":"OCA\\DAV\\CalDAV\\Schedule\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php","line":351,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php","line":627,"function":"deliver","class":"Sabre\\CalDAV\\Schedule\\Plugin","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/Schedule/Plugin.php","line":199,"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":760,"function":"validateICalendar","class":"Sabre\\CalDAV\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeCreateFile","class":"Sabre\\CalDAV\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1094,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","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":212,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":426,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":151,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Activity/Event.php","Line":112,"message":"Error generating activity for a new calendar object: Value provided for affectedUser is not valid","exception":{},"CustomMessage":"Error generating activity for a new calendar object: Value provided for affectedUser is not valid"}}

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

Reproduce the event creation with event_update_notification and calendar_resource_management enabled, then inspect apps/dav/lib/CalDAV/Activity/Backend.php around line 468 and apps/dav/lib/Listener/ActivityUpdaterListener.php around line 129. Trace the PUT through CalDavBackend.php and verify that events containing resources are saved without the affectedUser exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.