
I've recently updated a Flutter app that previously used the dart_appwrite
7.3.0 package and is now using the dart_appwrite
10.0.0 package. However, I get an exception when calling health.getDB()
to check the status of the database: type 'Null' is not a subtype of type 'int'
When I review what is returned, it appears that the DB status is now returned as a map with two properties: total
and a list of HealthStatus
.
I'm not able to find the Health API in the new documentation and any of the old links obviously return a 404 error. Is there anywhere where this change has been documented and any idea how to fix the issue?

For clarity, the locally hosted Appwrite has been upgraded to 1.4.4

You can check code source here

Thinks that you need to create issue on github to fix it

Yeah, I've been browsing the source. I think that there's been an update to what Appwrite returns, but not the equivalent update to the dart_appwrite SDK. I'll open a ticket tomorrow.

Uhhh why are you using the dart sdk in your flutter app?

It's a desktop admin app, that does maintenance on the Appwrite database - including migrating the contents of one Appwrite database to another. Why I'm using the Dart SDK shouldn't really matter though. This is a bug that will need to be fixed as the Dart SDK is out of sync with the current Appwrite deployment,

hopefully you're not putting the API key in the app itself as to reduce exposure of your API key.
Anyways, would you please create an issue on github for the unexpected response format?

API key is manually entered, but also, it's an internal app so it never leaves my development machine. π
I'll create an issue as soon as I've resovled an Xcode/Flutter build issue that's preventing me from deploying an urgent bug fix. π¦

@Steven, issue raised, along with what I expect the new type should be:

The fix itself is quite easy and I implemented it locally in my app. I would create a PR for the fix but reading through the documentation, it wasn't clear how I should go about it.

the fix should really be in the API: https://github.com/appwrite/appwrite/issues/6957#issuecomment-1771484526

then we would re-generate the specs and the SDKs

We lowkey need to redo Health API

We took it down because it was seriously problematic in places

DM me for details but we won't be documenting it until it's fixed, and we're advising to not use it atm
Recommended threads
- Origin error after changing default port...
Hi! I need some help regarding an issue Iβm facing with Appwrite after changing the default ports. I have a self-hosted Appwrite instance running on my VPS. I ...
- Opened my website after long time and Ba...
I built a website around a year back and and used appwrite for making the backend. At that time the website was working fine but now when i open it the images a...
- CSV Import not working
I am running 1.7.4, trying the sample book csv import. I get a pop up saying import started and then a quick follow up saying completed. Nothing ever appears ...
