[solved] Recognize App: Classifier process error - bug? how to analyse?

Hi,

I get only an error message from the recognize app:

{"reqId":"guZOlhyPbpHQstqAAqeM","level":3,"time":"2023-03-16T17:05:05+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job (class: OCA\\Recognize\\BackgroundJobs\\ClassifyMusicnnJob, arguments: Array\n(\n    [storageId] => 3\n    [rootId] => 437\n)\n)","userAgent":"--","version":"25.0.4.1","exception":{"Exception":"RuntimeException","Message":"Classifier process error","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/recognize/lib/Classifiers/Audio/MusicnnClassifier.php","line":46,"function":"classifyFiles","class":"OCA\\Recognize\\Classifiers\\Classifier","type":"->"},{"file":"/var/www/nextcloud/apps/recognize/lib/BackgroundJobs/ClassifyMusicnnJob.php","line":43,"function":"classify","class":"OCA\\Recognize\\Classifiers\\Audio\\MusicnnClassifier","type":"->"},{"file":"/var/www/nextcloud/apps/recognize/lib/BackgroundJobs/ClassifierJob.php","line":70,"function":"classify","class":"OCA\\Recognize\\BackgroundJobs\\ClassifyMusicnnJob","type":"->"},{"file":"/var/www/nextcloud/apps/recognize/lib/BackgroundJobs/ClassifyMusicnnJob.php","line":35,"function":"runClassifier","class":"OCA\\Recognize\\BackgroundJobs\\ClassifierJob","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\Recognize\\BackgroundJobs\\ClassifyMusicnnJob","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/apps/recognize/lib/Classifiers/Classifier.php","Line":211,"message":"Error while running background job (class: OCA\\Recognize\\BackgroundJobs\\ClassifyMusicnnJob, arguments: Array\n(\n    [storageId] => 3\n    [rootId] => 437\n)\n)","exception":{},"CustomMessage":"Error while running background job (class: OCA\\Recognize\\BackgroundJobs\\ClassifyMusicnnJob, arguments: Array\n(\n    [storageId] => 3\n    [rootId] => 437\n)\n)"}}
{"reqId":"4gIP6fimZpG2lcQhe795","level":2,"time":"2023-03-16T17:08:18+00:00","remoteAddr":"","user":"--","app":"recognize","method":"","url":"--","message":"Classifier process output: ","userAgent":"--","version":"25.0.4.1","data":{"app":"recognize"}}

same on command line:

d$ sudo -u www-data php occ recognize:classify
Processing storage 1 with root ID 2
generating preview of 3 with dimension 1024
Copying 3 preview to tempfolder
generating preview of 8 with dimension 1024
Copying 8 preview to tempfolder
generating preview of 9 with dimension 1024
Copying 9 preview to tempfolder
generating preview of 10 with dimension 1024
Copying 10 preview to tempfolder
generating preview of 11 with dimension 1024
Copying 11 preview to tempfolder
generating preview of 12 with dimension 1024
Copying 12 preview to tempfolder
generating preview of 15 with dimension 1024
Copying 15 preview to tempfolder
generating preview of 16 with dimension 1024
Copying 16 preview to tempfolder
generating preview of 379 with dimension 1024
Copying 379 preview to tempfolder
Classifying array (
  0 => '/tmp/oc_tmp_L4CCQ2-.jpg',
  1 => '/tmp/oc_tmp_1NrAk1-.jpg',
  2 => '/tmp/oc_tmp_T4wkLd-.jpg',
  3 => '/tmp/oc_tmp_GoLoGX-.jpg',
  4 => '/tmp/oc_tmp_X6nkTj-.jpg',
  5 => '/tmp/oc_tmp_1oy7d3-.jpg',
  6 => '/tmp/oc_tmp_xw2Foe-.jpg',
  7 => '/tmp/oc_tmp_MCMRHm-.jpg',
  8 => '/tmp/oc_tmp_RxPtEf-.jpg',
)
Running array (
  0 => '/bin/node',
  1 => '/var/www/nextcloud/apps/recognize/src/classifier_imagenet.js',
  2 => '-',
)
Classifier process output:

In Classifier.php line 211:

  Classifier process error


recognize:classify

what can I do?

looks all ok in admin gui
no change after today’s update to version 3.6.3

kind regards
Christoph

found the problem & solution myself: issue was, that my processor did not support AVX instructions. (it was a Pentium G4400T )
however, seems to be a bug in the App not recognizing correctly that this processor may not run tensorflow native…

Hi @chris99 can you please discribe the solution. What did you change?

I changed the processor in my computer (into an intel core i7 6700) which is capable of the AVX instruction set…

this is the worst solution. Today I updated to 4.0.1 and the error is no longer present for me.

I resolved this problem by:
sudo chmod +x /var/www/nextcloud/apps/recognize/bin/node