matiasdelellis / facerecognition

Nextcloud app that implement a basic facial recognition system.
GNU Affero General Public License v3.0
524 stars 47 forks source link

no persons tab in sidebar #447

Closed obelix05 closed 3 years ago

obelix05 commented 3 years ago

Expected behaviour

I want to see the persons tab in the sidebar as described in the documentation Link. I'm sure that the face is detected because I clicked on the face in the Face Recognition tab.

Actual behaviour

No persons tab available :-/.

Steps to reproduce

  1. Finish the face recognition process
  2. Click on a recognized face
  3. Jump to the picture in the files view and open the sidebar

Server configuration

Client configuration

Logs

Background task log with debug.

docker exec -it -u www-data nextcloud ./occ -vvv face:background_job ``` 1/10 - Executing task CheckRequirementsTask (Check all requirements) System: Linux System memory: 8156807168 PHP Memory Limit: 4294967296 2/10 - Executing task CheckCronTask (Check that service is started from either c ron or from command) 3/10 - Executing task LockTask (Acquire lock so that only one background task ca n run) 4/10 - Executing task DisabledUserRemovalTask (Purge all the information of a us er when disable the analysis.) yielding yielding yielding 5/10 - Executing task StaleImagesRemovalTask (Crawl for stale images (either mis sing in filesystem or under .nomedia) and remove them from DB) Skipping stale images removal for user USER2 as there is no need for it Skipping stale images removal for user admin as there is no need for it Skipping stale images removal for user USER1 as there is no need for it 6/10 - Executing task CreateClustersTask (Create new persons or update existing persons) Skipping cluster creation, not enough data (yet) collected. For cluster creation, you need either one of the following: * have 1000 faces already processed * or you need to have 95% of you images processed Use stats command to track progress yielding Skipping cluster creation, not enough data (yet) collected. For cluster creation, you need either one of the following: * have 1000 faces already processed * or you need to have 95% of you images processed Use stats command to track progress yielding Found 16 faces without associated persons for user USER1 and model 1 Oldest face without persons for user USER1 and model 1 is from 2021-0 3-22 14:31:54 Clusters already exist, estimated there is no need to recreate them yielding 7/10 - Executing task AddMissingImagesTask (Crawl for missing images for each us er and insert them in DB) Skipping full image scan for user USER2 Skipping image scan for user admin that has disabled the analysis Skipping full image scan for user USER1 8/10 - Executing task EnumerateImagesMissingFacesTask (Find all images which don 't have faces generated for them) yielding 9/10 - Executing task ImageProcessingTask (Process all images to extract faces) NOTE: Starting face recognition. If you experience random crashes after this point, please look FAQ at https://github.com/matiasdelellis/facerecognition /wiki/FAQ 10/10 - Executing task UnlockTask (Release obtained lock) ```

Browser log

Browser log ``` Browser log too long for issue body... ```
matiasdelellis commented 3 years ago

Hi @obelix05 I understand that this is working correctly. Can you see the original nextcloud tabs??? For example the sharing tab?

Can you check which version you have installed? and probably the browser and nextcloud logs would be useful here!. See that.. :wink:

obelix05 commented 3 years ago

Hi. Yes I can see the original tabs there. But the persons tab is missing. I have 0.7.2 installed. In the Nextcloud log was nothing interesting, but I will share them. How can I create a good browser log? I used the chrome developer tools and try to copy paste the output of the log. Is this the correct way?

matiasdelellis commented 3 years ago

I used the chrome developer tools and try to copy paste the output of the log. Is this the correct way?

Yes.. At least copy what seems relevant to you.. :thinking:

obelix05 commented 3 years ago

Ok, so here is the nexcloud.log:

Nextcloud log ``` {"reqId":"I0xSMBudAG0yX7aOLa8G","level":2,"time":"2021-03-23T05:51:31+00:00","remoteAddr":"192.168.0.123","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":""} {"reqId":"I0xSMBudAG0yX7aOLa8G","level":2,"time":"2021-03-23T05:51:31+00:00","remoteAddr":"192.168.0.123","user":"--","app":"no app in context","method":"GET","url":"/","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":""} {"reqId":"k8B4M2tpyHGoruUZ9HLo","level":2,"time":"2021-03-23T05:51:50+00:00","remoteAddr":"192.168.0.123","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":""} {"reqId":"k8B4M2tpyHGoruUZ9HLo","level":2,"time":"2021-03-23T05:51:50+00:00","remoteAddr":"192.168.0.123","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":""} {"reqId":"rD1WmCQC5W8aEKrpcgxV","level":2,"time":"2021-03-23T07:31:39+00:00","remoteAddr":"192.168.0.123","user":"--","app":"no app in context","method":"POST","url":"/login","message":"Login failed: USER1 (Remote IP: 192.168.0.123)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":"20.0.8.1"} ```

and the (from my point of view) relevant browser logs

