-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automated tagging fails when moving files #728
Comments
That's expected. It only interacts on uploads. |
Oh nevermind, I stopped reading to early. So yeah that tagging is not applied on move is expected. Can you give us the full log message? |
I would appreciate it if it were possible, since that is a good use case for automated tagging. Maybe limit the number of files which can be tagged at a time or warn if a certian threshhold ist reached. My use case is to move files in place after they arrive in other locations in nextcloud. A great app for photo management, called memories, also offers the feature to move files to other folders, for easy organization
Sure, here should be the relevant excerpt:
|
{
"reqId": "<redacted>",
"level": 3,
"time": "April 17, 2023 09:23:01",
"remoteAddr": "<REMOTEIP>",
"user": "<USERID>",
"app": "webdav",
"method": "MOVE",
"url": "/remote.php/dav/files/<USERID>/path/to/source/23-04-16%2015-34-01%201900.mov",
"message": "/path/to/target",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36",
"version": "26.0.0.11",
"exception": {
"Exception": "OCP\\Files\\NotFoundException",
"Message": "/path/to/target",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/lib/private/Files/Node/Node.php",
"line": 299,
"function": "get",
"class": "OC\\Files\\Node\\Root",
"type": "->",
"args": [
"/path/to/target"
]
},
{
"file": "/var/www/html/lib/private/Share20/Manager.php",
"line": 1746,
"function": "getParent",
"class": "OC\\Files\\Node\\Node",
"type": "->",
"args": []
},
{
"file": "/var/www/html/lib/private/Share20/ShareHelper.php",
"line": 51,
"function": "getAccessList",
"class": "OC\\Share20\\Manager",
"type": "->",
"args": [
[
"OC\\Files\\Node\\File"
],
true,
true
]
},
{
"file": "/var/www/html/apps/systemtags/lib/Activity/Listener.php",
"line": 187,
"function": "getPathsForAccessList",
"class": "OC\\Share20\\ShareHelper",
"type": "->",
"args": [
[
"OC\\Files\\Node\\File"
]
]
},
{
"file": "/var/www/html/apps/systemtags/lib/AppInfo/Application.php",
"line": 74,
"function": "mapperEvent",
"class": "OCA\\SystemTags\\Activity\\Listener",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
"line": 251,
"function": "OCA\\SystemTags\\AppInfo\\{closure}",
"class": "OCA\\SystemTags\\AppInfo\\Application",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
"line": 73,
"function": "callListeners",
"class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
[
[
"Closure"
],
[
"Closure"
],
[
"Closure"
]
],
"*** sensitive parameters replaced ***",
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/lib/private/EventDispatcher/EventDispatcher.php",
"line": 87,
"function": "dispatch",
"class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
"*** sensitive parameters replaced ***",
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/lib/private/EventDispatcher/SymfonyAdapter.php",
"line": 98,
"function": "dispatch",
"class": "OC\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
"*** sensitive parameters replaced ***",
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/lib/private/SystemTag/SystemTagObjectMapper.php",
"line": 176,
"function": "dispatch",
"class": "OC\\EventDispatcher\\SymfonyAdapter",
"type": "->",
"args": [
"*** sensitive parameters replaced ***",
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/custom_apps/files_automatedtagging/lib/Operation.php",
"line": 105,
"function": "assignTags",
"class": "OC\\SystemTag\\SystemTagObjectMapper",
"type": "->",
"args": [
"3626696",
"files",
[
"227"
]
]
},
{
"file": "/var/www/html/custom_apps/files_automatedtagging/lib/Listener/CacheListener.php",
"line": 43,
"function": "checkOperations",
"class": "OCA\\FilesAutomatedTagging\\Operation",
"type": "->",
"args": [
[
"OCA\\Files_Trashbin\\Storage",
[
"OC\\Files\\Cache\\Cache"
],
[
"OC\\Files\\Cache\\Scanner"
],
null,
[
"OC\\Files\\Cache\\Propagator"
],
[
"OC\\Files\\Cache\\Updater"
]
],
3626696,
"path/to/target/23-04-16 15-34-01 1900.mov"
]
},
{
"file": "/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php",
"line": 86,
"function": "handle",
"class": "OCA\\FilesAutomatedTagging\\Listener\\CacheListener",
"type": "->",
"args": [
[
"OCP\\Files\\Cache\\CacheEntryInsertedEvent"
]
]
},
{
"file": "/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
"line": 251,
"function": "__invoke",
"class": "OC\\EventDispatcher\\ServiceEventListener",
"type": "->",
"args": [
[
"OCP\\Files\\Cache\\CacheEntryInsertedEvent"
],
"OCP\\Files\\Cache\\CacheEntryInsertedEvent",
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
"line": 73,
"function": "callListeners",
"class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
[
[
"Closure"
],
[
"Closure"
]
],
"OCP\\Files\\Cache\\CacheEntryInsertedEvent",
[
"OCP\\Files\\Cache\\CacheEntryInsertedEvent"
]
]
},
{
"file": "/var/www/html/lib/private/EventDispatcher/EventDispatcher.php",
"line": 87,
"function": "dispatch",
"class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
[
"OCP\\Files\\Cache\\CacheEntryInsertedEvent"
],
"OCP\\Files\\Cache\\CacheEntryInsertedEvent"
]
},
{
"file": "/var/www/html/lib/private/EventDispatcher/EventDispatcher.php",
"line": 99,
"function": "dispatch",
"class": "OC\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
"OCP\\Files\\Cache\\CacheEntryInsertedEvent",
[
"OCP\\Files\\Cache\\CacheEntryInsertedEvent"
]
]
},
{
"file": "/var/www/html/lib/private/Files/Cache/Cache.php",
"line": 719,
"function": "dispatchTyped",
"class": "OC\\EventDispatcher\\EventDispatcher",
"type": "->",
"args": [
[
"OCP\\Files\\Cache\\CacheEntryInsertedEvent"
]
]
},
{
"file": "/var/www/html/lib/private/Files/Cache/Updater.php",
"line": 200,
"function": "moveFromCache",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
[
"OC\\Files\\Cache\\Cache"
],
"path/to/source/23-04-16 15-34-01 1900.mov",
"path/to/target/23-04-16 15-34-01 1900.mov"
]
},
{
"file": "/var/www/html/lib/private/Files/View.php",
"line": 336,
"function": "renameFromStorage",
"class": "OC\\Files\\Cache\\Updater",
"type": "->",
"args": [
[
"OCA\\Files_Trashbin\\Storage",
[
"OC\\Files\\Cache\\Cache"
],
[
"OC\\Files\\Cache\\Scanner"
],
null,
[
"OC\\Files\\Cache\\Propagator"
],
[
"OC\\Files\\Cache\\Updater"
]
],
"path/to/source/23-04-16 15-34-01 1900.mov",
"path/to/target/23-04-16 15-34-01 1900.mov"
]
},
{
"file": "/var/www/html/lib/private/Files/View.php",
"line": 841,
"function": "renameUpdate",
"class": "OC\\Files\\View",
"type": "->",
"args": [
[
"OCA\\Files_Trashbin\\Storage",
[
"OC\\Files\\Cache\\Cache"
],
[
"OC\\Files\\Cache\\Scanner"
],
null,
[
"OC\\Files\\Cache\\Propagator"
],
[
"OC\\Files\\Cache\\Updater"
]
],
[
"OCA\\Files_Trashbin\\Storage",
[
"OC\\Files\\Cache\\Cache"
],
[
"OC\\Files\\Cache\\Scanner"
],
null,
[
"OC\\Files\\Cache\\Propagator"
],
[
"OC\\Files\\Cache\\Updater"
]
],
"path/to/source/23-04-16 15-34-01 1900.mov",
"path/to/target/23-04-16 15-34-01 1900.mov"
]
},
{
"file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
"line": 450,
"function": "rename",
"class": "OC\\Files\\View",
"type": "->",
"args": [
"/Storagebox GuGu/path/to/source/23-04-16 15-34-01 1900.mov",
"/path/to/target/23-04-16 15-34-01 1900.mov"
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php",
"line": 160,
"function": "moveInto",
"class": "OCA\\DAV\\Connector\\Sabre\\Directory",
"type": "->",
"args": [
"23-04-16 15-34-01 1900.mov",
"files/path/to/source04/23-04-16 15-34-01 1900.mov",
[
"OCA\\DAV\\Connector\\Sabre\\File"
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 612,
"function": "move",
"class": "Sabre\\DAV\\Tree",
"type": "->",
"args": [
"files/path/to/source04/23-04-16 15-34-01 1900.mov",
"files/<USERID>/path/to/target/23-04-16 15-34-01 1900.mov"
]
},
{
"file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpMove",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"method:MOVE",
[
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 253,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 321,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/lib/Server.php",
"line": 366,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/remote.php",
"line": 171,
"args": [
"/var/www/html/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/html/lib/private/Files/Node/Root.php",
"Line": 209,
"message": "/path/to/target",
"exception": {},
"CustomMessage": "/path/to/target"
}
} So that's a bit weird. The files seem to be moved, but at the same time they are creating the cache entry like if they are new. Of course we could fix the result (check for the parent to exist before trying to get it when generating activity), but that would just cover up the root cause. The actual question is why you have items listed with parents defined that do not seem to exist on the database level. |
I can replicate this behaviour with files both on internal and external storage. Can I supply more logs or insights into what might happen? A note on that automated tagging only works on uploads: It also works when copying files. The problem you describe which could arise when moving 16GB of files then also could appear when copying 16GB of files inside Nextcloud. |
So I did:
On the last step rules applied and images where tagged as "Not folder", in the previous step the files where not tagged. So there seems to be more involved. Looking at the code sharing might be it. |
I think I got closer: It appears to happen when moving from external storage to external or internal storage, I adjust my bug report
None
None
Files app in the web, memories app - moving just files |
Dear @nickvergessen, can I supply more info on this bug? |
Not at the moment, just lacking time to look into it myself. But anyone else can have a look at the meantime |
Steps to reproduce
Expected behaviour
Moving a file should work just like copying
Actual behaviour
Server configuration
Operating system:
Debian stable
Web server:
Docker nextcloud php-fpm
Database:
postgres 15
PHP version:
8.1
Nextcloud version: (see Nextcloud admin page)
26
Where did you install Nextcloud from:
official docker nextcloud php-fpm image
The text was updated successfully, but these errors were encountered: