matiasdelellis / facerecognition

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

Unable to re-enable Face Recognition App #619

Closed j3ffery17 closed 1 year ago

j3ffery17 commented 1 year ago

Hey there, I'm unsure at what point Face Recognition stopped functioning, in either case, although there is many hours of user data in the Face Recognition tables, I'm unable to 're'enable the app. I've upgraded somewhat recently to Nextcloud 25.0.2. Running PostgreSQL database. Other apps working fine.

Poked around in tables of PostgreSQL db but unable to see any "x" entries.

Im hoping to retain all my face recognition data since theres many hours of face identification involved.

Face Recognition 0.9.10

Expected behaviour

Wanting to 're' enable the Face Recognition App. Attempting from the App console.

Actual behaviour

When I click the 'enable' button getting the following error: "Database error when running migration 0910Date20221109095949 for app facerecognition An exception occurred while executing a query: SQLSTATE[23502]: Not null violation: 7 ERROR: column "x" contains null values

Steps to reproduce

  1. In menu, select Apps
  2. Click enable next to Face Recognition 0.9.10
  3. Get error text above and app is not enabled

Server configuration

Client configuration

Logs

Background task log with debug.

sudo -u apache php occ -vvv face:background_job ``` Insert your background log here ```

Web server error log

Web server error log ``` Insert your webserver log here ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` Insert your Nextcloud log here ```

Browser log

Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
matiasdelellis commented 1 year ago

Hi @j3ffery17

Please, test change it and enable again..

[matias@nube Migration]$ git diff .
diff --git a/lib/Migration/Version0910Date20221109095949.php b/lib/Migration/Version0910Date20221109095949.php
index a6270b3..ca224ec 100644
--- a/lib/Migration/Version0910Date20221109095949.php
+++ b/lib/Migration/Version0910Date20221109095949.php
@@ -42,18 +42,22 @@ class Version0910Date20221109095949 extends SimpleMigrationStep {

                $table->addColumn('x', 'integer', [
                        'notnull' => true,
+                       'default' => -1,
                        'length' => 4,
                ]);
                $table->addColumn('y', 'integer', [
                        'notnull' => true,
+                       'default' => -1,
                        'length' => 4,
                ]);
                $table->addColumn('width', 'integer', [
                        'notnull' => true,
+                       'default' => -1,
                        'length' => 4,
                ]);
                $table->addColumn('height', 'integer', [
                        'notnull' => true,
+                       'default' => -1,
                        'length' => 4,
                ]); 
j3ffery17 commented 1 year ago

Probably my fault but I didnt install via GitHub and no option to do git diff . Do I dare clone the repo somewhere?

matiasdelellis commented 1 year ago

Hi @j3ffery17 Don't install anything, just edit the file apps/facerecognition/lib/Migration/Version0910Date20221109095949.php adding the lines with the + 😬

If both confirm that the migration works, and the application also works, I upload an update with that.

j3ffery17 commented 1 year ago

Completed. This is indeed working now. Excellent, thank you!

edgeofthex commented 1 year ago

It worked for me as well! Thanks much!

matiasdelellis commented 1 year ago

Thanks again..