Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to save new appointments: InvalidComponentType #5959

Open
bertptrs opened this issue Apr 25, 2024 · 3 comments
Open

Unable to save new appointments: InvalidComponentType #5959

bertptrs opened this issue Apr 25, 2024 · 3 comments
Labels

Comments

@bertptrs
Copy link

bertptrs commented Apr 25, 2024

Steps to reproduce

  1. Open calendar event dialog for new event
  2. Fill out details
  3. Click save

Expected behavior

The event gets saved into my calendar

Actual behaviour

An error message "Failed to save event" is shown. Also errors show up in the logs.

I suspect that this is because it's trying to save the event to a calendar called "watch list", which is not a calendar but a TODO list. The UI shows it as a calendar somehow, and while the prompts (both simple and advanced) show it as going to insert into the "default" calendar, the URLs show that it's going to the watch list.

Calendar app version

4.7.1

CalDAV-clients used

DAVx5, Evolution

Browser

Firefox 125.0.2

Client operating system

Arch Linux, though not that relevant

Server operating system

Ubuntu 22.04

Web server

Nginx

Database engine version

PostgreSQL

PHP engine version

PHP 8.1

Nextcloud version

28.0.5

Updated from an older installed version or fresh install

Updated from an older version

List of activated apps

Enabled:                                                                                                                                                                                                           
  - activity: 2.20.0                                                                                                                                                                                               
  - admin_audit: 1.18.0                                                                                                                                                                                            
  - bruteforcesettings: 2.8.0                                                                                                                                                                                      
  - calendar: 4.7.1                                                                                                                                                                                                
  - circles: 28.0.0                                                                                                                                                                                                
  - cloud_federation_api: 1.11.0                                                                                                                                                                                   
  - comments: 1.18.0                                                                                                                                                                                               
  - contacts: 5.5.3                                                                                                                                                                                                
  - contactsinteraction: 1.9.0                                                                                                                                                                                     
  - dashboard: 7.8.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_automatedtagging: 1.18.0
  - files_pdfviewer: true
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notes: 4.10.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - polls: 7.0.3
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.1
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - tasks: 0.15.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - twofactor_totp: 10.0.0-beta.2
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - encryption: 2.16.0
  - files_external: 1.20.0
  - suspicious_login: 6.0.0
  - user_ldap: 1.19.0

Nextcloud configuration

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.bertptrs.nl"
        ],
        "overwrite.cli.url": "https:\/\/cloud.bertptrs.nl\/",
        "dbtype": "pgsql",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "version": "28.0.5.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "Europe\/Amsterdam",
        "installed": true,
        "mail_smtpmode": "sendmail",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "mail_smtpport": "25",
        "theme": "",
        "loglevel": 2,
        "maintenance": false,
        "htaccess.RewriteBase": "\/",
        "data-fingerprint": "7d87e51f0ff00d07fef0366f6a24be00",
        "updater.release.channel": "stable",
        "mail_sendmailmode": "smtp",
        "trashbin_retention_obligation": "auto,30",
        "versions_retention_obligation": "auto",
        "knowledgebaseenabled": true,
        "remember_login_cookie_lifetime": 1296000,
        "default_phone_region": "nl",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "maintenance_window_start": 1
    }
}

Web server error log

Not entirely sure what to get, this is the request:

cloud.bertptrs.nl 109.38.135.71 - - [25/Apr/2024:21:14:28 +0200] "PUT /remote.php/dav/calendars/bert/watch-list/F5011D88-22EE-4F9B-9B6B-109BB505D444.ics HTTP/2.0" 403 252 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0"

Log file

{"reqId":"1aQFg1RNvWQKEkhkItZF","level":3,"time":"2024-04-25T21:17:49+02:00","remoteAddr":"109.38.135.71","user":"bert","app":"webdav","method":"PUT","url":"/remote.php/dav/calendars/bert/watch-list/B3AB9F30-2DAB-405D-83DE-A19074C18C29.ics","message":"iCalendar objects must at least have a component of type VTODO","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0","version":"28.0.5.1","exception":{"Exception":"Sabre\\CalDAV\\Exception\\InvalidComponentType","Message":"iCalendar objects must at least have a component of type VTODO","Code":0,"Trace":[{"file":"/var/www/cloud.bertptrs.nl/3rdparty/sabre/dav/lib/CalDAV/Plugin.php","line":766,"function":"validateICalendar","class":"Sabre\\CalDAV\\Plugin","type":"->"},{"file":"/var/www/cloud.bertptrs.nl/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeCreateFile","class":"Sabre\\CalDAV\\Plugin","type":"->"},{"file":"/var/www/cloud.bertptrs.nl/3rdparty/sabre/dav/lib/DAV/Server.php","line":1094,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/cloud.bertptrs.nl/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/cloud.bertptrs.nl/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/cloud.bertptrs.nl/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/cloud.bertptrs.nl/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/cloud.bertptrs.nl/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/cloud.bertptrs.nl/apps/dav/lib/Server.php","line":373,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/cloud.bertptrs.nl/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/cloud.bertptrs.nl/remote.php","line":172,"args":["/var/www/cloud.bertptrs.nl/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/cloud.bertptrs.nl/3rdparty/sabre/dav/lib/CalDAV/Plugin.php","Line":840,"message":"iCalendar objects must at least have a component of type VTODO","exception":{},"CustomMessage":"iCalendar objects must at least have a component of type VTODO"}}

Browser log

Request

BEGIN:VCALENDAR
PRODID:-//IDN nextcloud.com//Calendar app 4.7.1//EN
CALSCALE:GREGORIAN
VERSION:2.0
BEGIN:VEVENT
CREATED:20240425T191424Z
DTSTAMP:20240425T191503Z
LAST-MODIFIED:20240425T191503Z
SEQUENCE:2
UID:ffb84552-4795-4247-b55c-5ca2bf888ed9
DTSTART;TZID=Europe/Amsterdam:20240426T110000
DTEND;TZID=Europe/Amsterdam:20240426T120000
STATUS:CONFIRMED
SUMMARY:ING gesprek
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;RELATED=START:-PT10M
END:VALARM
END:VEVENT
BEGIN:VTIMEZONE
TZID:Europe/Amsterdam
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
END:VCALENDAR

Response

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\CalDAV\Exception\InvalidComponentType</s:exception>
  <s:message>iCalendar objects must at least have a component of type VTODO</s:message>
  <cal:supported-calendar-component xmlns:cal="urn:ietf:params:xml:ns:caldav"/>
</d:error>

Additional info

No response

@bertptrs bertptrs added the bug label Apr 25, 2024
@bertptrs
Copy link
Author

Probably related to #5942, though I don't actually have more than one calendar; I have one calendar and a bunch of TODO lists.

@bemyak
Copy link

bemyak commented Apr 28, 2024

I have a similar issue but with an actual calendar, not a task list. It was created with DAVx⁵ with VTODO and VJOURNAL support, and before nextcloud-calendar update, it was working fine.

My instance is hosted by Hetzner, so I can't provide too much detail.

Nextcloud version: 28.0.3
Calendar app version: 4.7.1

@nmsw
Copy link

nmsw commented May 3, 2024

I have the same issue. For me it happens, when I try to add a category to an event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants