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 https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://unofficial-builds.nodejs.org/download/release/v14.18.2/node-v14.18.2-linux-x64-musl.tar.gz at <<closure>>

 0. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 158
    GuzzleHttp\Handler\CurlFactory::createRejection()
 1. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 110
    GuzzleHttp\Handler\CurlFactory::finishError()
 2. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php line 47
    GuzzleHttp\Handler\CurlFactory::finish()
 3. /config/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php line 146
    GuzzleHttp\Handler\CurlHandler->__invoke()
 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
    GuzzleHttp\PrepareBodyMiddleware->__invoke()
 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
    GuzzleHttp\RedirectMiddleware->__invoke()
 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
    GuzzleHttp\HandlerStack->__invoke()
10. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 168
    GuzzleHttp\Client->transfer()
11. /config/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 187
    GuzzleHttp\Client->requestAsync()
12. /config/www/nextcloud/lib/private/Http/Client/Client.php line 218
    GuzzleHttp\Client->request()
13. /config/www/nextcloud/apps/recognize/lib/Migration/InstallDeps.php line 230
    OC\Http\Client\Client->get()
14. /config/www/nextcloud/apps/recognize/lib/Migration/InstallDeps.php line 105
    OCA\Recognize\Migration\InstallDeps->downloadNodeBinary()
15. /config/www/nextcloud/apps/recognize/lib/Migration/InstallDeps.php line 80
    OCA\Recognize\Migration\InstallDeps->installNodeBinary()
16. /config/www/nextcloud/lib/private/Repair.php line 127
    OCA\Recognize\Migration\InstallDeps->run()
17. /config/www/nextcloud/lib/private/legacy/OC_App.php line 1068
    OC\Repair->run()
18. /config/www/nextcloud/lib/private/Installer.php line 164
    OC_App::executeRepairSteps()
19. /config/www/nextcloud/core/Command/App/Install.php line 81
    OC\Installer->installApp()
20. /config/www/nextcloud/3rdparty/symfony/console/Command/Command.php line 255
    OC\Core\Command\App\Install->execute()
21. /config/www/nextcloud/3rdparty/symfony/console/Application.php line 1009
    Symfony\Component\Console\Command\Command->run()
22. /config/www/nextcloud/3rdparty/symfony/console/Application.php line 273
    Symfony\Component\Console\Application->doRunCommand()
23. /config/www/nextcloud/3rdparty/symfony/console/Application.php line 149
    Symfony\Component\Console\Application->doRun()
24. /config/www/nextcloud/lib/private/Console/Application.php line 213
    Symfony\Component\Console\Application->run()
25. /config/www/nextcloud/console.php line 100
    OC\Console\Application->run()
26. /config/www/nextcloud/occ line 11
    require_once("/config/www/nextcloud/console.php")

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:

Thanks.
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?