Error in Nextcloud "[core] Fehler: OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[42601]..."

Since last night I’ve the following error every 5 minutes in Nextcloud:

[core] Fehler: OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[42601]: Syntax error: 7 FEHLER: Bezeichner in Anführungszeichen hat Länge null bei »""«
LINE 1: …") AS “current_user_votes”, coalesce(shares.type, “”) AS use…
^ at <>

  1. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 295
    OC\DB\Exceptions\DbalException::wrap()
  2. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 335
    OC\DB\QueryBuilder\QueryBuilder->executeQuery()
  3. /var/www/html/apps/polls/lib/Db/PollMapper.php line 72
    OCP\AppFramework\Db\QBMapper->findEntities()
  4. /var/www/html/apps/polls/lib/Service/MailService.php line 232
    OCA\Polls\Db\PollMapper->findAutoReminderPolls()
  5. /var/www/html/apps/polls/lib/Cron/AutoReminderCron.php line 49
    OCA\Polls\Service\MailService->sendAutoReminder()
  6. /var/www/html/lib/public/BackgroundJob/Job.php line 81
    OCA\Polls\Cron\AutoReminderCron->run()
  7. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 103
    OCP\BackgroundJob\Job->start()
  8. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 93
    OCP\BackgroundJob\TimedJob->start()
  9. /var/www/html/cron.php line 152
    OCP\BackgroundJob\TimedJob->execute()

Caused by:

Doctrine\DBAL\Exception\SyntaxErrorException: An exception occurred while executing a query: SQLSTATE[42601]: Syntax error: 7 FEHLER: Bezeichner in Anführungszeichen hat Länge null bei »""«
LINE 1: …") AS “current_user_votes”, coalesce(shares.type, “”) AS use…
^ at <>

  1. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1814
    Doctrine\DBAL\Driver\API\PostgreSQL\ExceptionConverter->convert()
  2. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1749
    Doctrine\DBAL\Connection->handleDriverException()
  3. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1055
    Doctrine\DBAL\Connection->convertExceptionDuringQuery()
  4. /var/www/html/lib/private/DB/Connection.php line 262
    Doctrine\DBAL\Connection->executeQuery()
  5. /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 345
    OC\DB\Connection->executeQuery()
  6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
  7. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 293
    OC\DB\QueryBuilder\QueryBuilder->execute()
  8. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 335
    OC\DB\QueryBuilder\QueryBuilder->executeQuery()
  9. /var/www/html/apps/polls/lib/Db/PollMapper.php line 72
    OCP\AppFramework\Db\QBMapper->findEntities()
  10. /var/www/html/apps/polls/lib/Service/MailService.php line 232
    OCA\Polls\Db\PollMapper->findAutoReminderPolls()
  11. /var/www/html/apps/polls/lib/Cron/AutoReminderCron.php line 49
    OCA\Polls\Service\MailService->sendAutoReminder()
  12. /var/www/html/lib/public/BackgroundJob/Job.php line 81
    OCA\Polls\Cron\AutoReminderCron->run()
  13. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 103
    OCP\BackgroundJob\Job->start()
  14. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 93
    OCP\BackgroundJob\TimedJob->start()
  15. /var/www/html/cron.php line 152
    OCP\BackgroundJob\TimedJob->execute()

Caused by:

Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[42601]: Syntax error: 7 FEHLER: Bezeichner in Anführungszeichen hat Länge null bei »""«
LINE 1: …") AS “current_user_votes”, coalesce(shares.type, “”) AS use…
^ at <>

  1. /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php line 103
    Doctrine\DBAL\Driver\PDO\Exception::new()
  2. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1045
    Doctrine\DBAL\Driver\PDO\Statement->execute()
  3. /var/www/html/lib/private/DB/Connection.php line 262
    Doctrine\DBAL\Connection->executeQuery()
  4. /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 345
    OC\DB\Connection->executeQuery()
  5. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
  6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 293
    OC\DB\QueryBuilder\QueryBuilder->execute()
  7. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 335
    OC\DB\QueryBuilder\QueryBuilder->executeQuery()
  8. /var/www/html/apps/polls/lib/Db/PollMapper.php line 72
    OCP\AppFramework\Db\QBMapper->findEntities()
  9. /var/www/html/apps/polls/lib/Service/MailService.php line 232
    OCA\Polls\Db\PollMapper->findAutoReminderPolls()
  10. /var/www/html/apps/polls/lib/Cron/AutoReminderCron.php line 49
    OCA\Polls\Service\MailService->sendAutoReminder()
  11. /var/www/html/lib/public/BackgroundJob/Job.php line 81
    OCA\Polls\Cron\AutoReminderCron->run()
  12. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 103
    OCP\BackgroundJob\Job->start()
  13. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 93
    OCP\BackgroundJob\TimedJob->start()
  14. /var/www/html/cron.php line 152
    OCP\BackgroundJob\TimedJob->execute()

Caused by:

PDOException: SQLSTATE[42601]: Syntax error: 7 FEHLER: Bezeichner in Anführungszeichen hat Länge null bei »""«
LINE 1: …") AS “current_user_votes”, coalesce(shares.type, “”) AS use…
^ at <>

  1. /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php line 101
    PDOStatement->execute()
  2. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1045
    Doctrine\DBAL\Driver\PDO\Statement->execute()
  3. /var/www/html/lib/private/DB/Connection.php line 262
    Doctrine\DBAL\Connection->executeQuery()
  4. /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 345
    OC\DB\Connection->executeQuery()
  5. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
  6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 293
    OC\DB\QueryBuilder\QueryBuilder->execute()
  7. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 335
    OC\DB\QueryBuilder\QueryBuilder->executeQuery()
  8. /var/www/html/apps/polls/lib/Db/PollMapper.php line 72
    OCP\AppFramework\Db\QBMapper->findEntities()
  9. /var/www/html/apps/polls/lib/Service/MailService.php line 232
    OCA\Polls\Db\PollMapper->findAutoReminderPolls()
  10. /var/www/html/apps/polls/lib/Cron/AutoReminderCron.php line 49
    OCA\Polls\Service\MailService->sendAutoReminder()
  11. /var/www/html/lib/public/BackgroundJob/Job.php line 81
    OCA\Polls\Cron\AutoReminderCron->run()
  12. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 103
    OCP\BackgroundJob\Job->start()
  13. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 93
    OCP\BackgroundJob\TimedJob->start()
  14. /var/www/html/cron.php line 152
    OCP\BackgroundJob\TimedJob->execute()

at 2024-05-29T07:55:02+00:00

I’ve no Idea what happend and how to fix it.

Anybody out there with a helpfull hint?

Olaf

Did you reboot your UCS-system?
Did you update Nextcloud or install a new Nextcloud-app a short time before the error appeared?
Do you get warnings in Nextcloud after login as an administrator and call the “Administrative Settings”?

I recommend to post your question in the Nextcloud help-forum.

(Please fill the support template, you will get shown, if you create your posting there.)

Mastodon