Hello I upgraded my instance from 1.6.2 to latest 1.7.4, doing migration. All seems to work fine but when I use the latest version of the appwrite plugin on my Flutter app (17.1.0) and trying to list documents I got "Unhandled Exception: type 'Null' is not a subtype of type 'int'".
I debugged and found that my instance do not return the field $sequence which is required in the appwrite library:
factory Document.fromMap(Map<String, dynamic> map) {
return Document(
$id: map['\$id'].toString(),
$sequence: map['\$sequence'],
$collectionId: map['\$collectionId'].toString(),
$databaseId: map['\$databaseId'].toString(),
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
$permissions: List.from(map['\$permissions'] ?? []),
data: map,
);
}
How to fix that?
$sequence is not on self hosted 1.7.4, it's only on cloud. (same reason why we don't have upsert, as i saw you talked about it in the general)
Thanks a lot for your answer, yeah I asked it on general too ๐
So there is currently a bug inside the Flutter SDK because the $sequence was a required variable, a PR is on the way : https://github.com/appwrite/sdk-generator/pull/1147
I doubted if this was a migration issue or SDK issue, now I know :p
<@493852865907916800> Last question: even if there is no $sequence field, the atomic numeric option is working too on self-instance right? Like the cloud version?
don't think as self hosted 1.7.4 is from may 22 and the atomic was created in june
I am facing the same issue. Is there a recommended way going forward? Like using 18.0.0 instead of 17.1.0? Or downgrading to 17.0.1?
you should downgrade it to a version without the $sequence to match the self hosted document structure. (i'm not a flutter dev, so i don't exacly know which version correspond to the 1.7.4 server version)
when they release the selfhosted 1.8.0 you will be able to upgrade the server then the SDK in your projects
Thanks. I downgraded to 17.0.1 for the time being.
Recommended threads
- Invalid type for attribute 'email': emai...
I'm using the node-appwrite SDK to create a table, the column payload looks like this: ```json [{"key":"email","type":"email","required":true, "size": 512}] ``...
- Git connection is not working anymore on...
Hello all, I updated from 1.8.1 to 1.9.0 then 1.9.5. All seems to work even the Github connection. In Git configuration I see my Github user but when trying to...
- Active Running Project Deletion Alert Em...
Hi , I received an email alert from Appwrite today stating โyour project will be deleted within 14 days if no action is taken,โ though I have been actively usin...