Hello! I recently upgraded my Appwrite installation from 1.3.7 to 1.4.1 and ran the migrations. Due to the incompatibilities I had to upgrade the Flutter SDK as well as it was raising errors. Unfortunately I am still getting errors with the newest versions regarding Type "Null" responses for my documents permission.
Have I missed something or is an additional migration necessary? Every help is very appreciated, thank you.
what's your code? And can you check what's in the map?
Thank you for the quick response!
As far as I understand this gets thrown directly in the Flutter SDK lib/src/models/document.dart.
It seems to me that the structure received is completely different. (Most keys are missing including id, createdAt and updatedAt ...)
I will check if the installation was really successful again. The content of the map is the following:
1:"owner" -> "User"
2:"members" -> List (2 items)
3:"description" -> "A basic private group"
4:"$databaseId" -> "642e85442aab0146d94f"
5:"$collectionId" -> "642e867bb648f1898e7b"```
interesting...what's your code and do you have relationships?
I do use relationships as i have a custom "Group" document that has the following attributes as depicted in the screenshot.
What part of the code is of particular interest? This is the code part that calls into the SDK.
To my understanding the Error gets thrown by the call to _databases.listDocuments.
Future<List<Group>> _getGroupList() async {
final groupDocuments = await _databases.listDocuments(
databaseId: appwriteDatabaseId,
collectionId: groupCollectionId,
queries: [
Query.orderDesc("\$createdAt"),
Query.select(["groupName", "owner", "members", "description"])
]);
return groupDocuments.documents
.map((document) => Group.fromAppwriteDocument(document.data))
.toList();
}
i see what's going on...would you please create a github issue for this?
For now, you'll need to include the system attributes in your select
Sure I can, do you have a link where this system attributes are explained?
After adding the system attributes via the following: Query.select([ "groupName", "owner", "members", "description", "updatedAt", "createdAt", "id", "permissions" ])```
this seemed to fix the issue for now.
[Closed] TypeError in Flutter SDK (10.0.1) with Appwrite Version 1.4.1
will you still be able to create an issue? Ideally, it should still work without those system attributes
Already at it, should be done in 2min.
Recommended threads
- login With OAuth Failed
login With OAuth Failed: when i cliick to login with any of the following (facebook, gmail or apple) am being redirected out of the app to enter my detail, afte...
- Flutter OAuth2 webAuth Bug?
I created with flutter an app where I can login in with my Microsoft Account. When I compile it to Web (WASM) or Android (aab) then there is no problem what so ...
- Synchronous Function Execution Timed Out...
Hi Appwrite team 👋 I’m facing a synchronous function execution timeout issue on Appwrite Cloud and would appreciate some guidance. I executed this function u...