nextcloud / recognize

👁 👂 Smart media tagging for Nextcloud: recognizes faces, objects, landscapes, music genres
https://apps.nextcloud.com/apps/recognize
GNU Affero General Public License v3.0
558 stars 46 forks source link

Error while performing move actions in the face clusters #1073

Closed andypmuc closed 10 months ago

andypmuc commented 10 months ago

Which version of recognize are you using?

5.0.3

Enabled Modes

Object recognition, Face recognition

TensorFlow mode

Normal mode

Downstream App

Photos App

Which Nextcloud version do you have installed?

27.1.5

Which Operating system do you have installed?

Ubuntu 22.04

Which database are you running Nextcloud on?

Maria DB?

Which Docker container are you using to run Nextcloud? (if applicable)

No response

How much RAM does your server have?

12 GB

What processor Architecture does your CPU have?

x86_64

Describe the Bug

Operations in the upper right corner fail. I cannot a 100% define, when this is happening, but it seems in two case. First, when the content is not fully loaded and then it becomes a problem, when the clusters have 200 or 300 faces. Second, when a command is successfully executed and a second command is executed afterwards. Then I have the impression, the content is not updated properly and recognize tries to move the picture twice, but it is not there anymore. Sorry, I cannot provide more details, because I could not find out precisely, when it happens Once I also had the impression, it has something to do with authentification, but I am not sure. I have 2FA on. I have also the impression, it is only when you move people

Expected Behavior

Handling of larger face clusters is better supported, no problems with several commands in sequence.

To Reproduce

Try it with larger clusters 500 faces or more, and move several pictures to other persons in sequence, then it should happen.

Debug log

[webdav] Error: TypeError: OCA\Recognize\Db\FaceDetectionMapper::findByClusterId(): Argument #1 ($clusterId) must be of type int, null given, called in /var/www/nextcloud/apps/recognize/lib/Dav/Faces/FacePhoto.php on line 55 at <>

  1. /var/www/nextcloud/apps/recognize/lib/Dav/Faces/FacePhoto.php line 55 OCA\Recognize\Db\FaceDetectionMapper->findByClusterId()
  2. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 179 OCA\Recognize\Dav\Faces\FacePhoto->delete()
  3. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 608 Sabre\DAV\Tree->delete()
  4. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89 Sabre\DAV\CorePlugin->httpMove()
  5. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472 Sabre\DAV\Server->emit()
  6. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253 Sabre\DAV\Server->invokeMethod()
  7. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321 Sabre\DAV\Server->start()
  8. /var/www/nextcloud/apps/dav/lib/Server.php line 365 Sabre\DAV\Server->exec()
  9. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35 OCA\DAV\Server->exec()
  10. /var/www/nextcloud/remote.php line 172 require_once("/var/www/nextcl ... p")

MOVE /remote.php/dav/recognize/user1/faces/user2/8619-20200324-163610-b86188e498af6a4f.jpg from 91.17.41.124 by user1 at 2024-01-04T20:45:12+00:00

faces.js:94 TypeError: Cannot read properties of undefined (reading 'key') at Lr (vue.runtime.esm.js:6442:15) at vue.runtime.esm.js:6820:25 at w (vue.runtime.esm.js:6909:21) at vue.runtime.esm.js:6783:17 at w (vue.runtime.esm.js:6909:21) at $a.nodeOps [as patch] (vue.runtime.esm.js:7077:17) at e._update (vue.runtime.esm.js:3769:25) at o.r (vue.runtime.esm.js:3875:16) at e.get (vue.runtime.esm.js:3446:33) at e.run (vue.runtime.esm.js:3522:30)

