Exception in logs when searching for an app
Open
Nobody has claimed this yet.
bug
feature: search
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Describe the bug
Exception in logs when searching for an app
To Reproduce
Steps to reproduce the behavior:
- Install NC 24.0.0.12
- As admin, go to
Apps - search for something
- Check the logs
Expected behavior
do not feed the logs!
Screenshots
If applicable, add screenshots to help explain your problem.
Client details:
- NC: 24.0.0.12
- Deck: 1.7.0
{
"reqId": "VcH97NVKjkUgbKcUc4pl",
"level": 3,
"time": "2022-06-07T11:46:43+00:00",
"remoteAddr": "127.0.0.1",
"user": "cult",
"app": "no app in context",
"method": "GET",
"url": "/ocs/v2.php/search/providers/deck-comment/search?term=external&from=%2Fsettings%2Fapps",
"message": "An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1055 'nextcloud_nc24.c.title' isn't in GROUP BY",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0",
"version": "24.0.0.12",
"exception": {
"Exception": "Doctrine\\DBAL\\Exception\\DriverException",
"Message": "An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1055 'nextcloud_nc24.c.title' isn't in GROUP BY",
"Code": 1055,
"Trace": [
{
"file": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1780,
"function": "convert",
"class": "Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1719,
"function": "handleDriverException",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1067,
"function": "convertExceptionDuringQuery",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/DB/Connection.php",
"line": 261,
"function": "executeQuery",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
"line": 345,
"function": "executeQuery",
"class": "OC\\DB\\Connection",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 281,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/apps/deck/lib/Db/CardMapper.php",
"line": 365,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/apps/deck/lib/Service/SearchService.php",
"line": 113,
"function": "searchComments",
"class": "OCA\\Deck\\Db\\CardMapper",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/apps/deck/lib/Search/CardCommentProvider.php",
"line": 61,
"function": "searchComments",
"class": "OCA\\Deck\\Service\\SearchService",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/Search/SearchComposer.php",
"line": 160,
"function": "search",
"class": "OCA\\Deck\\Search\\CardCommentProvider",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/core/Controller/UnifiedSearchController.php",
"line": 115,
"function": "search",
"class": "OC\\Search\\SearchComposer",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 225,
"function": "search",
"class": "OC\\Core\\Controller\\UnifiedSearchController",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 133,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/AppFramework/App.php",
"line": 172,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/Route/Router.php",
"line": 298,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/ocs/v1.php",
"line": 62,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/ocs/v2.php",
"line": 23,
"args": [
"/home/maxence/sites/nc24/nextcloud/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php",
"Line": 114,
"Previous": {
"Exception": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
"Message": "SQLSTATE[42000]: Syntax error or access violation: 1055 'nextcloud_nc24.c.title' isn't in GROUP BY",
"Code": 1055,
"Trace": [
{
"file": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
"line": 94,
"function": "new",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
"type": "::"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1057,
"function": "execute",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/DB/Connection.php",
"line": 261,
"function": "executeQuery",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
"line": 345,
"function": "executeQuery",
"class": "OC\\DB\\Connection",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 281,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/apps/deck/lib/Db/CardMapper.php",
"line": 365,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/apps/deck/lib/Service/SearchService.php",
"line": 113,
"function": "searchComments",
"class": "OCA\\Deck\\Db\\CardMapper",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/apps/deck/lib/Search/CardCommentProvider.php",
"line": 61,
"function": "searchComments",
"class": "OCA\\Deck\\Service\\SearchService",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/Search/SearchComposer.php",
"line": 160,
"function": "search",
"class": "OCA\\Deck\\Search\\CardCommentProvider",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/core/Controller/UnifiedSearchController.php",
"line": 115,
"function": "search",
"class": "OC\\Search\\SearchComposer",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 225,
"function": "search",
"class": "OC\\Core\\Controller\\UnifiedSearchController",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 133,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/AppFramework/App.php",
"line": 172,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/Route/Router.php",
"line": 298,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/ocs/v1.php",
"line": 62,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/ocs/v2.php",
"line": 23,
"args": [
"/home/maxence/sites/nc24/nextcloud/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
"Line": 26,
"Previous": {
"Exception": "PDOException",
"Message": "SQLSTATE[42000]: Syntax error or access violation: 1055 'nextcloud_nc24.c.title' isn't in GROUP BY",
"Code": "42000",
"Trace": [
{
"file": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
"line": 92,
"function": "execute",
"class": "PDOStatement",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1057,
"function": "execute",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/DB/Connection.php",
"line": 261,
"function": "executeQuery",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
"line": 345,
"function": "executeQuery",
"class": "OC\\DB\\Connection",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 281,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/apps/deck/lib/Db/CardMapper.php",
"line": 365,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/apps/deck/lib/Service/SearchService.php",
"line": 113,
"function": "searchComments",
"class": "OCA\\Deck\\Db\\CardMapper",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/apps/deck/lib/Search/CardCommentProvider.php",
"line": 61,
"function": "searchComments",
"class": "OCA\\Deck\\Service\\SearchService",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/Search/SearchComposer.php",
"line": 160,
"function": "search",
"class": "OCA\\Deck\\Search\\CardCommentProvider",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/core/Controller/UnifiedSearchController.php",
"line": 115,
"function": "search",
"class": "OC\\Search\\SearchComposer",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 225,
"function": "search",
"class": "OC\\Core\\Controller\\UnifiedSearchController",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 133,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/AppFramework/App.php",
"line": 172,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/lib/private/Route/Router.php",
"line": 298,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/ocs/v1.php",
"line": 62,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/home/maxence/sites/nc24/nextcloud/ocs/v2.php",
"line": 23,
"args": [
"/home/maxence/sites/nc24/nextcloud/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/home/maxence/sites/nc24/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
"Line": 92
}
},
"CustomMessage": "--"
}
}
Contributor 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.
Research direction
Start with apps/deck/lib/Db/CardMapper.php at line 365, then follow the search flow through apps/deck/lib/Service/SearchService.php and apps/deck/lib/Search/CardCommentProvider.php. Reproduce an app search on Nextcloud 24 with MySQL and inspect the failing GROUP BY query; done means the search completes without the logged SQL exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- backend, database, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100