Skip to content

[Bug]: Calendar federation breaks calendar for recieving party #57162

@TheGreyDiamond

Description

@TheGreyDiamond

⚠️ This issue respects the following points: ⚠️

Bug description

When sharing a calendar from one instance to another using trusted federation, the receiving instance is unable to use the calendar integration. The receiving instance now responds with 500 error codes. Neither the UI nor the CalDAV API works.
CalDav responds with:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>TypeError</s:exception>
  <s:message>A type error occurred. For more details, please refer to the logs, which provide additional context about the type error.</s:message>
</d:error>

Steps to reproduce

  1. Create a calendar on instance A
  2. Add the receiving instance as a trusted federation partner (both instances have to do this)
  3. Federate (share) a calendar to a user on instance B
  4. Now, instance B's user's calendar page loads indefinitely (caused by 500 errors in the backend) and CalDav does not work.

Expected behavior

The calendar (and all the other ones) appear in instance B's user calendar, and CalDav continues to work.

Nextcloud Server version

32

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.4

Web server

Nginx

Database engine version

MariaDB

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

Updated from a MINOR version (ex. 32.0.1 to 32.0.2)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.example.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "32.0.3.2",
        "overwrite.cli.url": "https:\/\/cloud.example.de",
        "overwritehost": "cloud.example.de",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "app_install_overwrite": [
            "admin_notifications",
            "whiteboard",
            "breezedark",
            "bruteforcesettings",
            "twofactor_webauthn",
            "twofactor_admin",
            "talk_matterbridge",
            "ransomware_protection",
            "flow_notifications",
            "apporder",
            "carnet",
            "richdocumentscode",
            "riotchat",
            "quota_warning",
            "appointments",
            "workflow_ocr",
            "gpxpod",
            "twofactor_nextcloud_notification",
            "impersonate",
            "keeweb",
            "camerarawpreviews"
        ],
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 1.5,
            "dbindex": 2
        },
        "maintenance": false,
        "default_phone_region": "DE",
        "theme": "",
        "loglevel": 0,
        "has_rebuilt_cache": true,
        "updater.release.channel": "stable",
        "maintenance_window_start": 1,
        "memories.db.triggers.fcu": true,
        "memories.exiftool": "\/var\/www\/cloud_example_de\/apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.vod.path": "\/var\/www\/cloud_example_de\/apps\/memories\/bin-ext\/go-vod-amd64",
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ],
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe"
    }
}

List of activated Apps

Enabled:
  - activity: 5.0.0-dev.0
  - admin_audit: 1.22.0
  - app_api: 32.0.0
  - apporder: 0.15.0
  - bruteforcesettings: 5.0.0-dev.0
  - calendar: 6.1.2
  - camerarawpreviews: 0.8.8
  - cloud_federation_api: 1.16.0
  - comments: 1.22.0
  - contacts: 8.1.2
  - contactsinteraction: 1.13.1
  - dashboard: 7.12.0
  - dav: 1.34.2
  - deck: 1.16.2
  - drawio: 3.1.2
  - external: 7.0.0
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_antivirus: 6.1.0
  - files_downloadlimit: 5.0.0-dev.0
  - files_external: 1.24.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.1
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - firstrunwizard: 5.0.0-dev.0
  - flow_notifications: 3.0.0
  - gpxpod: 7.2.1
  - groupfolders: 20.1.6
  - imageconverter: 2.1.0
  - impersonate: 3.0.0
  - integration_paperless: 1.0.7
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - memories: 7.7.0
  - nextcloud_announcements: 4.0.0-dev.0
  - notes: 4.12.4
  - notifications: 5.0.0-dev.0
  - oauth2: 1.20.0
  - onlyoffice: 9.11.0
  - password_policy: 4.0.0-dev.0
  - photos: 5.0.0-dev.1
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - quota_warning: 1.22.0
  - recommendations: 5.0.0-dev.0
  - related_resources: 3.0.0-dev.0
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - suspicious_login: 10.0.0-dev.0
  - systemtags: 1.22.0
  - tasks: 0.17.1
  - text: 6.0.1
  - theming: 2.7.0
  - twofactor_admin: 4.9.0
  - twofactor_backupcodes: 1.21.0
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - twofactor_totp: 14.0.0
  - twofactor_webauthn: 2.4.1
  - updatenotification: 1.22.0
  - user_status: 1.12.0
  - viewer: 5.0.0-dev.0
  - weather_status: 1.12.0
  - webhook_listeners: 1.3.0
  - workflowengine: 2.14.0
