nextcloud / nextcloud/calendar

Appointments throws internal server error

Open
#4,985 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. to triage bug Feature: Appointments needs info
Dominant language
JavaScript
Stars
1.2k
Forks
332
Avg merge
16h 13m
Merged PRs (30d)
137

Description

Steps to reproduce
  1. Create a new Appointments calendar
  2. Book a slot on this calendar by using the public link
  3. Check the email you used to book the slot with for confirmation link
  4. Click the link.
Expected behavior

Get a confirmation email or have the calendar event actually created.

Actual behaviour

The link in the email results in an Internal Server Error. The event is not added to the calendar and there is a log entry in nextcloud.log with the following content:

{"reqId":"Y@tww0iFaiZ7gYnCeqhzUQAAAAQ","level":3,"time":"2023-02-14T13:30:11+02:00","remoteAddr":"192.168.10.137","user":"--","app":"index","method":"GET","url":"/apps/calendar/appointment/confirm/DSLocQlaGZyxQf9CXUTi4gRn8kJzfsrc","message":"Calendarobject does not exists: sabredav-f80e3a95-40a5-4fbd-af81-702826e47076.ics","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36","version":"25.0.2.3","exception":{"Exception":"InvalidArgumentException","Message":"Calendarobject does not exists: sabredav-f80e3a95-40a5-4fbd-af81-702826e47076.ics","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php","line":2906,"function":"getCalendarObjectId","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php","line":1270,"function":"updateProperties","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Calendar.php","line":199,"function":"createCalendarObject","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php","line":525,"function":"createFile","class":"Sabre\\CalDAV\\Calendar","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/lib/CalDAV/Schedule/Plugin.php","line":177,"function":"scheduleLocalDelivery","class":"Sabre\\CalDAV\\Schedule\\Plugin","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"scheduleLocalDelivery","class":"OCA\\DAV\\CalDAV\\Schedule\\Plugin","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php","line":350,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php","line":627,"function":"deliver","class":"Sabre\\CalDAV\\Schedule\\Plugin","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Schedule/Plugin.php","line":337,"function":"processICalendarChange","class":"Sabre\\CalDAV\\Schedule\\Plugin","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/lib/CalDAV/Schedule/Plugin.php","line":162,"function":"calendarObjectChange","class":"Sabre\\CalDAV\\Schedule\\Plugin","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"calendarObjectChange","class":"OCA\\DAV\\CalDAV\\Schedule\\Plugin","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php","line":897,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php","line":766,"function":"validateICalendar","class":"Sabre\\CalDAV\\Plugin","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeCreateFile","class":"Sabre\\CalDAV\\Plugin","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1094,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/lib/CalDAV/CalendarImpl.php","line":175,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/apps/calendar/lib/Service/Appointments/BookingCalendarWriter.php","line":178,"function":"createFromString","class":"OCA\\DAV\\CalDAV\\CalendarImpl","type":"->"},{"file":"/var/www/html/nextcloud/apps/calendar/lib/Service/Appointments/BookingService.php","line":115,"function":"write","class":"OCA\\Calendar\\Service\\Appointments\\BookingCalendarWriter","type":"->"},{"file":"/var/www/html/nextcloud/apps/calendar/lib/Controller/BookingController.php","line":249,"function":"confirmBooking","class":"OCA\\Calendar\\Service\\Appointments\\BookingService","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"confirmBooking","class":"OCA\\Calendar\\Controller\\BookingController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php","Line":3092,"CustomMessage":"--"}}
Calendar app version

4.2.3

CalDAV-clients used

iOS, Android, Gnome

Browser

Brave Browser Vers 1.48.158 Chromium 110.0.5481.77, Firefox 109.0.1

Client operating system

Ubuntu 22.04

Server operating system

CentOS 8 Stream

Web server

Apache

Database engine version

MariaDB

PHP engine version

PHP 8.0

Nextcloud version

25.0.2

Updated from an older installed version or fresh install

None

List of activated apps
Enabled:
  - activity: 2.17.0
  - admin_audit: 1.15.0
  - announcementcenter: 6.4.0
  - approval: 1.0.12
  - calendar: 4.2.3
  - camerarawpreviews: 0.8.1
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0
  - contacts: 5.1.0
  - contactsinteraction: 1.6.0
  - dashboard: 7.5.0
  - dav: 1.24.0
  - deck: 1.8.3
  - drawio: 2.1.0
  - electronicsignatures: 2.0.3
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_downloadactivity: 1.15.0
  - files_fulltextsearch: 25.0.0
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - firstrunwizard: 2.14.0
  - forms: 3.0.4
  - fulltextsearch: 25.0.0
  - fulltextsearch_elasticsearch: 25.0.0
  - groupfolders: 13.1.1
  - impersonate: 1.11.0
  - integration_github: 1.0.15
  - integration_openproject: 2.2.1
  - integration_twitter: 1.0.3
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - mail: 2.2.2
  - memories: 4.10.3
  - nextcloud_announcements: 1.14.0
  - notes: 4.6.0
  - notifications: 2.13.1
  - oauth2: 1.13.0
  - onlyoffice: 7.6.8
  - password_policy: 1.15.0
  - passwords: 2023.1.13
  - photos: 2.0.1
  - previewgenerator: 5.1.1
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - ransomware_protection: 1.14.0
  - related_resources: 1.0.3
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - spreed: 15.0.3
  - suspicious_login: 4.3.0
  - systemtags: 1.15.0
  - tasks: 0.14.5
  - text: 3.6.0
  - theming: 2.0.1
  - twofactor_backupcodes: 1.14.0
  - updatenotification: 1.15.0
  - user_ldap: 1.15.0
  - user_status: 1.5.0
  - user_usage_report: 1.9.0
  - viewer: 1.9.0
  - weather_status: 1.5.0
  - workflowengine: 2.7.0
Nextcloud configuration
{
    "system": {
        "app.mail.imap.timeout": 25,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.10.6",
            "192.168.10.4",
            "nextcloud.hbps.co.za"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "25.0.2.3",
        "overwrite.cli.url": "http:\/\/nextcloud.hbps.co.za",
        "htaccess.RewriteBase": "\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "3306",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "Africa\/Johannesburg",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "maintenance": false,
        "onlyoffice": {
            "verify_peer_off": true
        },
        "allow_local_remote_servers": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "loglevel": 0,
        "app_install_overwrite": [
            "breezedark",
            "drawio",
            "fulltextsearch",
            "fulltextsearch_elasticsearch",
            "files_fulltextsearch",
            "onlyoffice",
            "groupfolders",
            "ransomware_protection",
            "spreed",
            "rocketchat_nextcloud",
            "passwords",
            "electronicsignatures",
            "impersonate"
        ],
        "default_phone_region": "ISO 3166-2:ZA",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "preview_max_memory": 4096,
        "preview_max_filesize_image": 256,
        "memories.ffmpeg_path": "\/bin\/ffmpeg",
        "memories.ffprobe_path": "\/bin\/ffprobe",
        "memories.transcoder": "\/var\/www\/html\/nextcloud\/apps\/memories\/exiftool-bin\/go-vod-amd64",
        "memories.no_transcode": false,
        "memories.qsv": false
    }
}
Web server error log

No response

Log file

No response

Browser log

No response

Additional info

There are no errors in my Nextcloud Overview page. Am I missing something?

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 appointment flow by creating a calendar, booking through its public link, and opening the confirmation link. Trace the request through apps/calendar/lib/Service/Appointments/BookingController.php, BookingService.php, and BookingCalendarWriter.php, then inspect the reported CalDavBackend.php failure. Done means confirmation no longer returns an internal server error and the calendar event is created.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.