nextcloud / nextcloud/recognize

Undefined variable $nodeDistance

Open
#965 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority: normal
Dominant language
PHP
Stars
699
Forks
68
Avg merge
1d 4h
Merged PRs (30d)
5

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/Clustering/MrdBallTree.php around line 191 and trace the background-job path that emits the undefined variable notice during crawling. Run the background job with face recognition enabled and verify that crawling completes without the $nodeDistance log error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.