Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Internal Server Error due to QueryBuilder::execute

Open Beginner friendly
#1,575 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
php
Domain
database

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

bug
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

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.

More from nextcloud/recognize

All issues in nextcloud/recognize

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.