Skip to content
Back

[SOLVED] Skip total counts crash the query

  • 0
  • Resolved
  • 3
  • Self Hosted
  • Flutter
  • Databases
Nox
4 Jan, 2026, 20:42

Hello,

When adding the total parameter (either true, the default, or false) to the listRows function, it raises the following error: type 'bool' is not a subtype of type 'Iterable<dynamic>' when executed.

I'm running Appwrite self-hosted version 1.8.1. Client SDK is Flutter with appwrite package verison 20.3.2.

I reproduced the error on different tables. No errors are reported by the appwrite container

TL;DR
Passing a boolean value to the 'total' attribute is causing the query to crash. The problem was fixed by updating the Flutter SDK. However, on self-hosted backends, the total count will always be returned. Fixed in the cloud, the self-hosted fix is pending.
5 Jan, 2026, 11:45

You are not showing your code, but can you try passing a list instead of only boolean?

[True] / [False]

5 Jan, 2026, 12:18

Here is a simple example of where it fails, I tried to pass an Iterable but it does not allow me as per the function specification

5 Jan, 2026, 14:33

err, shouldn't it be total: false? why an array/list?

5 Jan, 2026, 14:35

the function signature is this -

TypeScript
Future<models.RowList> listRows({
  required String databaseId,
  required String tableId,
  List<String>? queries,
  String? transactionId,
  bool? total
}) async {...}
5 Jan, 2026, 14:47

Exactly, I shared the screenshot just to show a snippet of my code and to show that the function expects a nullable boolean and not an Iterable<dynamic>

5 Jan, 2026, 14:49

Whenever you set the 'total' attribute, either true or false, the listRows call fails with the error type 'bool' is not a subtype of type 'Iterable<dynamic>'

5 Jan, 2026, 14:50

I don't know if it is something failing in the client SDK before the API call or some backend logic not expecting this parameter

5 Jan, 2026, 15:02

err. if the type is bool and you explicitly pass a boolean value, it shouldn't complain.

can you show the error when you do total: false? screenshot would help. i am guessing it could be some stale cache

5 Jan, 2026, 15:11

No complaints from client sdk with a boolean Here is a screenshot with this function running

5 Jan, 2026, 15:12

Which cache are you referring to? On the backend? Can I clear it somehow?

5 Jan, 2026, 15:25

I tried to restart the redis service without success, can I safely delete its volume?

5 Jan, 2026, 15:53

I think there is a bug in the SDK I changed the bool to an Iterable<String> and now the error is reported by the backend: A boolean is expected

5 Jan, 2026, 18:44

Can you try to pass an object:

TypeScript
databases.listRows({
  databaseId: …,
  tableId: …,
  total: false,
})

I'm not sure if Flutter is using object arguments as well

5 Jan, 2026, 21:41

No, it does not allow me such thing

8 Jan, 2026, 21:00

Is the sdk-for-flutter repo the right place to raise an issue? https://github.com/appwrite/sdk-for-flutter The repo is marked as read-only

9 Jan, 2026, 15:47

its read-only as its generated via our sdk-generator. you can still go ahead and create an issue on the repo. I can take a look tomorrow 👍

9 Jan, 2026, 17:44
1
10 Jan, 2026, 10:21

taking a look into this, and I know whats happening 👍

10 Jan, 2026, 10:24

Great news !

14 Jan, 2026, 06:27

Hey 👋, sdk and backend fixes were deployed sometime ago. please update your flutter sdk and please try again 😄

14 Jan, 2026, 08:14

Hey, thank you, I will try! Do I understand correctly that the fix will not work on self hosted backend yet?

14 Jan, 2026, 10:35

the fix was for sdk. the issue on backend [fixed on Cloud] is that the value is ignored atm and the total will always be returned on self hosted. We'll be discussing this internally regarding the next release 😄

18 Jan, 2026, 17:53

Hey I confirm the total parameter does no longer crash the query. Indeed there is another bug then, looking forward for it to being fixed next version. This issue can be closed

19 Jan, 2026, 11:35

[SOLVED] Skip total counts crash the query

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more