faces.js:94 TypeError: Cannot read properties of undefined (reading 'key') at Lr (vue.runtime.esm.js:6442:15) at vue.runtime.esm.js:6820:25 at w (vue.runtime.esm.js:6909:21) at vue.runtime.esm.js:6783:17 at w (vue.runtime.esm.js:6909:21) at $a.nodeOps [as patch] (vue.runtime.esm.js:7077:17) at e._update (vue.runtime.esm.js:3769:25) at o.r (vue.runtime.esm.js:3875:16) at e.get (vue.runtime.esm.js:3446:33) at e.run (vue.runtime.esm.js:3522:30) Lt @ vue.runtime.esm.js:3049 Bt @ vue.runtime.esm.js:3041 Rt @ vue.runtime.esm.js:3008 (anonymous) @ vue.runtime.esm.js:3146 Zt @ vue.runtime.esm.js:3065 Promise.then (async) jt @ vue.runtime.esm.js:3090 zt @ vue.runtime.esm.js:3155 vn @ vue.runtime.esm.js:4207 e.update @ vue.runtime.esm.js:3513 e.notify @ vue.runtime.esm.js:720 set @ vue.runtime.esm.js:963 Be @ vue.runtime.esm.js:988 removeFilesFromFace @ faces.js:94 (anonymous) @ vuex.esm.js:844 (anonymous) @ vuex.esm.js:466 (anonymous) @ vuex.esm.js:465 p._withCommit @ vuex.esm.js:624 p.commit @ vuex.esm.js:464 commit @ vuex.esm.js:409 (anonymous) @ faces.js:140 await in (anonymous) (async) moveFilesToFace @ faces.js:128 (anonymous) @ vuex.esm.js:851 p.dispatch @ vuex.esm.js:516 dispatch @ vuex.esm.js:406 C.forEach.n. @ vuex.esm.js:1064 handleMove @ FaceContent.vue:369 select @ FaceContent.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Mt @ vue.runtime.esm.js:3017 e.$emit @ vue.runtime.esm.js:3716 handleSelect @ FaceMergeForm.vue:80 click @ FaceMergeForm.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Mt @ vue.runtime.esm.js:3017 e.$emit @ vue.runtime.esm.js:3716 click @ FaceCover.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 i._wrapper @ vue.runtime.esm.js:7473 Show 33 more frames Show less faces.js:134

   MOVE https://mydomain.com/remote.php/dav/recognize/user1/faces/user2/7939-20220617-190144093.jpg 500 (Internal Server Error)

