Calendar issues (Error 404)

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 18.0.2): 19.0.4
Operating system and version (eg, Ubuntu 20.04): Debian GNU/Linux 10 *
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38 (Debian) *
PHP version (eg, 7.1): 7.4 *

Calendar: 2.0.4

*) I’m using the nextcloud:19.0.4-apache Docker image: https://github.com/nextcloud/docker/blob/5906ddcbe3e25815d73a8386422ce8b2ef31f57b/19.0/apache/Dockerfile

The issue you are facing:

Lately I started to have problems with two of my calendars. Whereas they still work in the calendar apps on my Mac and iPhone, I can’t load them in the web UI. In the developer console the following error is shown:

https://abc.xyz/remote.php/dav/calendars/robert/gemeinsam/ (REPORT) --> 404

Request:

<x1:calendar-query xmlns:x1="urn:ietf:params:xml:ns:caldav"><x0:prop xmlns:x0="DAV:"><x0:getcontenttype/><x0:getetag/><x0:resourcetype/><x0:displayname/><x0:owner/><x0:resourcetype/><x0:sync-token/><x0:current-user-privilege-set/><x0:getcontenttype/><x0:getetag/><x0:resourcetype/><x1:calendar-data/></x0:prop><x1:filter><x1:comp-filter name="VCALENDAR"><x1:comp-filter name="VEVENT"><x1:time-range start="20201115T230000Z" end="20201122T230000Z"/></x1:comp-filter></x1:comp-filter></x1:filter></x1:calendar-query>

Response:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
  <s:message>Calendar object not found</s:message>
</d:error>

In the logs it shows:

{"reqId":"4JHV4EBNCHCrj5ocajq9","level":0,"time":"2020-11-18T17:46:50+00:00","remoteAddr":"10.42.x.x","user":"robert","app":"webdav","method":"REPORT","url":"/remote.php/dav/calendars/robert/gemeinsam/","message":{"Exception":"Sabre\\DAV\\Exception\\NotFound","Message":"Calendar object not found","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":80,"function":"getChild","class":"OCA\\DAV\\CalDAV\\Calendar","type":"->","args":["3a5e2546-be08-4ce2-a9bc-a0fcf3632a39.ics"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":976,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["calendars/robert/gemeinsam/3a5e2546-be08-4ce2-a9bc-a0fcf3632a39.ics"]},{"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["calendars/robert/gemeinsam/3a5e2546-be08-4ce2-a9bc-a0fcf3632a39.ics",["{DAV:}getcontenttype","{DAV:}getetag","{DAV:}resourcetype","{DAV:}displayname","{DAV:}owner","{DAV:}sync-token","{DAV:}current-user-privilege-set","{urn:ietf:params:xml:ns:caldav}calendar-data"],0]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":946,"function":"iterator_to_array","args":[{"__class__":"Generator"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/CalDAV/Plugin.php","line":610,"function":"getPropertiesForPath","class":"Sabre\\DAV\\Server","type":"->","args":["calendars/robert/gemeinsam/3a5e2546-be08-4ce2-a9bc-a0fcf3632a39.ics",["{DAV:}getcontenttype","{DAV:}getetag","{DAV:}resourcetype","{DAV:}displayname","{DAV:}owner","{DAV:}sync-token","{DAV:}current-user-privilege-set","{urn:ietf:params:xml:ns:caldav}calendar-data"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/CalDAV/Plugin.php","line":260,"function":"calendarQueryReport","class":"Sabre\\CalDAV\\Plugin","type":"->","args":[{"properties":["{DAV:}getcontenttype","{DAV:}getetag","{DAV:}resourcetype","{DAV:}displayname","{DAV:}owner","{DAV:}sync-token","{DAV:}current-user-privilege-set","{urn:ietf:params:xml:ns:caldav}calendar-data"],"filters":{"name":"VCALENDAR","is-not-defined":false,"comp-filters":[{"name":"VEVENT","is-not-defined":false,"comp-filters":[],"prop-filters":[],"time-range":{"start":{"__class__":"DateTimeImmutable"},"end":{"__class__":"DateTimeImmutable"}}}],"prop-filters":[],"time-range":false},"expand":null,"contentType":"text/calendar","version":"2.0","__class__":"Sabre\\CalDAV\\Xml\\Request\\CalendarQueryReport"}]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"report","class":"Sabre\\CalDAV\\Plugin","type":"->","args":["{urn:ietf:params:xml:ns:caldav}calendar-query",{"properties":["{DAV:}getcontenttype","{DAV:}getetag","{DAV:}resourcetype","{DAV:}displayname","{DAV:}owner","{DAV:}sync-token","{DAV:}current-user-privilege-set","{urn:ietf:params:xml:ns:caldav}calendar-data"],"filters":{"name":"VCALENDAR","is-not-defined":false,"comp-filters":[{"name":"VEVENT","is-not-defined":false,"comp-filters":[],"prop-filters":[],"time-range":{"start":{"__class__":"DateTimeImmutable"},"end":{"__class__":"DateTimeImmutable"}}}],"prop-filters":[],"time-range":false},"expand":null,"contentType":"text/calendar","version":"2.0","__class__":"Sabre\\CalDAV\\Xml\\Request\\CalendarQueryReport"},"calendars/robert/gemeinsam"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":720,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["report",["{urn:ietf:params:xml:ns:caldav}calendar-query",{"properties":["{DAV:}getcontenttype","{DAV:}getetag","{DAV:}resourcetype","{DAV:}displayname","{DAV:}owner","{DAV:}sync-token","{DAV:}current-user-privilege-set","{urn:ietf:params:xml:ns:caldav}calendar-data"],"filters":{"name":"VCALENDAR","is-not-defined":false,"comp-filters":[{"name":"VEVENT","is-not-defined":false,"comp-filters":[],"prop-filters":[],"time-range":{"start":{"__class__":"DateTimeImmutable"},"end":{"__class__":"DateTimeImmutable"}}}],"prop-filters":[],"time-range":false},"expand":null,"contentType":"text/calendar","version":"2.0","__class__":"Sabre\\CalDAV\\Xml\\Request\\CalendarQueryReport"},"calendars/robert/gemeinsam"]]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpReport","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:REPORT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":320,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":167,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/apps/dav/lib/CalDAV/Calendar.php","Line":287,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:82.0) Gecko/20100101 Firefox/82.0","version":"19.0.4.2"}

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Go to the calendar app and open affected calendar

The output of your Nextcloud log in Admin > Logging:

[webdav] Debug: Sabre\DAV\Exception\NotFound: Calendar object not found at <<closure>>

 0. /var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php line 80
    OCA\DAV\CalDAV\Calendar->getChild("3a5e2546-be08-4 ... s")
 1. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 976
    Sabre\DAV\Tree->getNodeForPath("calendars/rober ... s")
 2. <<closure>>
    Sabre\DAV\Server->getPropertiesIteratorForPath("calendars/rober ... s", ["{DAV:}getconte ... "], 0)
 3. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 946
    iterator_to_array(Generator {})
 4. /var/www/html/3rdparty/sabre/dav/lib/CalDAV/Plugin.php line 610
    Sabre\DAV\Server->getPropertiesForPath("calendars/rober ... s", ["{DAV:}getconte ... "])
 5. /var/www/html/3rdparty/sabre/dav/lib/CalDAV/Plugin.php line 260
    Sabre\CalDAV\Plugin->calendarQueryReport(Sabre\CalDAV\Xml ... "})
 6. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\CalDAV\Plugin->report("{urn:ietf:param ... y", Sabre\CalDAV\Xml ... "}, "calendars/robert/gemeinsam")
 7. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 720
    Sabre\DAV\Server->emit("report", ["{urn:ietf:para ... "])
 8. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpReport(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
 9. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 474
    Sabre\DAV\Server->emit("method:REPORT", [Sabre\HTTP\Requ ... }])
10. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 251
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
11. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 319
    Sabre\DAV\Server->start()
12. /var/www/html/apps/dav/lib/Server.php line 320
    Sabre\DAV\Server->exec()
13. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
14. /var/www/html/remote.php line 167
    require_once("/var/www/html/a ... p")

REPORT /remote.php/dav/calendars/robert/gemeinsam/
from 10.42.x.x by robert at 2020-11-18T17:58:29+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'abc.xyz',
  ),
  'trusted_proxies' =>
  array (
    0 => '192.168.1.200',
  ),
  'datadirectory' => '/mnt/volume1/oc_data/',
  'overwrite.cli.url' => 'https://abc.xyz',
  'dbtype' => 'pgsql',
  'version' => '19.0.4.2',
  'dbname' => 'nextcloud',
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'dbhost' => 'postgres',
  'dbtableprefix' => 'oc_',
  'logtimezone' => 'UTC',
  'log_type' => 'file',
  'logfile' => 'log/nextcloud.log',
  'log_rotate_size' => 104857600,
  'installed' => true,
  'filelocking.enabled' => true,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'xxx',
  'mail_domain' => 'xxx.at',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'mail.xxx.at',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'xxx',
  'mail_smtppassword' => 'xxx',
  'mail_smtpsecure' => 'ssl',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'updater.release.channel' => 'stable',
  'theme' => '',
  'loglevel' => 0,
  'knowledgebaseenabled' => false,
  'app_install_overwrite' =>
  array (
    0 => 'calendar',
  ),
);

The output of your Apache/nginx/system log in /var/log/____:

10.42.x.x - - [18/Nov/2020:18:03:19 +0000] "PROPPATCH /remote.php/dav/calendars/robert/gemeinsam/ HTTP/1.1" 207 1019 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:82.0) Gecko/20100101 Firefox/82.0"
10.42.x.x - - [18/Nov/2020:18:03:19 +0000] "REPORT /remote.php/dav/calendars/robert/gemeinsam/ HTTP/1.1" 404 775 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:82.0) Gecko/20100101 Firefox/82.0"

It’s a pity that apparently nobody can help me here.

For the sake of completeness: an upgrade to 19.05 did not help either.