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
556 stars 46 forks source link

Not working after nextcloud 27 + PHP8.2.7 upgrade #909

Closed zmarteline closed 1 year ago

zmarteline commented 1 year ago

Which version of recognize are you using?

4.2.0

Enabled Modes

Face recognition

TensorFlow mode

Normal mode

Which Nextcloud version do you have installed?

27.0.0

Which Operating system do you have installed?

Debian 11

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

-

How much RAM does your server have?

8Gb

What processor Architecture does your CPU have?

x86_64

Describe the Bug

Recognition does not start. Tell me to check the log.

If I use the console for 'occ recognize:classify' it returns:

Error: Cannot find module 'fs/promises'

occ recognize:recrawl just add filest to recognize stack, but don't start.

Expected Behavior

Recognition working without errors.

To Reproduce

USE mine nc and php versions and install Recognition from scratch.

Debug log

CONSOLE LOG:

root@nextcloud ~# php -v PHP 8.2.7 (cli) (built: Jun 9 2023 07:37:35) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.7, Copyright (c) Zend Technologies with Zend OPcache v8.2.7, Copyright (c), by Zend Technologies root@nextcloud ~# node --version v18.16.1 root@nextcloud ~# sudo -u www-data php /var/www/nextcloud/occ recognize:reset-faces root@nextcloud ~# sudo -u www-data php /var/www/nextcloud/occ recognize:cleanup-tags root@nextcloud ~# sudo -u www-data php /var/www/nextcloud/occ recognize:reset-tags root@nextcloud ~# sudo -u www-data php /var/www/nextcloud/occ recognize:remove-legacy-tags root@nextcloud ~# sudo -u www-data php /var/www/nextcloud/occ recognize:classify Processing storage 1 with root ID 2 generating preview of 30335 with dimension 1024 Copying 30335 preview to tempfolder generating preview of 30337 with dimension 1024 Copying 30337 preview to tempfolder generating preview of 385208 with dimension 1024 Copying 385208 preview to tempfolder generating preview of 385214 with dimension 1024 Copying 385214 preview to tempfolder generating preview of 385285 with dimension 1024 Copying 385285 preview to tempfolder generating preview of 390260 with dimension 1024 Copying 390260 preview to tempfolder generating preview of 390261 with dimension 1024 Copying 390261 preview to tempfolder generating preview of 390568 with dimension 1024 Copying 390568 preview to tempfolder Classifying array ( 0 => '/tmp/oc_tmp_c6KTUr-.jpg', 1 => '/tmp/oc_tmp_uIoCct-.jpg', 2 => '/tmp/oc_tmp_OLa3wp-.jpg', 3 => '/tmp/oc_tmp_zoMY4r-.jpg', 4 => '/tmp/oc_tmp_lre7Pp-.jpg', 5 => '/tmp/oc_tmp_mF9Ebs-.jpg', 6 => '/tmp/oc_tmp_0iFStp-.jpg', 7 => '/tmp/oc_tmp_h8L3ft-.jpg', ) Running array ( 0 => '/usr/bin/node', 1 => '/var/www/nextcloud/apps/recognize/src/classifier_faces.js', 2 => '-', ) Classifier process output: internal/modules/cjs/loader.js:818 throw err; ^

Error: Cannot find module 'fs/promises' Require stack:

Classifier process output: internal/modules/cjs/loader.js:818 throw err; ^

Error: Cannot find module 'fs/promises' Require stack:

In Classifier.php line 208:

Classifier process error

recognize:classify

zmarteline commented 1 year ago

Fixed after replace node file at /usr/bin/node with the one at /usr/local/bin/node.