matiasdelellis / facerecognition

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

Error: Call to a member function getTimestamp() on string in /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php:232 #781

Open mrmipo opened 4 days ago

mrmipo commented 4 days ago

Hi

From yesterday clustering stop working. Probably it stop working after upgrade Nextcloud AIO to 9.7.0 (nextcloud 29.0.8.1).

Expected behaviour

After executing occ face:background_job --defer-clustering -vvv

new face should be associated with persons but it finish with error.

Actual behaviour

Found 14 faces without associated persons for user mipo and model 5 An unhandled exception has been thrown: Error: Call to a member function getTimestamp() on string in /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php:232

Steps to reproduce

  1. upload new image
  2. run: occ face:background_job --defer-clustering -vvv

Server configuration

Logs

Background task log with debug.

sudo -u apache php occ -vvv face:background_job ``` 1/8 - Executing task CheckRequirementsTask (Check all requirements) System: Linux System memory: 33503440896 PHP Memory Limit: 8589934592 Clustering backend: PHP (Not recommended.) Image Backend: Imaginary Imaginary version: dev 2/8 - Executing task CheckCronTask (Check that service is started from either cron or from command) 3/8 - Executing task DisabledUserRemovalTask (Purge all the information of a user when disable the analysis.) yielding yielding yielding yielding yielding yielding 4/8 - Executing task StaleImagesRemovalTask (Crawl for stale images (either missing in filesystem or under .nomedia) and remove them from DB) Skipping stale images removal for user admin as there is no need for it Skipping stale images removal for user maja as there is no need for it Skipping stale images removal for user ola as there is no need for it Skipping stale images removal for user tomek as there is no need for it Skipping stale images removal for user jsemaniuk as there is no need for it Skipping stale images removal for user mipo as there is no need for it 5/8 - 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 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 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 14 faces without associated persons for user mipo and model 5 An unhandled exception has been thrown: Error: Call to a member function getTimestamp() on string in /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php:232 Stack trace: #0 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php(108): OCA\FaceRecognition\BackgroundJob\Tasks\CreateClustersTask->hasNewFacesToRecreate('mipo', 5) #1 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php(90): OCA\FaceRecognition\BackgroundJob\Tasks\CreateClustersTask->createClusterIfNeeded('mipo') #2 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/BackgroundService.php(150): OCA\FaceRecognition\BackgroundJob\Tasks\CreateClustersTask->execute(Object(OCA\FaceRecognition\BackgroundJob\FaceRecognitionContext)) #3 /var/www/html/custom_apps/facerecognition/lib/Command/BackgroundCommand.php(192): OCA\FaceRecognition\BackgroundJob\BackgroundService->execute(0, true, NULL, NULL, 'default-mode') #4 /var/www/html/3rdparty/symfony/console/Command/Command.php(298): OCA\FaceRecognition\Command\BackgroundCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #5 /var/www/html/3rdparty/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #6 /var/www/html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FaceRecognition\Command\BackgroundCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #7 /var/www/html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #8 /var/www/html/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #9 /var/www/html/console.php(102): OC\Console\Application->run() #10 /var/www/html/occ(11): require_once('/var/www/html/c...') #11 {main} ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` {"reqId":"CPpliP3adcVSOCBsMoFT","level":3,"time":"2024-10-22T06:34:56+00:00","remoteAddr":"172.16.0.1","user":"mipo","app":"index","method":"GET","url":"/apps/facerecognition/face/177365/thumb/128","message":"OCP\\AppFramework\\Http\\DataDisplayResponse::__construct(): Argument #1 ($data) must be of type string, null given, called in /var/www/html/custom_apps/facerecognition/lib/Controller/FaceController.php on line 130 in file '/var/www/html/lib/public/AppFramework/Http/DataDisplayResponse.php' line 52","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36","version":"29.0.8.1","exception":{"Exception":"Exception","Message":"OCP\\AppFramework\\Http\\DataDisplayResponse::__construct(): Argument #1 ($data) must be of type string, null given, called in /var/www/html/custom_apps/facerecognition/lib/Controller/FaceController.php on line 130 in file '/var/www/html/lib/public/AppFramework/Http/DataDisplayResponse.php' line 52","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\FaceController"],"getThumb"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":331,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\FaceRecognition\\Controller\\FaceController","getThumb",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["177365","128","facerecognition.face.getthumb"]]},{"file":"/var/www/html/lib/base.php","line":1058,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/facerecognition/face/177365/thumb/128"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":170,"Previous":{"Exception":"TypeError","Message":"OCP\\AppFramework\\Http\\DataDisplayResponse::__construct(): Argument #1 ($data) must be of type string, null given, called in /var/www/html/custom_apps/facerecognition/lib/Controller/FaceController.php on line 130","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/facerecognition/lib/Controller/FaceController.php","line":130,"function":"__construct","class":"OCP\\AppFramework\\Http\\DataDisplayResponse","type":"->","args":[null,200,[null]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"getThumb","class":"OCA\\FaceRecognition\\Controller\\FaceController","type":"->","args":["177365","128"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\FaceController"],"getThumb"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\FaceController"],"getThumb"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":331,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\FaceRecognition\\Controller\\FaceController","getThumb",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["177365","128","facerecognition.face.getthumb"]]},{"file":"/var/www/html/lib/base.php","line":1058,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/facerecognition/face/177365/thumb/128"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/public/AppFramework/Http/DataDisplayResponse.php","Line":52},"message":"OCP\\AppFramework\\Http\\DataDisplayResponse::__construct(): Argument #1 ($data) must be of type string, null given, called in /var/www/html/custom_apps/facerecognition/lib/Controller/FaceController.php on line 130 in file '/var/www/html/lib/public/AppFramework/Http/DataDisplayResponse.php' line 52","exception":{},"CustomMessage":"OCP\\AppFramework\\Http\\DataDisplayResponse::__construct(): Argument #1 ($data) must be of type string, null given, called in /var/www/html/custom_apps/facerecognition/lib/Controller/FaceController.php on line 130 in file '/var/www/html/lib/public/AppFramework/Http/DataDisplayResponse.php' line 52"}} {"reqId":"2EVnOV1y722EERfCE26m","level":3,"time":"2024-10-22T06:34:58+00:00","remoteAddr":"172.16.0.1","user":"mipo","app":"index","method":"GET","url":"/apps/facerecognition/face/172147/thumb/128","message":"OCP\\AppFramework\\Http\\DataDisplayResponse::__construct(): Argument #1 ($data) must be of type string, null given, called in /var/www/html/custom_apps/facerecognition/lib/Controller/FaceController.php on line 130 in file '/var/www/html/lib/public/AppFramework/Http/DataDisplayResponse.php' line 52","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36","version":"29.0.8.1","exception":{"Exception":"Exception","Message":"OCP\\AppFramework\\Http\\DataDisplayResponse::__construct(): Argument #1 ($data) must be of type string, null given, called in /var/www/html/custom_apps/facerecognition/lib/Controller/FaceController.php on line 130 in file '/var/www/html/lib/public/AppFramework/Http/DataDisplayResponse.php' line 52","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\FaceController"],"getThumb"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":331,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\FaceRecognition\\Controller\\FaceController","getThumb",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["172147","128","facerecognition.face.getthumb"]]},{"file":"/var/www/html/lib/base.php","line":1058,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/facerecognition/face/172147/thumb/128"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":170,"Previous":{"Exception":"TypeError","Message":"OCP\\AppFramework\\Http\\DataDisplayResponse::__construct(): Argument #1 ($data) must be of type string, null given, called in /var/www/html/custom_apps/facerecognition/lib/Controller/FaceController.php on line 130","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/facerecognition/lib/Controller/FaceController.php","line":130,"function":"__construct","class":"OCP\\AppFramework\\Http\\DataDisplayResponse","type":"->","args":[null,200,[null]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"getThumb","class":"OCA\\FaceRecognition\\Controller\\FaceController","type":"->","args":["172147","128"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\FaceController"],"getThumb"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\FaceController"],"getThumb"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":331,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\FaceRecognition\\Controller\\FaceController","getThumb",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["172147","128","facerecognition.face.getthumb"]]},{"file":"/var/www/html/lib/base.php","line":1058,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/facerecognition/face/172147/thumb/128"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/public/AppFramework/Http/DataDisplayResponse.php","Line":52},"message":"OCP\\AppFramework\\Http\\DataDisplayResponse::__construct(): Argument #1 ($data) must be of type string, null given, called in /var/www/html/custom_apps/facerecognition/lib/Controller/FaceController.php on line 130 in file '/var/www/html/lib/public/AppFramework/Http/DataDisplayResponse.php' line 52","exception":{},"CustomMessage":"OCP\\AppFramework\\Http\\DataDisplayResponse::__construct(): Argument #1 ($data) must be of type string, null given, called in /var/www/html/custom_apps/facerecognition/lib/Controller/FaceController.php on line 130 in file '/var/www/html/lib/public/AppFramework/Http/DataDisplayResponse.php' line 52"}} {"reqId":"O9lsUEv80HEuKrny44mY","level":3,"time":"2024-10-22T06:35:48+00:00","remoteAddr":"172.16.0.1","user":"mipo","app":"index","method":"POST","url":"/apps/facerecognition/setappvalue","message":"conflict between new type (mixed) and old type (integer)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36","version":"29.0.8.1","exception":{"Exception":"OCP\\Exceptions\\AppConfigTypeConflictException","Message":"conflict between new type (mixed) and old type (integer)","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppConfig.php","line":1360,"function":"setTypedValue","class":"OC\\AppConfig","type":"->","args":["facerecognition","analysis_image_area","8294400",false,"mixed"]},{"file":"/var/www/html/lib/private/AllConfig.php","line":208,"function":"setValue","class":"OC\\AppConfig","type":"->","args":["facerecognition","analysis_image_area","8294400"]},{"file":"/var/www/html/custom_apps/facerecognition/lib/Service/SettingsService.php","line":282,"function":"setAppValue","class":"OC\\AllConfig","type":"->","args":["facerecognition","analysis_image_area","8294400"]},{"file":"/var/www/html/custom_apps/facerecognition/lib/Controller/SettingsController.php","line":183,"function":"setAnalysisImageArea","class":"OCA\\FaceRecognition\\Service\\SettingsService","type":"->","args":[8294400]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"setAppValue","class":"OCA\\FaceRecognition\\Controller\\SettingsController","type":"->","args":["analysis_image_area","8294400"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\SettingsController"],"setAppValue"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\SettingsController"],"setAppValue"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":331,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\FaceRecognition\\Controller\\SettingsController","setAppValue",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["facerecognition.settings.setappvalue"]]},{"file":"/var/www/html/lib/base.php","line":1058,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/facerecognition/setappvalue"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppConfig.php","Line":823,"message":"conflict between new type (mixed) and old type (integer)","exception":{},"CustomMessage":"conflict between new type (mixed) and old type (integer)"}} {"reqId":"VA53AFYCCOMcALt3r1xV","level":3,"time":"2024-10-22T06:35:51+00:00","remoteAddr":"172.16.0.1","user":"mipo","app":"index","method":"POST","url":"/apps/facerecognition/setappvalue","message":"conflict between new type (mixed) and old type (integer)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36","version":"29.0.8.1","exception":{"Exception":"OCP\\Exceptions\\AppConfigTypeConflictException","Message":"conflict between new type (mixed) and old type (integer)","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppConfig.php","line":1360,"function":"setTypedValue","class":"OC\\AppConfig","type":"->","args":["facerecognition","analysis_image_area","8294400",false,"mixed"]},{"file":"/var/www/html/lib/private/AllConfig.php","line":208,"function":"setValue","class":"OC\\AppConfig","type":"->","args":["facerecognition","analysis_image_area","8294400"]},{"file":"/var/www/html/custom_apps/facerecognition/lib/Service/SettingsService.php","line":282,"function":"setAppValue","class":"OC\\AllConfig","type":"->","args":["facerecognition","analysis_image_area","8294400"]},{"file":"/var/www/html/custom_apps/facerecognition/lib/Controller/SettingsController.php","line":183,"function":"setAnalysisImageArea","class":"OCA\\FaceRecognition\\Service\\SettingsService","type":"->","args":[8294400]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"setAppValue","class":"OCA\\FaceRecognition\\Controller\\SettingsController","type":"->","args":["analysis_image_area","8294400"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\SettingsController"],"setAppValue"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\SettingsController"],"setAppValue"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":331,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\FaceRecognition\\Controller\\SettingsController","setAppValue",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["facerecognition.settings.setappvalue"]]},{"file":"/var/www/html/lib/base.php","line":1058,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/facerecognition/setappvalue"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppConfig.php","Line":823,"message":"conflict between new type (mixed) and old type (integer)","exception":{},"CustomMessage":"conflict between new type (mixed) and old type (integer)"}} {"reqId":"Ey9ZBwvX48UEME7thQAb","level":3,"time":"2024-10-22T06:36:04+00:00","remoteAddr":"172.16.0.1","user":"mipo","app":"index","method":"POST","url":"/apps/facerecognition/setappvalue","message":"conflict between new type (mixed) and old type (integer)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36","version":"29.0.8.1","exception":{"Exception":"OCP\\Exceptions\\AppConfigTypeConflictException","Message":"conflict between new type (mixed) and old type (integer)","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppConfig.php","line":1360,"function":"setTypedValue","class":"OC\\AppConfig","type":"->","args":["facerecognition","analysis_image_area","4354800",false,"mixed"]},{"file":"/var/www/html/lib/private/AllConfig.php","line":208,"function":"setValue","class":"OC\\AppConfig","type":"->","args":["facerecognition","analysis_image_area","4354800"]},{"file":"/var/www/html/custom_apps/facerecognition/lib/Service/SettingsService.php","line":282,"function":"setAppValue","class":"OC\\AllConfig","type":"->","args":["facerecognition","analysis_image_area","4354800"]},{"file":"/var/www/html/custom_apps/facerecognition/lib/Controller/SettingsController.php","line":183,"function":"setAnalysisImageArea","class":"OCA\\FaceRecognition\\Service\\SettingsService","type":"->","args":[4354800]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"setAppValue","class":"OCA\\FaceRecognition\\Controller\\SettingsController","type":"->","args":["analysis_image_area","4354800"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\SettingsController"],"setAppValue"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\SettingsController"],"setAppValue"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":331,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\FaceRecognition\\Controller\\SettingsController","setAppValue",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["facerecognition.settings.setappvalue"]]},{"file":"/var/www/html/lib/base.php","line":1058,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/facerecognition/setappvalue"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppConfig.php","Line":823,"message":"conflict between new type (mixed) and old type (integer)","exception":{},"CustomMessage":"conflict between new type (mixed) and old type (integer)"}} {"reqId":"vCt7XDnntKY6lQx6J4aY","level":3,"time":"2024-10-22T06:36:06+00:00","remoteAddr":"172.16.0.1","user":"mipo","app":"index","method":"POST","url":"/apps/facerecognition/setappvalue","message":"conflict between new type (mixed) and old type (integer)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36","version":"29.0.8.1","exception":{"Exception":"OCP\\Exceptions\\AppConfigTypeConflictException","Message":"conflict between new type (mixed) and old type (integer)","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppConfig.php","line":1360,"function":"setTypedValue","class":"OC\\AppConfig","type":"->","args":["facerecognition","analysis_image_area","4354800",false,"mixed"]},{"file":"/var/www/html/lib/private/AllConfig.php","line":208,"function":"setValue","class":"OC\\AppConfig","type":"->","args":["facerecognition","analysis_image_area","4354800"]},{"file":"/var/www/html/custom_apps/facerecognition/lib/Service/SettingsService.php","line":282,"function":"setAppValue","class":"OC\\AllConfig","type":"->","args":["facerecognition","analysis_image_area","4354800"]},{"file":"/var/www/html/custom_apps/facerecognition/lib/Controller/SettingsController.php","line":183,"function":"setAnalysisImageArea","class":"OCA\\FaceRecognition\\Service\\SettingsService","type":"->","args":[4354800]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"setAppValue","class":"OCA\\FaceRecognition\\Controller\\SettingsController","type":"->","args":["analysis_image_area","4354800"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\SettingsController"],"setAppValue"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\FaceRecognition\\Controller\\SettingsController"],"setAppValue"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":331,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\FaceRecognition\\Controller\\SettingsController","setAppValue",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["facerecognition.settings.setappvalue"]]},{"file":"/var/www/html/lib/base.php","line":1058,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/facerecognition/setappvalue"]},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppConfig.php","Line":823,"message":"conflict between new type (mixed) and old type (integer)","exception":{},"CustomMessage":"conflict between new type (mixed) and old type (integer)"}} ```
nordscan commented 4 days ago

After issue with distance(): Argument #1 ($vector1) must be of type array and Call to undefined function: dlib_vector_length() got it running..

butwhen I started it the second time i got error with Timestamp too :)

An unhandled exception has been thrown:
Error: Call to a member function getTimestamp() on string in /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php:232
Stack trace:
#0 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php(108): OCA\FaceRecognition\BackgroundJob\Tasks\CreateClustersTask->hasNewFacesToRecreate('nordscan', 5)
#1 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php(90): OCA\FaceRecognition\BackgroundJob\Tasks\CreateClustersTask->createClusterIfNeeded('nordscan')
#2 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/BackgroundService.php(150): OCA\FaceRecognition\BackgroundJob\Tasks\CreateClustersTask->execute(Object(OCA\FaceRecognition\BackgroundJob\FaceRecognitionContext))
#3 /var/www/html/custom_apps/facerecognition/lib/Command/BackgroundCommand.php(192): OCA\FaceRecognition\BackgroundJob\BackgroundService->execute(900, false, Object(OC\User\User), NULL, 'default-mode')
#4 /var/www/html/3rdparty/symfony/console/Command/Command.php(298): OCA\FaceRecognition\Command\BackgroundCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/3rdparty/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FaceRecognition\Command\BackgroundCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/console.php(102): OC\Console\Application->run()
#10 /var/www/html/occ(11): require_once('/var/www/html/c...')
#11 {main}
tuxArg commented 4 days ago

I solved this by changing /lib/BackgroundJob/Tasks/CreateClustersTask.php from line 232 to:

if (is_string($oldestFace->creationTime)) {
    $oldestFaceTimestamp = strtotime($oldestFace->creationTime);
    $oldestFaceFormat=$oldestFace->creationTime;
} else {
    $oldestFaceTimestamp = $oldestFace->creationTime->getTimestamp();
    $oldestFaceFormat=$oldestFace->creationTime->format('Y-m-d H:i:s');
}
$currentTimestamp = (new \DateTime())->getTimestamp();
$this->logDebug(sprintf('Oldest face without persons for user %s and model %d is from %s',
                $userId, $modelId, $oldestFaceFormat));
nordscan commented 3 days ago

now its working again...thnx

Oski19831 commented 2 days ago

https://github.com/matiasdelellis/facerecognition/issues/780#issuecomment-2433105764

This should fix this Issue too...