[SOLVED] Unhandled Exception: type '_Map<String, dynamic>' is not a subtype of type 'List<dynamic>'
- 0
- Flutter

Hello, I'm using AppWrite cloud and I hit this error when querying from a collection. I was able to query from other collection. I browsed Discord and tried to apply some suggestions, such as changing the cast to void
and dynamic
. Both are not working. Would you have any suggestion?
Future<DocumentList> getDocs(collectionId) {
return databases.listDocuments(
databaseId: appwriteDatabaseId,
collectionId: collectionId,
);
}
I am using appwrite: ^9.0.1

I wonder if you have malformed permissions. Maybe you can use the debugger to inspect what data is being returned by Appwrite

Thanks Steven. I will try debugger. Btw, I was not able to view the record in Appwrite console too. It just loads infinitely. Other collections' records are fine

Ya sounds like malformed document permissions...

ok, i deleted that record and retry

How are you creating the record? What's your code?

manual entry

I was just testing, so I manually input the record from appwrite console

Weird...you shouldn't have malformed permissions doing that 🧐 I'm curious what the document json was...

hmm...i couldn't click the record to view it though. Let me try to replicate 🙂

Hey Steven, the error disappeared after I deleted that record!

Thanks for that. In the meantime, I will try to manually insert the doc again to see whether I can replicate the same problem

Ok, I replicated the problem. Even though I created the record manually, I have a function that triggers on Create
. That triggers assign permission to the record. And it assigned a same permission to the same person 2x. Thanks to you that i can zoom into the permission part.

[SOLVED] Unhandled Exception: type '_Map<String, dynamic>' is not a subtype of type 'List<dynamic>'

I'm pretty sure we've fixed this and cloud is pending an upgrade with the fix

I see. Thank so much Steven
Recommended threads
- Error response from daemon: driver faile...
on endpoint appwrite-traefik (00bbc10e5875d0c367d8975c6abc946a77b7ec201a64a825399add44fb34ebb4): failed to bind port 0.0.0.0:80/tcp: Error starting userland pro...
- "Memberships privacy" setting in 1.7.4
Hi everyone, I'm experiencing an issue with a clean self-hosted installation of Appwrite version 1.7.4. I previously used version 1.6.1, and if I remember corre...
- Issue with Appwrite Function Execution –...
Hi all, I'm encountering an issue when calling an Appwrite function from my Flutter app. **Environment:** ```Flutter SDK: 3.27.3 Appwrite Flutter SDK: 16.1.0```...
