nextcloud / nextcloud/server

[Bug]: Nextcloud reports errors on requests from nextcloud-clients and carddav/caldav-clients when being in maintenance mode

Open
#55,894 10 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop 32-feedback bug feature: dav feature: logging
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

An Error is logged with caldav/carddav requests, if Nextcloud is in maintenance mode.

Steps to reproduce
  1. php occ maintenance:mode --on
  2. issue a caldav/carddav request
  3. check Nextcloud log
Expected behavior

I think the loglevel ERROR for this happening is set to high. loglevel INFO would suffice.

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?

Upgraded to a MAJOR version (ex. 31 to 32)

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

List of activated Apps

Nextcloud Signing status
No errors have been found.
Nextcloud Logs
{"reqId":"4yS869z198evyX4KhI1J","level":3,"time":"2025-10-21T11:58:31+02:00","remoteAddr":"1.2.3.4","user":"--","app":"no app in context","method":"REPORT","url":"/nextcloud/remote.php/dav/addressbooks/users/<USERNAME>/contacts/","message":"Uncaught exception","userAgent":"iOS/26.0.1 (23A355) dataaccessd/1.0","version":"32.0.0.13","exception":{"Exception":"OCA\\DAV\\Exception\\ServerMaintenanceMode","Message":"Das System befindet sich im Wartungsmodus.","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"checkMaintenanceMode","class":"OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":211,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":424,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":151,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php","Line":65,"message":"Uncaught exception","exception":{},"CustomMessage":"Uncaught exception"}}
Additional info

If needed, I'll happily provide the output of the following two commands, but I think it is irrelevant for this bug.

php occ config:list system
php occ app:list

EDIT: a user posted this in the Nextcloud forum - I created this issue as I am also affected.
Link to Nextcloud-Forum: https://help.nextcloud.com/t/servermaintenancemode-das-system-befindet-sich-im-wartungsmodus/233826

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

Start with apps/dav/lib/Connector/Sabre/MaintenancePlugin.php at line 65, then reproduce the issue with php occ maintenance:mode --on and a CalDAV or CardDAV request. Confirm the maintenance-mode exception is logged at INFO rather than ERROR, and verify the resulting Nextcloud log.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.