recognize icon indicating copy to clipboard operation
recognize copied to clipboard

Error message while deleting file or folder

Open DecaTec opened this issue 2 years ago • 8 comments

Describe the bug NC instance with app recognize installed. When deleting fole or folders, an error message "Error while deleting file " is shown and die file/folder seems to be still present. But when refreshing the page, die file/folder was actually deleted.

Here's the log entry created while deleting file/folder:

[webdav] Fatal: Error: Call to undefined method OCP\Files\Events\Node\NodeDeletedEvent::getSubject() at <<closure>>

 0. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 87
    OCA\Recognize\Hooks\FileListener->handle()
 1. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke()
 2. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
 3. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 88
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
 4. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 100
    OC\EventDispatcher\EventDispatcher->dispatch()
 5. /var/www/nextcloud/lib/private/Files/Node/HookConnector.php line 156
    OC\EventDispatcher\EventDispatcher->dispatchTyped()
 6. /var/www/nextcloud/lib/private/legacy/OC_Hook.php line 106
    OC\Files\Node\HookConnector->postDelete()
 7. /var/www/nextcloud/lib/private/Files/View.php line 1290
    OC_Hook::emit()
 8. /var/www/nextcloud/lib/private/Files/View.php line 1218
    OC\Files\View->runHooks()
 9. /var/www/nextcloud/lib/private/Files/View.php line 733
    OC\Files\View->basicOperation()
10. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 523
    OC\Files\View->unlink()
11. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 179
    OCA\DAV\Connector\Sabre\File->delete()
12. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 281
    Sabre\DAV\Tree->delete()
13. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpDelete()
14. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
15. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
16. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
17. /var/www/nextcloud/apps/dav/lib/Server.php line 358
    Sabre\DAV\Server->exec()
18. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
19. /var/www/nextcloud/remote.php line 166
    require_once("/var/www/nextcl ... p")

DELETE /remote.php/dav/files/User/Tmp/efsd.md
from <IP> by <User> at 2022-08-23T08:35:33+02:00

By disabling the app recognize, the error is gone.

To Reproduce Steps to reproduce the behavior:

  1. Install app recognize
  2. Try to delte file or folder

Expected behavior No error message when trying to delete file or folder.

Server:

  • Nextcloud: 24.0.4
  • Recognize app version: 2.2.1

DecaTec avatar Aug 23 '22 10:08 DecaTec

Same here

dranelixx avatar Aug 26 '22 22:08 dranelixx

I am having the same problem too

marian-code avatar Aug 31 '22 12:08 marian-code

Same issue also.

AndyXheli avatar Sep 20 '22 18:09 AndyXheli

Also happens on NC 25

AndyXheli avatar Sep 20 '22 18:09 AndyXheli

Same issue, deleting any image results in a 500 internal server error, response below

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Error</s:exception>
  <s:message>Call to undefined method OCP\Files\Events\Node\NodeDeletedEvent::getSubject()</s:message>
</d:error>

BSoDium avatar Sep 26 '22 21:09 BSoDium

Hello, I also have this concern, I had made the request on Nextcloud before realizing that it was related to this application!

EVOTk avatar Sep 27 '22 21:09 EVOTk

I also faced the same, solved after recognize was disabled

samdeeshmenia avatar Oct 03 '22 09:10 samdeeshmenia

Thank you for reporting this! I'm aware of the issue but am focusing on getting v3 ready for a release, which will also fix this issue. Stay tuned :hearts:

marcelklehr avatar Oct 05 '22 18:10 marcelklehr

this is a showstopper for me personally, deleting when syncing my disk with my nextcloud instances is somewhat more important feature than having face recognition. you can merely add the method with pass in it and thus bypassing the server error when trying to invoke nonexisting function, no? please fix it, i still would like to have recognize enabled eventually.

usernamehyphen avatar Dec 09 '22 19:12 usernamehyphen

I sadly don't have time to maintain Recognize v2. I recommend to deactivate it until you are able to upgrade to v3 (which only supports Nextcloud v25). Thank you for your contributions!

marcelklehr avatar Dec 27 '22 14:12 marcelklehr