Today I upgraded Nextcloud after New Release 30 was available. I See this error on log reader:
DriverException An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'nextcloud.cr.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Error while running background job OCA\DAV\BackgroundJob\EventReminderJob (id: 12, arguments: null)
I have never seen this error in all these years that I have used Nextcloud.
I can of course remove this Mysql Variable but i don't know if the Problem it's Mysql Server or a Nextcloud Bug.
thank you
Steps to reproduce
Upgra to Nextcloud from 29 Version
Check Log Reader
Expected behavior
No error of this type that cannot be solved with the occ option
I have run the following but the error persists.
{"reqId":"HiUgAwlVXIjguooVMP63","level":3,"time":"2024-09-14T18:40:02+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job OCA\DAV\BackgroundJob\EventReminderJob (id: 12, arguments: null)","userAgent":"--","version":"30.0.0.14","exception":{"Exception":"Doctrine\DBAL\Exception\DriverException","Message":"An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression https://github.com/nextcloud/server/issues/1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'nextcloud.cr.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by","Code":1055,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1943,"function":"convert","class":"Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1885,"function":"handleDriverException","class":"Doctrine\DBAL\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1106,"function":"convertExceptionDuringQuery","class":"Doctrine\DBAL\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":415,"function":"executeQuery","class":"Doctrine\DBAL\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/ConnectionAdapter.php","line":50,"function":"executeQuery","class":"OC\DB\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":272,"function":"executeQuery","class":"OC\DB\ConnectionAdapter","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":249,"function":"executeQuery","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/Reminder/Backend.php","line":53,"function":"execute","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/Reminder/ReminderService.php","line":104,"function":"getRemindersToProcess","class":"OCA\DAV\CalDAV\Reminder\Backend","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/BackgroundJob/EventReminderJob.php","line":50,"function":"processReminders","class":"OCA\DAV\CalDAV\Reminder\ReminderService","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":61,"function":"run","class":"OCA\DAV\BackgroundJob\EventReminderJob","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":83,"function":"start","class":"OCP\BackgroundJob\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":73,"function":"start","class":"OCP\BackgroundJob\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":162,"function":"execute","class":"OCP\BackgroundJob\TimedJob","type":"->"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":117,"Previous":{"Exception":"Doctrine\DBAL\Driver\PDO\Exception","Message":"SQLSTATE[42000]: Syntax error or access violation: 1055 Expression https://github.com/nextcloud/server/issues/1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'nextcloud.cr.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by","Code":1055,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":132,"function":"new","class":"Doctrine\DBAL\Driver\PDO\Exception","type":"::"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1099,"function":"execute","class":"Doctrine\DBAL\Driver\PDO\Statement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":415,"function":"executeQuery","class":"Doctrine\DBAL\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/ConnectionAdapter.php","line":50,"function":"executeQuery","class":"OC\DB\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":272,"function":"executeQuery","class":"OC\DB\ConnectionAdapter","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":249,"function":"executeQuery","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/Reminder/Backend.php","line":53,"function":"execute","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/Reminder/ReminderService.php","line":104,"function":"getRemindersToProcess","class":"OCA\DAV\CalDAV\Reminder\Backend","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/BackgroundJob/EventReminderJob.php","line":50,"function":"processReminders","class":"OCA\DAV\CalDAV\Reminder\ReminderService","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":61,"function":"run","class":"OCA\DAV\BackgroundJob\EventReminderJob","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":83,"function":"start","class":"OCP\BackgroundJob\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":73,"function":"start","class":"OCP\BackgroundJob\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":162,"function":"execute","class":"OCP\BackgroundJob\TimedJob","type":"->"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":28,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[42000]: Syntax error or access violation: 1055 Expression https://github.com/nextcloud/server/issues/1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'nextcloud.cr.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by","Code":"42000","Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":130,"function":"execute","class":"PDOStatement","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1099,"function":"execute","class":"Doctrine\DBAL\Driver\PDO\Statement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":415,"function":"executeQuery","class":"Doctrine\DBAL\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/ConnectionAdapter.php","line":50,"function":"executeQuery","class":"OC\DB\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":272,"function":"executeQuery","class":"OC\DB\ConnectionAdapter","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":249,"function":"executeQuery","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/Reminder/Backend.php","line":53,"function":"execute","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/Reminder/ReminderService.php","line":104,"function":"getRemindersToProcess","class":"OCA\DAV\CalDAV\Reminder\Backend","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/BackgroundJob/EventReminderJob.php","line":50,"function":"processReminders","class":"OCA\DAV\CalDAV\Reminder\ReminderService","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":61,"function":"run","class":"OCA\DAV\BackgroundJob\EventReminderJob","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":83,"function":"start","class":"OCP\BackgroundJob\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":73,"function":"start","class":"OCP\BackgroundJob\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":162,"function":"execute","class":"OCP\BackgroundJob\TimedJob","type":"->"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":130}},"message":"Error while running background job OCA\DAV\BackgroundJob\EventReminderJob (id: 12, arguments: null)","exception":{},"CustomMessage":"Error while running background job OCA\DAV\BackgroundJob\EventReminderJob (id: 12, arguments: null)"}}
⚠️ This issue respects the following points: ⚠️
Bug description
Hello,
Today I upgraded Nextcloud after New Release 30 was available. I See this error on log reader:
DriverException An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'nextcloud.cr.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by Error while running background job OCA\DAV\BackgroundJob\EventReminderJob (id: 12, arguments: null)
I have never seen this error in all these years that I have used Nextcloud.
I can of course remove this Mysql Variable but i don't know if the Problem it's Mysql Server or a Nextcloud Bug.
thank you
Steps to reproduce
Expected behavior
No error of this type that cannot be solved with the occ option I have run the following but the error persists.
occ db:add-missing-indices occ db:add-missing-primary-keys occ files:scan --all occ files:scan-app-data occ maintenance:repair occ maintenance:repair --include-expensive
Nextcloud Server version
master
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 28 to 29)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
No response
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
No response