[Bug]: Nextcloud reports errors on requests from nextcloud-clients and carddav/caldav-clients when being in maintenance mode
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github (I've searched it).
This is the according thread in the Nextcloud-Forum (only in german):
https://help.nextcloud.com/t/servermaintenancemode-das-system-befindet-sich-im-wartungsmodus/233826 - Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
An Error is logged with caldav/carddav requests, if Nextcloud is in maintenance mode.
Steps to reproduce
php occ maintenance:mode --on- issue a caldav/carddav request
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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