Browser log ``` Some messages have been moved to the Issues panel. Viewer.vue:217 Please do NOT wait for the DOMContentLoaded before registering your viewer handler handlers @ Viewer.vue:217 fr.run @ vue.runtime.esm.js:4568 cr @ vue.runtime.esm.js:4310 (anonymous) @ vue.runtime.esm.js:1980 Xe @ vue.runtime.esm.js:1906 Promise.then (async) Ye @ vue.runtime.esm.js:1933 tt @ vue.runtime.esm.js:1990 (anonymous) @ vue.runtime.esm.js:4402 fr.update @ vue.runtime.esm.js:4544 le.notify @ vue.runtime.esm.js:730 (anonymous) @ vue.runtime.esm.js:882 value @ Viewer.js:78 (anonymous) @ main.js:26 xhr.js:177 GET http://192.168.0.234:6001/ocs/v2.php/apps/text/workspace?path=%2FPhotos%2F2013%2F02 404 (Not Found) (anonymous) @ xhr.js:177 e.exports @ xhr.js:13 e.exports @ dispatchRequest.js:50 Promise.then (async) c.request @ Axios.js:61 r.forEach.c. @ Axios.js:76 (anonymous) @ bind.js:9 getFileInfo @ RichWorkspace.vue:132 (anonymous) @ RichWorkspace.vue:102 l @ runtime.js:63 (anonymous) @ runtime.js:293 (anonymous) @ runtime.js:118 s @ files.js?v=1db2adbb-0:1 a @ files.js?v=1db2adbb-0:1 (anonymous) @ files.js?v=1db2adbb-0:1 (anonymous) @ files.js?v=1db2adbb-0:1 mounted @ files.js?v=1db2adbb-0:1 ze @ vue.esm.js:1863 nn @ vue.esm.js:4228 (anonymous) @ vue.esm.js:4095 An.$mount @ vue.esm.js:9063 An.$mount @ vue.esm.js:11974 (anonymous) @ files.js:161 Promise.then (async) render @ files.js:150 (anonymous) @ merged-index.js?v=1db2adbb-0:4363 setTimeout (async) (anonymous) @ merged-index.js?v=1db2adbb-0:4362 initHeadersAndFooters @ merged-index.js?v=1db2adbb-0:4353 initialize @ merged-index.js?v=1db2adbb-0:4341 FileList @ merged-index.js?v=1db2adbb-0:3934 initialize @ merged-index.js?v=1db2adbb-0:82 (anonymous) @ merged-index.js?v=1db2adbb-0:363 (anonymous) @ delay.js:7 setTimeout (async) (anonymous) @ delay.js:6 (anonymous) @ restArguments.js:18 He @ _executeBound.js:8 i @ partial.js:18 (anonymous) @ merged-index.js?v=1db2adbb-0:362 ```

If I try to call the url from the log directly I get a "Access forbidden - CSRF check failed" error page and the response:

JSON Response ``` {"ocs":{"meta":{"status":"failure","statuscode":404,"message":null},"data":{"message":"No workspace file found","folder":{"permissions":23}}}} ```

Could that be the problem?

obelix05 commented 3 years ago

btw: It is also not possible for me to search for recognized persons with the search functionality

obelix05 commented 3 years ago

The "no workspace file found" errors seems to be related to the Text-App (nextcloud/text #820). After disabling the App the error no longer occurs. So back to the start :-/ I have set a breakpoint in the chrome developer extension at personssidebar.js but it seems well executed. While debugging I have noticed the following errors, but I'm not sure if they are related to the persons tab.

Browser log ``` "SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at c.transformResponse (https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:115189) at https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:142476 at Object.u [as forEach] (https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:2999) at e.exports (https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:142451) at https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:142185" "TypeError: Failed to construct 'URL': Invalid URL at isIconUrl (https://mynextcloud.com/apps/files_sharing/js/dist/files_sharing_tab.js?v=01208990-6:1:370192) at mn.get (https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:32385) at mn.evaluate (https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:33535) at i.isIconUrl (https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:35444) at i. (https://mynextcloud.com/apps/files_sharing/js/dist/files_sharing_tab.js?v=01208990-6:1:364911) at i.e._render (https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:41071) at i.r (https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:70216) at mn.get (https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:32385) at new mn (https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:32303) at e (https://mynextcloud.com/apps/files/js/dist/sidebar.js?v=01208990-6:1:70230) ```

In addition, I would like to mention, that I use Caddy v2 as proxy. The configuration looks like:

Caddyfile ``` mynextcloud.com { reverse_proxy 192.168.0.234:6001 header / { Strict-Transport-Security "max-age=31536000; includeSubdomains" Referrer-Policy "same-origin" Permissions-Policy "geolocation=(self), microphone=(), camera=(), payment=(), speaker=(), usb=(), battery=()" X-Content-Type-Options nosniff } redir /.well-known/carddav /remote.php/dav 301 redir /.well-known/caldav /remote.php/dav 301 # .htaccess / data / config / ... shouldn't be accessible from outside @forbidden { path /.htaccess path /data/* path /config/* path /db_structure path /.xml path /README path /3rdparty/* path /lib/* path /templates/* path /occ path /console.php } respond @forbidden 404 } ```
obelix05 commented 3 years ago

Any ideas?

matiasdelellis commented 3 years ago

Hi @obelix05 No, and it is very rare that no one else has reported it. :disappointed:

You can create me a test user in your nextcloud instance and send me the credentials to mati86dl at gmail com? With administrator permissions just to be able to evaluate the logs. :thinking:

matiasdelellis commented 3 years ago

I close it because according to what we saw in private it was an installation problem. :grinning:

nightscorpio commented 10 months ago

May I ask what kind of problem is that? I seem have the same problem. I don't see persons tab in the sidebar.

I am using Nextcloud 27.1.4 Docker image.

Face recognition and model 4 are installed, and in settings the job is running.