-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Bug Report: '_Map<String, dynamic>' is not a subtype of type 'List<dynamic>' with permissions in a document #162
Comments
@ande4485 I'm following your steps using Appwrite cloud and Appwrite Flutter SDK 9.0.1 but I'm unable to reproduce the issue. Also with Appwrite cloud, it's recommended to use Flutter Appwrite SDK 8.x.x instead of 9.x.x Let us know if using 8.x.x solves the issue? |
@lohanidamodar , thank you for your message, but even with appwrite: ^8.3.0 I have always this error. |
@ande4485, you're probably facing appwrite/appwrite#5661 beacuse of duplicate permissions: Permission.write(Role.user(appUser.idDatabase!)),
Permission.update(Role.user(appUser.idDatabase!)),
Permission.read(Role.users()),
Permission.delete(Role.user(appUser.idDatabase!)) because write is an alias for update + delete. So, you should just do: Permission.write(Role.user(appUser.idDatabase!)),
Permission.read(Role.users()) |
👟 Reproduction steps
👍 Expected behavior
No error throws
👎 Actual Behavior
I got '_Map<String, dynamic>' is not a subtype of type 'List' , because in this line :
Line 41 in document.dart
$permissions are a List but map['$permissions'] are a map.
🎲 Appwrite version
Different version (specify in environment)
💻 Operating system
Linux
🧱 Your Environment
Flutter appwrite 9.0.1.
Flutter 3.10.6
Appwrite Cloud
👀 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: