Internal Server Error due to QueryBuilder::execute
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start with lib/Db/PersonMapper.php around line 606, where a select is run, and lib/Db/ImageMapper.php, which the reporter says has several executeStatement calls. Check Nextcloud's OC\DB\QueryBuilder API to see which method replaces execute() for reads versus writes, since the reporter's own swap looks inverted; the linked privacy app issue (#1263) shows the same migration. Done looks like opening the face recognition page with no undefined-method error in the Nextcloud log.
Written by the indexing model from the issue text.
Description
Which version of recognize are you using?
11.0.1
Enabled Modes
Face recognition, Object recognition
TensorFlow mode
Normal mode
Downstream App
Files App
Which Nextcloud version do you have installed?
33.0.9
Which Operating system do you have installed?
Debian 13
Which database are you running Nextcloud on?
Maria DB 11.8.6
Which Docker container are you using to run Nextcloud? (if applicable)
N/A
How much RAM does your server have?
16GiB
What processor Architecture does your CPU have?
x86_64
Describe the Bug
Since Nextcloud updates, I wasn't able to view face recognition.
I had errors (the same on multiple files)
ExceptionCall to undefined method OC\DB\QueryBuilder\QueryBuilder::execute
It seems that calls to execute is deprecated and it goes on error.
I searched and found a guy with the same issue on Privacy application ( https://github.com/nextcloud/privacy/issues/1263 )
So I did the samed fix as him based on error logs :
- I replaced "execute()" with "executeQuery()" in '/var/www/html/nextcloud/apps/facerecognition/lib/Db/PersonMapper.php' line 606
- I replaced "$resultStatement = $query->executeStatement();" with "$resultStatement = $query->execute();" in /var/www/html/nextcloud/apps/facerecognition/lib/Db/ImageMapper.php (multiple occurences)
Not sure if this is the correct way but I got the page loading instead of an error
Expected Behavior
Display the page
To Reproduce
I don't know excactly when the execute function was removed.
Debug log
No response
- Dominant language
- PHP
- Stars
- 699
- Forks
- 68
- Avg merge
- 18h 34m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/recognize
-
insertDeletion looks up recognize_fs_deletions by node_id alone, which no index covers — bulk removals scan the whole table per filePossibly taken @marcelklehr claimed this 6 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Recognize maintenance routine unnecessarily redownloads Tensorflow CPU and GPU models every timeMay be free again @marcelklehr claimed this 187 days ago, and no pull request is open. Openbug
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 38/100
All issues in nextcloud/recognize
Similar issues
-
Talk Review
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
socallinuxexpo/scale-drupal#351 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
code4romania/cpc#47 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
mautic/api-library#351 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
nunomaduro/collision#371 ·
-
Lead create/update: a product row without a "product_id" key passes LeadForm validation and fails in the database (500)Possibly taken @Arslan-TR claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
krayin/laravel-crm#2681 ·
Maintainers usually reply within 2 days