You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a new (empty) collection in the AppWrite web console
In Flutter app, after login, call Databases(client).listDocuments(databaseId: "[dbID]", collectionId: "[collID]"
This call throws an exception:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: AppwriteException: collection_not_found, Collection with the requested ID could not be found. (404)
#0 ClientMixin.prepareResponse
#1 ClientIO.call
<asynchronous suspension>
#2 Databases.listDocuments
<asynchronous suspension>
#3 _MyHomePageState.loadItems
<asynchronous suspension>
#4 _MyHomePageState._initAppWrite
<asynchronous suspension>
Restarted application in 308ms.
👍 Expected behavior
Databases(client).listDocuments() should return an empty List.
The server should not return a 404 code.
I think the origin of the bug is the answer of the server. I suspect that the underlying table associated to the collection is not created in the same time than the collection, because it is also empty of attributes, but the low level table is not created even if I add attributes.
I suppose that because, after creating attributes, then adding documents in this collection, then deleting all of them, the collection is now listed by listDocuments() as empty without any exception.
So, to me, creating documents allows to create the collection (the low level SQL table), and brand new collections do not yet really exist, even if I add attributes to them (maybe this is the reason, adding attributes do not create/update the SQL table). The server should not answer 404 in such a case, but 200 and no data.
👎 Actual Behavior
Databases(client).listDocuments actually throws an AppwriteException: collection_not_found
The server returns a 404.
🎲 Appwrite version
Version 1.3.x
💻 Operating system
Linux
🧱 Your Environment
"out of the box" self-hosted AppWrite install
👀 Have you spent some time to check if this issue has been raised before?
👟 Reproduction steps
Databases(client).listDocuments(databaseId: "[dbID]", collectionId: "[collID]"
👍 Expected behavior
Databases(client).listDocuments()
should return an empty List.I think the origin of the bug is the answer of the server. I suspect that the underlying table associated to the collection is not created in the same time than the collection, because it is also empty of attributes, but the low level table is not created even if I add attributes.
I suppose that because, after creating attributes, then adding documents in this collection, then deleting all of them, the collection is now listed by
listDocuments()
as empty without any exception.So, to me, creating documents allows to create the collection (the low level SQL table), and brand new collections do not yet really exist, even if I add attributes to them (maybe this is the reason, adding attributes do not create/update the SQL table). The server should not answer 404 in such a case, but 200 and no data.
👎 Actual Behavior
AppwriteException: collection_not_found
🎲 Appwrite version
Version 1.3.x
💻 Operating system
Linux
🧱 Your Environment
"out of the box" self-hosted AppWrite install
👀 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: