Calendar app fails to display calenders on first use

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.5
  • Operating system and version (e.g., Ubuntu 24.04):
    • opensuse-tumbleweed 20250501
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.62
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx:latest (asdfaasdfasdf, 5 month ago)
  • PHP version (e.g, 8.3):
    • 4.2.27
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • since installation
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • docker pull nextcloud:latest
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

When starting the calendar app, no calendars are shown, only the spinning circle. Creating a new calendar fails with an immediate error message. I use keycloak as an OpenId provider and I have changed the user-id option for the nextcloud openId client to use a provider-prefixed user id that is then shared between nextcloud and keycloak. I had created users before that (with different ids on the nextcloud/keycloak side) which have been deleted. Otherwise, the nextcloud instance is fresh with only a few files created.

Steps to replicate it (hint: details matter!):

  1. Click on Calendar app

Log entries

There are no log entries generated when starting the calendar app.

Nextcloud

There are no log entries generated when starting the calendar app.

Web Browser

The problem is reproducible in all browsers I checked (Firefox, Chromium, Thorium).

When checking the http traffic, the 404 error occurs when accessing https://host/root/remote.php/dav/principals/users/Keycloak%20(OpenID)-user-id/

Request:

<x0:propfind xmlns:x0="DAV:"><x0:prop><x0:displayname/><x1:calendar-user-type xmlns:x1="urn:ietf:params:xml:ns:caldav"/><x1:calendar-user-address-set xmlns:x1="urn:ietf:params:xml:ns:caldav"/><x0:principal-URL/><x0:alternate-URI-set/><x2:email-address xmlns:x2="http-removed-due-to-link-restriction/sabredav.org/ns"/><x3:language xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x1:calendar-home-set xmlns:x1="urn:ietf:params:xml:ns:caldav"/><x1:schedule-inbox-URL xmlns:x1="urn:ietf:params:xml:ns:caldav"/><x1:schedule-outbox-URL xmlns:x1="urn:ietf:params:xml:ns:caldav"/><x1:schedule-default-calendar-URL xmlns:x1="urn:ietf:params:xml:ns:caldav"/><x3:resource-type xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:resource-vehicle-type xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:resource-vehicle-make xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:resource-vehicle-model xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:resource-vehicle-is-electric xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:resource-vehicle-range xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:resource-vehicle-seating-capacity xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:resource-contact-person xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:resource-contact-person-vcard xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:room-type xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:room-seating-capacity xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:room-building-address xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:room-building-story xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:room-building-room-number xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x3:room-features xmlns:x3="http-removed-due-to-link-restriction/nextcloud.com/ns"/><x0:principal-collection-set/><x0:supported-report-set/></x0:prop></x0:propfind>

Web server / Reverse Proxy

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

10.0.0.2 - - [25/May/2025:09:35:18 +0000] "GET /root/apps/calendar/ HTTP/1.1" 200 12864 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - - [25/May/2025:09:35:19 +0000] "GET /root/ocs/v2.php/search/providers?from=%2Fyroot%2Fapps%2Fcalendar%2F HTTP/1.1" 200 846 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - - [25/May/2025:09:35:19 +0000] "POST /root/contactsmenu/contacts HTTP/1.1" 200 928 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - - [25/May/2025:09:35:19 +0000] "PROPFIND /root/remote.php/dav/ HTTP/1.1" 207 454 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - - [25/May/2025:09:35:19 +0000] "GET /root/ocs/v2.php/apps/user_status/api/v1/user_status HTTP/1.1" 200 194 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - - [25/May/2025:09:35:19 +0000] "PUT /root/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 194 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - - [25/May/2025:09:35:19 +0000] "GET /root/index.php/apps/files/preview-service-worker.js HTTP/1.1" 200 5252 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - - [25/May/2025:09:35:19 +0000] "GET /root/cron.php HTTP/1.1" 200 20 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - - [25/May/2025:09:35:19 +0000] "GET /root/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 81 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - - [25/May/2025:09:35:19 +0000] "PROPFIND /root/remote.php/dav/principals/calendar-resources/ HTTP/1.1" 207 463 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - - [25/May/2025:09:35:19 +0000] "PROPFIND /root/remote.php/dav/principals/calendar-rooms/ HTTP/1.1" 207 463 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - - [25/May/2025:09:35:19 +0000] "PROPFIND /root/remote.php/dav/principals/users/Keycloak%20(OpenID)-userid/ HTTP/1.1" 404 3015 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - - [25/May/2025:09:35:20 +0000] "GET /root/index.php/apps/files/preview-service-worker.js HTTP/1.1" 200 5252 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0" "-"
10.0.0.2 - Keycloak (OpenID)-userid [25/May/2025:09:35:23 +0000] "GET /root/ocs/v2.php/apps/user_status/api/v1/user_status?format=json HTTP/1.1" 200 194 "-" "Mozilla/5.0 (Linux) mirall/3.16.4daily (Nextcloud, opensuse-tumbleweed-6.14.4-1-default ClientArchitecture: x86_64 OsArchitecture: x86_64)" "-"
10.0.0.2 - Keycloak (OpenID)-userid [25/May/2025:09:35:23 +0000] "GET /root/ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Linux) mirall/3.16.4daily (Nextcloud, opensuse-tumbleweed-6.14.4-1-default ClientArchitecture: x86_64 OsArchitecture: x86_64)" "-"
10.0.0.2 - Keycloak (OpenID)-userid [25/May/2025:09:35:23 +0000] "PROPFIND /root/remote.php/dav/files/Keycloak%20(OpenID)-userid/ HTTP/1.1" 207 694 "-" "Mozilla/5.0 (Linux) mirall/3.16.4daily (Nextcloud, opensuse-tumbleweed-6.14.4-1-default ClientArchitecture: x86_64 OsArchitecture: x86_64)" "-"

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'upgrade.disable-web' => true,
  'instanceid' => '***',
  'passwordsalt' => '***',
  'secret' => '****',
  'trusted_domains' => 
  array (
    0 => 'internal-host.lan:8081',
    1 => 'internal-host.lan',
    2 => 'localhost',
    3 => '10.0.0.2',
    4 => 'internal-host',
    5 => 'external-host',
  ),
  'trusted_proxies' => 
  array (
    0 => 'external-ip',
    1 => '10.0.0.3',
  ),
  'overwritehost' => 'external-host',
  'overwriteprotocol' => 'https',
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '30.0.5.1',
  'overwrite.cli.url' => 'https-removed-due-to-link-restriction/external-host/root',
  'overwritewebroot' => '/root',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '***',
  'installed' => true,
  'app_install_overwrite' => 
  array (
    0 => 'gluusso',
  ),
  'maintenance' => false,
  'allow_local_remote_servers' => true,
  'debug' => true,
  'loglevel' => 2,
);

Apps

The output of occ app:list (if possible).
occ seems unavailable in the nextcloud container

occ is definitely available in the community micro-services Docker container. Please use it (see Nextcloud Docker: Using occ) to generate the app list + also re-generate your config as well using occ config:list system (since the merged config is based on multiple config files in the image).

Any particular reason you’re 6 maintenance releases behind? v30 is at v30.0.11 currently.

Maybe you should call it this way:

$ php occ config:list system

HTH

Thanks for the pointers, noob here.

config:list

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "upgrade.disable-web": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "internal-server.lan:8081",
            "internal-server.lan",
            "localhost",
            "172.16.10.15",
            "internal-server",
            "external-server.org"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "external-server.org",
        "overwriteprotocol": "https",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.5.1",
        "overwrite.cli.url": "https:\/\/external-server.org\/root",
        "overwritewebroot": "\/root",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "app_install_overwrite": [
            "gluusso"
        ],
        "maintenance": false,
        "allow_local_remote_servers": true,
        "debug": true,
        "loglevel": 2
    }
}

app:list

