Recognize apps does not work, with nothing useful in the logs

I have installed Recognize as a part of installing Memories, but it does not recognize anything (there is nothing under Face recognition in the Recognize section of Settings.

I have checked the first three Image tagging options Under Administration/Recognize, but it shows the following status (even after more than a day):

The app is installed and will automatically classify up to 100 files every 30 minutes.
An error occurred during image processing, please check the Nextcloud logs.
Processed files: 0
Unrecognized files: 0 

Unfortunately, the only related things in the logs are two empty warnings, like this:

[recognize] Warning:  
at 2023-03-04T22:17:16+00:00

I am running NC 24.0.9 in a docker container from linuxserver. It runs on an HP microserver running x64 Debian.

Two more observations in Administration/Recognize settings:

  • In * Tensorflow plain mode* subsection, the Checking CPU just spins round
  • Node.js path was originally /config/www/nextcloud/apps/recognize/bin//node, i.e., with two slashes before node. However, removing the slash did not help.

Anything I can do to make this work?

It’s not entirely self-evident, but you’ll want to use recognize version 3 which only supports (and is only available on) nextcloud 25+.

1 Like

Thanks. I have now upgraded NC to 25, but installation of Recognize fails for me due to timeout while downloading node.js.
I have already increased timeout in lib/private/Installer.php (from 120 to 900 seconds), which allowed me to download Recognize in the first place, but now I am hitting 300 s timeout while downloading node.js - and I cannot find where to change this one. Can you help?
(I see in the logs that it downloads just over 50% of the library, before it gets killed after exactly 300 seconds - I must admit I find it weird, why should it time out, as long as the download is continuing, albeit slowly? … This goes for the one in lib/private/Installer.php as well…)

Downloading large apps like recognize via the Nextcloud web interface is error-prone. I recommend using occ app:install recognize on the command line.

This does not help, get exactly the same error again:

[recognize] Error: GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 300000 milliseconds with 18792178 out of 34958062 bytes received (see for at <<closure>>

 0. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 158
 1. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 110
 2. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php line 47
 3. /config/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php line 146
 4. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php line 35
    OC\Http\Client\DnsPinMiddleware->OC\Http\Client\{closure}("*** sensitive parameters replaced ***")
 5. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 31
 6. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php line 71
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
 7. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 63
 8. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php line 75
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
 9. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 331
10. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 168
11. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 187
12. /config/www/nextcloud/lib/private/Http/Client/Client.php line 218
13. /config/www/nextcloud/apps/recognize/lib/Migration/InstallDeps.php line 230
14. /config/www/nextcloud/apps/recognize/lib/Migration/InstallDeps.php line 105
15. /config/www/nextcloud/apps/recognize/lib/Migration/InstallDeps.php line 80
16. /config/www/nextcloud/lib/private/Repair.php line 127
17. /config/www/nextcloud/lib/private/legacy/OC_App.php line 1068
18. /config/www/nextcloud/lib/private/Installer.php line 164
19. /config/www/nextcloud/core/Command/App/Install.php line 81
20. /config/www/nextcloud/3rdparty/symfony/console/Command/Command.php line 255
21. /config/www/nextcloud/3rdparty/symfony/console/Application.php line 1009
22. /config/www/nextcloud/3rdparty/symfony/console/Application.php line 273
23. /config/www/nextcloud/3rdparty/symfony/console/Application.php line 149
24. /config/www/nextcloud/lib/private/Console/Application.php line 213
25. /config/www/nextcloud/console.php line 100
26. /config/www/nextcloud/occ line 11

at 2023-03-07T17:53:01+00:00

I see. 5mins is already a long time, IMO, but we can set the timeout higher in the code. I’ll look into it :slight_smile:

Is it something I can change myself, if you tell me where?

Yup, here you go: recognize/InstallDeps.php at main · nextcloud/recognize · GitHub

I am not sure what you wanted me to do/try, but I changed the timeout in my local copy and then selected Enable in the App settings of NC GUI … and now I can see Recognize as installed, there is no error in the log from the time it was running, and the Recognize settings now includes: “The app is installed and will automatically classify files in background processes.
All the other statuses are still as warnings (Including “The machine learning models still need to be downloaded.”), but I guess this is to be expected? I will now wait and see what changes overnight…

Update: after 24 hours, all the warnings are still there. I also run occ recognize:download-models, without any effect. There is nothing in the NC log from today…

I have now managed to get my internet fixed, so I removed Recognize and installed it again from scratch.
Now the status of the app is all green and I have a “People” section under “Photos” - the only problem now is that the grouping looks completely random, but that is a different question.
Anyway, thanks for the help

Hi @marcelklehr,

I’m having trouble with downloading the models from github. The models are around 1GB and the downloadspeed from Github is ~500kB. So it will take ~45min for downloading but after ~25min the connection is closed every time. Is it possible to download the models via Browser and then integrate them in another way?