[Bug]: Deleting files in a folder shared with a Circle/Team fails
⚠️ This issue respects the following points: ⚠️
- [x] This is a bug, not a question or a configuration/webserver/proxy issue.
- [x] This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- [x] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [x] I agree to follow Nextcloud's Code of Conduct.
Bug description
User has shared a folder with a structure of subfolders with a Circle/Team. Deleting files from a subfolder fails with a 500. After dropping the share, files could be deleted. After shareing the folder again, it still works. Reproduction of the error wasn't possible so far. It occurred on several user accounts.
Update Aug, 19: Problem occurred at another account. Neither owner of the folder nor members of the circle were able to delete files or folders within the shared folder. After deleting the share for the circle and re-sharing it worked. Seems that upgrading the shares to NC 31 from NC30 caused the problem.
Steps to reproduce
- Create a folder ans share with a Circle
- Delete files from folder
- perhaps you get an error
Expected behavior
File should be deleted.
Nextcloud Server version
31
Operating system
Other
PHP engine version
PHP 8.2
Web server
Apache (supported)
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?
- [x] Default user-backend (database)
- [x] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
{
"system": {
"maintenance": false,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"..."
],
"theme": "",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"maintenance_window_start": 1,
"dbtype": "mysql",
"version": "31.0.4.1",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"installed": true,
"appstoreenabled": true,
"knowledgebaseenabled": false,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"ldapIgnoreNamingRules": false,
"updatechecker": false,
"logtimezone": "Europe\/Berlin",
"remember_login_cookie_lifetime": 1000,
"session_lifetime": 900,
"singleuser": false,
"secret": "***REMOVED SENSITIVE VALUE***",
"loglevel": 4,
"log_type": "syslog",
"trashbin_retention_obligation": "auto, 360",
"overwriteprotocol": "https",
"overwrite.cli.url": "https:...",
"default_language": "de_DE",
"ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
"auth.bruteforce.protection.enabled": false,
"integrity.check.disabled": true,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_sendmailmode": "smtp",
"proxy": "...:8080",
"proxyexclude": [
"..."
],
"defaultapp": "files",
"mysql.utf8mb4": true,
"disable_mobile_push": true,
"data-fingerprint": "....",
"app_install_overwrite": []
}
}
List of activated Apps
Enabled:
- activity: 4.0.0
- admin_audit: 1.21.0
- announcementcenter: 7.1.4
- app_api: 5.0.2
- bruteforcesettings: 4.0.0
- calendar: 5.3.8
- circles: 31.0.0
- cloud_federation_api: 1.14.0
- comments: 1.21.0
- contacts: 7.2.4
- contactsinteraction: 1.12.0
- dashboard: 7.11.0
- dav: 1.33.0
- deck: 1.15.2
- federatedfilesharing: 1.21.0
- files: 2.3.1
- files_downloadlimit: 4.0.0
- files_pdfviewer: 4.0.0
- files_reminders: 1.4.0
- files_sharing: 1.23.1
- files_trashbin: 1.21.0
- files_versions: 1.24.0
- logreader: 4.0.0
- lookup_server_connector: 1.19.0
- nextcloud_announcements: 3.0.0
- notifications: 4.0.0
- oauth2: 1.19.1
- password_policy: 3.0.0
- photos: 4.0.0-dev.1
- privacy: 3.0.0
- profile: 1.0.0
- provisioning_api: 1.21.0
- recommendations: 4.0.0
- related_resources: 2.0.0
- serverinfo: 3.0.0
- settings: 1.14.0
- support: 3.0.0
- systemtags: 1.21.1
- tasks: 0.16.1
- terms_of_service: 4.4.0
- text: 5.0.0
- theming: 2.6.1
- theming_customcss: 1.18.0
- twofactor_backupcodes: 1.20.0
- twofactor_totp: 13.0.0-dev.0
- user_ldap: 1.22.0
- user_status: 1.11.0
- viewer: 4.0.0
- weather_status: 1.11.0
- webhook_listeners: 1.2.0
- workflowengine: 2.13.0
Disabled:
- encryption: 2.19.0 (installed 2.7.0)
- federation: 1.21.0 (installed 0.0.4)
- files_external: 1.23.0
- firstrunwizard: 4.0.0 (installed 1.1)
- sharebymail: 1.21.0 (installed 1.0.1)
- survey_client: 3.0.0 (installed 0.1.5)
- suspicious_login: 9.0.1
- twofactor_nextcloud_notification: 5.0.0
- updatenotification: 1.21.0 (installed 0.1.0)
Nextcloud Signing status
Integrity checker has been disabled. Integrity cannot be verified.
Nextcloud Logs
{"reqId":"JRYF2zu4VuXGHH8WGL1v","level":3,"time":"2025-08-18T12:56:05+02:00","remoteAddr":"10.100.16.41","user":"zvaa043","app":"webdav","method":"DELETE","url":"/remote.php/dav/files/.../.../loeschmich1.txt","message":"{\"Exception\":\"TypeError\",\"Message\":\"OCA\\\\Circles\\\\Model\\\\ShareWrapper::getCircle(): Return value must be of type OCA\\\\Circles\\\\Model\\\\Circle, null returned\",\"Code\":0,\"Trace\":[{\"file\":\"/srv/www/htdocs/owncloud/apps/circles/lib/ShareByCircleProvider.php\",\"line\":672,\"function\":\"getCircle\",\"class\":\"OCA\\\\Circles\\\\Model\\\\ShareWrapper\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/lib/private/Share20/Manager.php\",\"line\":1697,\"function\":\"getAccessList\",\"class\":\"OCA\\\\Circles\\\\ShareByCircleProvider\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/lib/private/Share20/ShareHelper.php\",\"line\":33,\"function\":\"getAccessList\",\"class\":\"OC\\\\Share20\\\\Manager\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/apps/activity/lib/FilesHooks.php\",\"line\":584,\"function\":\"getPathsForAccessList\",\"class\":\"OC\\\\Share20\\\\ShareHelper\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/apps/activity/lib/FilesHooks.php\",\"line\":152,\"function\":\"getUserPathsFromPath\",\"class\":\"OCA\\\\Activity\\\\FilesHooks\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/apps/activity/lib/FilesHooks.php\",\"line\":103,\"function\":\"addNotificationsForFileAction\",\"class\":\"OCA\\\\Activity\\\\FilesHooks\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/apps/activity/lib/FilesHooksStatic.php\",\"line\":43,\"function\":\"fileDelete\",\"class\":\"OCA\\\\Activity\\\\FilesHooks\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/lib/private/legacy/OC_Hook.php\",\"line\":85,\"function\":\"fileDelete\",\"class\":\"OCA\\\\Activity\\\\FilesHooksStatic\",\"type\":\"::\"},{\"file\":\"/srv/www/htdocs/owncloud/lib/private/Files/View.php\",\"line\":1321,\"function\":\"emit\",\"class\":\"OC_Hook\",\"type\":\"::\"},{\"file\":\"/srv/www/htdocs/owncloud/lib/private/Files/View.php\",\"line\":1193,\"function\":\"runHooks\",\"class\":\"OC\\\\Files\\\\View\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/lib/private/Files/View.php\",\"line\":675,\"function\":\"basicOperation\",\"class\":\"OC\\\\Files\\\\View\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/apps/dav/lib/Connector/Sabre/File.php\",\"line\":506,\"function\":\"unlink\",\"class\":\"OC\\\\Files\\\\View\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/3rdparty/sabre/dav/lib/DAV/Tree.php\",\"line\":197,\"function\":\"delete\",\"class\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php\",\"line\":281,\"function\":\"delete\",\"class\":\"Sabre\\\\DAV\\\\Tree\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php\",\"line\":89,\"function\":\"httpDelete\",\"class\":\"Sabre\\\\DAV\\\\CorePlugin\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":472,\"function\":\"emit\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/apps/dav/lib/Connector/Sabre/Server.php\",\"line\":49,\"function\":\"invokeMethod\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/apps/dav/lib/Server.php\",\"line\":398,\"function\":\"start\",\"class\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Server\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/apps/dav/appinfo/v2/remote.php\",\"line\":21,\"function\":\"exec\",\"class\":\"OCA\\\\DAV\\\\Server\",\"type\":\"->\"},{\"file\":\"/srv/www/htdocs/owncloud/remote.php\",\"line\":145,\"args\":[\"/srv/www/htdocs/owncloud/apps/dav/appinfo/v2/remote.php\"],\"function\":\"require_once\"}],\"File\":\"/srv/www/htdocs/owncloud/apps/circles/lib/Model/ShareWrapper.php\",\"Line\":263,\"message\":\"OCA\\\\Circles\\\\Model\\\\ShareWrapper::getCircle(): Return value must be of type OCA\\\\Circles\\\\Model\\\\Circle, null returned\",\"exception\":{},\"CustomMessage\":\"OCA\\\\Circles\\\\Model\\\\ShareWrapper::getCircle(): Return value must be of type OCA\\\\Circles\\\\Model\\\\Circle, null returned\"}","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0","version":"31.0.4.1"}
Additional info
The error message shown is the one that apears when deleting failes.
"version": "31.0.4.1",
Does it happen on the late maintenance releases? 31.0.7/31.0.8?
Looks related to #2088 and/or #2077
"version": "31.0.4.1",Does it happen on the late maintenance releases? 31.0.7/31.0.8?
Seems that it happend while migrating NC from 30 to 31.0.4. For a network problem (timeouts while updating the apps) I had to reinstall the apps after migrating the NC. Before and after migration creating a new share with a Circle worked fine, only some shares seemed to be broken after migration. I wasn't able to reproduce it but got 2 cases from users.
Concerning #2088: Error in my case contains
Return value must be of type OCA\\\\Circles\\\\Model\\\\Circle, null returned","Code":0`
Error in #2088 contains
Return value must be of type OCA\Circles\Model\Circle, null returned
Same with #2077, so most likely the same problem, I guess.