Enabled:
  - activity: 3.0.0
  - announcementcenter: 7.1.2
  - app_api: 4.0.5
  - appointments: 2.3.5
  - bruteforcesettings: 3.0.0
  - calendar: 5.2.4
  - circles: 30.0.0
  - cloud_federation_api: 1.13.0
  - collectives: 2.16.0
  - comments: 1.20.1
  - contacts: 6.1.3
  - contactsinteraction: 1.11.0
  - cookbook: 0.11.2
  - dashboard: 7.10.0
  - dav: 1.31.1
  - deck: 1.14.5
  - dicomviewer: 2.3.1
  - drawio: 3.0.9
  - event_update_notification: 2.5.0
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_downloadlimit: 3.0.0
  - files_mindmap: 0.0.33
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - firstrunwizard: 3.0.0
  - forms: 5.1.0
  - groupfolders: 18.1.2
  - libresign: 10.6.1
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - mail: 4.1.2
  - maps: 1.5.0
  - memories: 7.4.1
  - money: 0.29.1
  - nextcloud_announcements: 2.0.0
  - notes: 4.11.0
  - notifications: 3.0.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - photos: 3.0.2
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - richdocuments: 8.5.7
  - richdocumentscode: 24.4.1303
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - sociallogin: 6.0.1
  - spreed: 20.1.3
  - support: 2.0.0
  - survey_client: 2.0.0
  - systemtags: 1.20.0
  - tables: 0.8.3
  - text: 4.1.0
  - theming: 2.5.0
  - twofactor_backupcodes: 1.19.0
  - updatenotification: 1.20.0
  - user_oidc: 7.2.0
  - user_status: 1.10.0
  - viewer: 3.0.0
  - weather_status: 1.10.0
  - webhook_listeners: 1.1.0-dev
  - whiteboard: 1.0.5
  - workflowengine: 2.12.0
Disabled:
  - admin_audit: 1.20.0
  - encryption: 2.18.0
  - files_external: 1.22.0
  - gestion: 2.7.6 (installed 2.7.6)
  - oidc_login: 3.2.2 (installed 3.2.2)
  - suspicious_login: 8.0.0
  - twofactor_nextcloud_notification: 4.0.0
  - twofactor_totp: 12.0.0-dev
  - user_ldap: 1.21.0
  - user_saml: 6.6.0 (installed 6.6.0)

It seems nobody else has this problem. I would appreciate some advice as to how proceed with debugging.

  • What puzzles me is that there are no error messages in the log. I have switched to level DEBUG in the admin web interface. Is this any different from switching to DEBUG level in config.php?
  • As the URL in question is not static, the php backend has to generate the 404 code. Is there a way to see why the backend generates a 404?
  • Can anybody confirm that the “Use provider identifier as prefix for IDs” option in the “OpenId connect” extension should work with the calendar extension?

Thank you very much in advance.

I have set up a new nextcloud instance without an openid connect provider. I see the same problems. The calendar app and the libreoffice CODE server do not work.

Internal access works without problems.

One more observation:

The documentation for a reverse proxy says:

<?php
$CONFIG = array (
  'trusted_proxies'   => ['10.0.0.1'],
  'overwritehost'     => 'ssl-proxy.tld',
  'overwriteprotocol' => 'https',
  'overwritewebroot'  => '/domain.tld/nextcloud',
  'overwritecondaddr' => '^10\.0\.0\.1$',
  'overwrite.cli.url' => 'https://domain.tld/,
);

However, this does not work for me. I have to use:

<?php
$CONFIG = array (
  'trusted_proxies'   => ['10.0.0.1'],
  'overwritehost'     => 'ssl-proxy.tld',
  'overwriteprotocol' => 'https',
  'overwritewebroot'  => '/nextcloud/',
  'overwritecondaddr' => '^10\.0\.0\.1$',
  'overwrite.cli.url' => 'https://domain.tld/nextcloud/',
);

To get a functional instance, except for the CODE server and the calendar app.