Disabled:
  - circles: 32.0.0 (installed 26.0.0)
  - encryption: 2.20.0 (installed 2.11.0)
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - forms: 4.3.4 (installed 4.3.4)
  - health: 2.2.2 (installed 2.2.2)
  - richdocuments: 8.5.3 (installed 8.5.3)
  - secrets: 2.1.1 (installed 2.1.1)
  - spreed: 21.1.2 (installed 21.1.2)
  - support: 4.0.0-dev.0 (installed 1.9.0)
  - survey_client: 4.0.0-dev.0 (installed 1.9.0)
  - user_ldap: 1.23.0
  - whiteboard: 1.5.0 (installed 1.5.0)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"IN6oBqR9GC6T21Gl4xiU","level":3,"time":"2025-12-17T23:46:05+00:00","remoteAddr":"XXX.XXX.XXX.XXX","user":"grey","app":"no app in context","method":"PUT","url":"/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json","message":"array_merge(): Argument #2 must be of type array, null given in file '/var/www/cloud_example_de/apps/dav/lib/CalDAV/CalendarProvider.php' line 70","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0","version":"32.0.3.2","exception":{"Exception":"Exception","Message":"array_merge(): Argument #2 must be of type array, null given in file '/var/www/cloud_example_de/apps/dav/lib/CalDAV/CalendarProvider.php' line 70","Code":0,"Trace":[{"file":"/var/www/cloud_example_de/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/cloud_example_de/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/cloud_example_de/ocs/v1.php","line":61,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/cloud_example_de/ocs/v2.php","line":8,"args":["/var/www/cloud_example_de/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/cloud_example_de/lib/private/AppFramework/Http/Dispatcher.php","Line":150,"Previous":{"Exception":"TypeError","Message":"array_merge(): Argument #2 must be of type array, null given","Code":0,"Trace":[{"file":"/var/www/cloud_example_de/apps/dav/lib/CalDAV/CalendarProvider.php","line":70,"function":"array_merge"},{"file":"/var/www/cloud_example_de/lib/private/Calendar/Manager.php","line":189,"function":"getCalendars","class":"OCA\\DAV\\CalDAV\\CalendarProvider","type":"->"},{"function":"OC\\Calendar\\{closure}","class":"OC\\Calendar\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/cloud_example_de/lib/private/Calendar/Manager.php","line":178,"function":"array_map"},{"file":"/var/www/cloud_example_de/apps/dav/lib/CalDAV/Status/StatusService.php","line":152,"function":"getCalendarsForPrincipal","class":"OC\\Calendar\\Manager","type":"->"},{"file":"/var/www/cloud_example_de/apps/dav/lib/CalDAV/Status/StatusService.php","line":56,"function":"getCalendarEvents","class":"OCA\\DAV\\CalDAV\\Status\\StatusService","type":"->"},{"file":"/var/www/cloud_example_de/apps/user_status/lib/Listener/UserLiveStatusListener.php","line":52,"function":"processCalendarStatus","class":"OCA\\DAV\\CalDAV\\Status\\StatusService","type":"->"},{"file":"/var/www/cloud_example_de/lib/private/EventDispatcher/ServiceEventListener.php","line":57,"function":"handle","class":"OCA\\UserStatus\\Listener\\UserLiveStatusListener","type":"->"},{"file":"/var/www/cloud_example_de/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":220,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/cloud_example_de/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":56,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/cloud_example_de/lib/private/EventDispatcher/EventDispatcher.php","line":67,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/cloud_example_de/lib/private/EventDispatcher/EventDispatcher.php","line":79,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/cloud_example_de/apps/user_status/lib/Controller/HeartbeatController.php","line":71,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/cloud_example_de/lib/private/AppFramework/Http/Dispatcher.php","line":204,"function":"heartbeat","class":"OCA\\UserStatus\\Controller\\HeartbeatController","type":"->"},{"file":"/var/www/cloud_example_de/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/cloud_example_de/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/cloud_example_de/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/cloud_example_de/ocs/v1.php","line":61,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/cloud_example_de/ocs/v2.php","line":8,"args":["/var/www/cloud_example_de/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/cloud_example_de/apps/dav/lib/CalDAV/CalendarProvider.php","Line":70},"message":"array_merge(): Argument #2 must be of type array, null given in file '/var/www/cloud_example_de/apps/dav/lib/CalDAV/CalendarProvider.php' line 70","exception":[],"CustomMessage":"array_merge(): Argument #2 must be of type array, null given in file '/var/www/cloud_example_de/apps/dav/lib/CalDAV/CalendarProvider.php' line 70"},"id":"694340c8234c2"}
{"reqId":"oxRghgV654NIKcW5ABVz","level":2,"time":"2025-12-17T23:46:44+00:00","remoteAddr":"XXX.XXX.XXX.XXX","user":"grey","app":"PHP","method":"GET","url":"/ocs/v2.php/apps/user_status/api/v1/user_status?format=json","message":"Undefined array key \"calendars/grey/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" at /var/www/cloud_example_de/apps/dav/lib/CalDAV/CalendarProvider.php#70","userAgent":"Mozilla/5.0 (Windows) mirall/3.17.3 (build 20251009) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"32.0.3.2","clientReqId":"23704d9e-XXXX-XXXX-81f7-fccfcaea5ec6","data":{"app":"PHP"},"id":"694340e75ef7b"}

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap32-feedbackbug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions