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
- Current User is Not authorized
recreating same Thread
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...