recognize icon indicating copy to clipboard operation
recognize copied to clipboard

Undefined variable $nodeDistance

Open simonspa opened this issue 2 years ago • 7 comments

Which version of recognize are you using?

4.3.2

Enabled Modes

Face recognition

TensorFlow mode

Normal mode

Downstream App

Memories App

Which Nextcloud version do you have installed?

27.0.2

Which Operating system do you have installed?

Debian 11

Which database are you running Nextcloud on?

mysql 10.5.19

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

No response

How much RAM does your server have?

32G

What processor Architecture does your CPU have?

x86_64

Describe the Bug

During crawling I find the following error in my Nextcloud 27.0.2 log:

{
    "reqId": "16dOemVBgKnSFIjoYEZb",
    "level": 3,
    "time": "2023-08-25T18:17:22+02:00",
    "remoteAddr": "",
    "user": "--",
    "app": "PHP",
    "method": "",
    "url": "--",{
    "reqId": "16dOemVBgKnSFIjoYEZb",
    "level": 3,
    "time": "2023-08-25T18:17:22+02:00",
    "remoteAddr": "",
    "user": "--",
    "app": "PHP",
    "method": "",
    "url": "--",
    "message": "Undefined variable $nodeDistance at /var/www/nextcloud/apps/recognize/lib/Clustering/MrdBallTree.php#191",
    "userAgent": "--",
    "version": "27.0.2.1",
    "data":
    {
        "app": "PHP"
    },
    "id": "64edad7e22bbe"
}
    "message": "Undefined variable $nodeDistance at /var/www/nextcloud/apps/recognize/lib/Clustering/MrdBallTree.php#191",
    "userAgent": "--",
    "version": "27.0.2.1",
    "data":
    {
        "app": "PHP"
    },
    "id": "64edad7e22bbe"
}

Not sure if related, but the last time background job ran is always shown as "never" despite them running just fine (I see new photos being tagged):

image

Expected Behavior

No log error

To Reproduce

Run background job

Debug log

No response

simonspa avatar Aug 29 '23 08:08 simonspa

There is a second place where nodeDistance does not seem to be defined:

{"reqId":"Q3PjAyCf9kJWJaGQynOd","level":3,"time":"2023-08-14T16:06:10+02:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Undefined variable $nodeDistance at /var/www/nextcloud/apps/recognize/lib/Clustering/MstSolver.php#122","userAgent":"--","version":"27.0.1.2","data":{"app":"PHP"},"id":"64edb0387ee20"}

simonspa avatar Aug 29 '23 08:08 simonspa

Which PHP version are you running? Debian 11 doesn't have PHP8 by default, right?

marcelklehr avatar Sep 02 '23 10:09 marcelklehr

Hi @marcelklehr, this is PHP Version 8.1.22, installed via the regular deb.sury.org repository.

simonspa avatar Sep 02 '23 16:09 simonspa

@MB-Finski Any idea why that variable might be undefined there? Doesn't seem to make sense to me

marcelklehr avatar Sep 17 '23 08:09 marcelklehr

I have the same issue Rocky linux 9.3 PHP 8.2.17 Recognize 6.1.1 Nextcloud 28

using ngxin and php-fpm

[PHP] Error: Undefined variable $nodeDistance at ***/apps/recognize/lib/Clustering/MstSolver.php#122 from ? by -- at 7 avr. 2024, 19:30:47

Neurozone avatar Apr 07 '24 19:04 Neurozone

I can't reproduce this. I believe you that you get this, but I'm gonna call this a fluke for now.

marcelklehr avatar May 08 '24 11:05 marcelklehr