🐛 Bug Report: Server Error using Query.limit without Query.cursorAfter/Query.cursorBefore #8419
Closed
2 tasks done
Labels
bug
Something isn't working
👟 Reproduction steps
Querying with listDocuments e.g.:
👍 Expected behavior
The query returns at most 5 documents
👎 Actual Behavior
Function execution fails with Server Error, general_unknown
Full error:
{"code":500,"type":"general_unknown","response":{"message":"Server Error","code":500,"type":"general_unknown","version":"1.5.7","file":"/usr/src/code/vendor/utopia-php/database/src/Database/Database.php","line":2621,"trace":[{"file":"/usr/src/code/app/controllers/api/databases.php","line":3011,"function":"getDocument","class":"Utopia\\Database\\Database","type":"->","args":["database_1_collection_8",null]},{"file":"/usr/src/code/vendor/utopia-php/database/src/Database/Validator/Authorization.php","line":166,"function":"{closure}","args":[]},{"file":"/usr/src/code/app/controllers/api/databases.php","line":3011,"function":"skip","class":"Utopia\\Database\\Validator\\Authorization","type":"::","args":[{}]},{"file":"/usr/src/code/vendor/utopia-php/framework/src/App.php","line":531,"function":"{closure}","args":["database","collection",[{},{},{},{}],{},{},"default"]},{"file":"/usr/src/code/vendor/utopia-php/framework/src/App.php","line":705,"function":"execute","class":"Utopia\\App","type":"->","args":[{},{},{}]},{"file":"/usr/src/code/app/http.php","line":257,"function":"run","class":"Utopia\\App","type":"->","args":[{},{}]}]}}
Docker logs:
Added all necessary indexes but it only works if I remove
Query.limit
or addQuery.cursorAfter
/Query.cursorBefore
.🎲 Appwrite version
Version 1.5.x
💻 Operating system
Linux
🧱 Your Environment
Appwrite 1.5.7, default Docker setup, node-18.0 runtime.
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: