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
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...