(anonymous) @ xhr.js:220 e.exports @ xhr.js:16 e.exports @ dispatchRequest.js:56 d.request @ Axios.js:109 (anonymous) @ bind.js:9 (anonymous) @ functions.js:21 e.execute @ patcher.js:100 e.patchInline @ patcher.js:199 u @ request.js:13 t.request @ request.js:56 (anonymous) @ moveFile.js:58 (anonymous) @ moveFile.js:33 (anonymous) @ moveFile.js:14 (anonymous) @ moveFile.js:8 r @ moveFile.js:4 t.moveFile @ moveFile.js:46 moveFile @ factory.js:74 (anonymous) @ faces.js:134 await in (anonymous) (async) moveFilesToFace @ faces.js:128 (anonymous) @ vuex.esm.js:851 p.dispatch @ vuex.esm.js:516 dispatch @ vuex.esm.js:406 C.forEach.n. @ vuex.esm.js:1064 handleMove @ FaceContent.vue:369 select @ FaceContent.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Mt @ vue.runtime.esm.js:3017 e.$emit @ vue.runtime.esm.js:3716 handleSelect @ FaceMergeForm.vue:80 click @ FaceMergeForm.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Mt @ vue.runtime.esm.js:3017 e.$emit @ vue.runtime.esm.js:3716 click @ FaceCover.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 i._wrapper @ vue.runtime.esm.js:7473 Show 32 more frames Show less faces.js:143 [ERROR] photos: Failed to move 7939-20220617-190144093.jpg to person user3. {app: 'photos', uid: 'user1', level: 2, error: Error: Invalid response: 500 Internal Server Error at i (https://mydomain.com} value @ ConsoleLogger.js:59 value @ ConsoleLogger.js:85 (anonymous) @ faces.js:143 await in (anonymous) (async) moveFilesToFace @ faces.js:128 (anonymous) @ vuex.esm.js:851 p.dispatch @ vuex.esm.js:516 dispatch @ vuex.esm.js:406 C.forEach.n. @ vuex.esm.js:1064 handleMove @ FaceContent.vue:369 select @ FaceContent.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Mt @ vue.runtime.esm.js:3017 e.$emit @ vue.runtime.esm.js:3716 handleSelect @ FaceMergeForm.vue:80 click @ FaceMergeForm.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Mt @ vue.runtime.esm.js:3017 e.$emit @ vue.runtime.esm.js:3716 click @ FaceCover.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 i._wrapper @ vue.runtime.esm.js:7473 Show 17 more frames Show less FaceContent.vue:372 [ERROR] photos: Error: Invalid response: 500 Internal Server Error {app: 'photos', uid: 'user1', level: 2} value @ ConsoleLogger.js:59 value @ ConsoleLogger.js:85 handleMove @ FaceContent.vue:372 await in handleMove (async) select @ FaceContent.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Mt @ vue.runtime.esm.js:3017 e.$emit @ vue.runtime.esm.js:3716 handleSelect @ FaceMergeForm.vue:80 click @ FaceMergeForm.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Mt @ vue.runtime.esm.js:3017 e.$emit @ vue.runtime.esm.js:3716 click @ FaceCover.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 i._wrapper @ vue.runtime.esm.js:7473 Show 13 more frames Show less faces.js:134

   MOVE https://mydomain.com/remote.php/dav/recognize/user1/faces/user2/7939-20220617-190144093.jpg 500 (Internal Server Error)

(anonymous) @ xhr.js:220 e.exports @ xhr.js:16 e.exports @ dispatchRequest.js:56 d.request @ Axios.js:109 (anonymous) @ bind.js:9 (anonymous) @ functions.js:21 e.execute @ patcher.js:100 e.patchInline @ patcher.js:199 u @ request.js:13 t.request @ request.js:56 (anonymous) @ moveFile.js:58 (anonymous) @ moveFile.js:33 (anonymous) @ moveFile.js:14 (anonymous) @ moveFile.js:8 r @ moveFile.js:4 t.moveFile @ moveFile.js:46 moveFile @ factory.js:74 (anonymous) @ faces.js:134 await in (anonymous) (async) moveFilesToFace @ faces.js:128 (anonymous) @ vuex.esm.js:851 p.dispatch @ vuex.esm.js:516 dispatch @ vuex.esm.js:406 C.forEach.n. @ vuex.esm.js:1064 handleMove @ FaceContent.vue:369 select @ FaceContent.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Mt @ vue.runtime.esm.js:3017 e.$emit @ vue.runtime.esm.js:3716 handleSelect @ FaceMergeForm.vue:80 click @ FaceMergeForm.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Mt @ vue.runtime.esm.js:3017 e.$emit @ vue.runtime.esm.js:3716 click @ FaceCover.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 i._wrapper @ vue.runtime.esm.js:7473 Show 32 more frames Show less faces.js:143 [ERROR] photos: Failed to move 7939-20220617-190144093.jpg to person user3. {app: 'photos', uid: 'user1', level: 2, error: Error: Invalid response: 500 Internal Server Error at i (https://mydomain.com} value @ ConsoleLogger.js:59 value @ ConsoleLogger.js:85 (anonymous) @ faces.js:143 await in (anonymous) (async) moveFilesToFace @ faces.js:128 (anonymous) @ vuex.esm.js:851 p.dispatch @ vuex.esm.js:516 dispatch @ vuex.esm.js:406 C.forEach.n. @ vuex.esm.js:1064 handleMove @ FaceContent.vue:369 select @ FaceContent.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Mt @ vue.runtime.esm.js:3017 e.$emit @ vue.runtime.esm.js:3716 handleSelect @ FaceMergeForm.vue:80 click @ FaceMergeForm.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 Mt @ vue.runtime.esm.js:3017 e.$emit @ vue.runtime.esm.js:3716 click @ FaceCover.vue:1 Mt @ vue.runtime.esm.js:3017 n @ vue.runtime.esm.js:1815 i._wrapper @ vue.runtime.esm.js:7473 Show 17 more frames Show less FaceContent.vue:372 [ERROR] photos: Error: Invalid response: 500 Internal Server Error {app: 'photos', uid: 'user1', level: 2}

github-actions[bot] commented 10 months ago

Hello :wave:

Thank you for taking the time to open this issue with recognize. I know it's frustrating when software causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at and if possible solved. I try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it. Until then, please be patient. Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can collaborate to make this software better. For everyone. Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and try to fix the odd bug yourself. Everyone will be thankful for extra helping hands! One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum, to twitter or somewhere else. But this is a technical issue tracker, so please make sure to focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)

I look forward to working with you on this issue Cheers :blue_heart:

andypmuc commented 10 months ago

OK, now I have one picture marked and he tells me moving of many pictures failed, it would seem it had something to do with clearing / updateing the content after the action before.

andypmuc commented 10 months ago

Might be the same as https://github.com/nextcloud/recognize/issues/1058