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
- Realtime: Listener not triggered on upda...
I self host appwrite 1.8.1. The genereal functionallity works fine. But my realtime subscription isn't updating. I see "Received heartbeat response from realtim...
- Impossible to get USER after createEmail...
Am using provider to deal with functions linked to appwrite. Here is my login. Future<String?> login(String email, String password) async { try { aw...
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...