nextcloud / nextcloud/groupfolders
`NotFoundException` with File Versions while moving file from personal space to group folder
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 343
- Forks
- 106
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 34
Description
When using group folders in combination with the Versions plugin, I get NotFoundExceptions in the logs whenever I move a file from personal space to a group folder. In this case, admin is the user group of the user moving the file.
This bug was introduced with the latest update to NC29. Not sure if this bug is right here or is rather related to the versions plugin or nextcloud itself.
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Create a group folder
- Move file from personal space to group folder
- Check log
Expected behaviour
Tell us what should happen
Actual behaviour
Tell us what happens instead
Server configuration
Operating system: Debian 12
Database: MariaDB 10.11.6
PHP version: 8.2
Nextcloud version: 29.0.0
Group folders version: 17.0.0
Updated from an older Nextcloud/ownCloud or fresh install: Update 28->29
Are you using external storage, if yes which one: nextcloud-data is on nfs. Not using external storage plugins
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Logs
Nextcloud log (data/nextcloud.log)
Nextcloud log
{"reqId":"U9pzBJXuYC9UTLCDIkt3","level":3,"time":"2024-05-23T13:55:03+02:00","remoteAddr":"192.168.0.115","user":"andreas","app":"no app in context","method":"MOVE","url":"/remote.php/dav/files/andreas/2024/2024-04-23%2009.29.31.jpg","message":"Exception thrown: OCP\\Files\\NotFoundException","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36","version":"29.0.0.19","exception":{"Exception":"OCP\\Files\\NotFoundException","Message":"/admin/files_versions","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":161,"function":"get","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Versions/LegacyVersionsBackend.php","line":373,"function":"get","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/VersionStorageMoveListener.php","line":143,"function":"clearVersionsForFile","class":"OCA\\Files_Versions\\Versions\\LegacyVersionsBackend","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/VersionStorageMoveListener.php","line":116,"function":"handleMoveOrCopy","class":"OCA\\Files_Versions\\Listener\\VersionStorageMoveListener","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/VersionStorageMoveListener.php","line":88,"function":"recursivelyHandleMoveOrCopy","class":"OCA\\Files_Versions\\Listener\\VersionStorageMoveListener","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\Files_Versions\\Listener\\VersionStorageMoveListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":230,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":59,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":98,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":188,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":105,"function":"postRename","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":841,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":454,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":178,"function":"moveInto","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":612,"function":"move","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":374,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Files/Node/Root.php","Line":212,"CustomMessage":"Exception thrown: OCP\\Files\\NotFoundException"}}
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/files_versions/lib/Listener/VersionStorageMoveListener.php and apps/files_versions/lib/Versions/LegacyVersionsBackend.php, following the MOVE trace into lib/private/Files/Node/LazyFolder.php. Reproduce the group-folder move described in the issue and inspect why the versions lookup reaches /admin/files_versions; done means the move completes without the reported NotFoundException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100