When creating a new file using Appwrite Flutter SDK, the file is successfully created on the server, but the client throws the following exception:
type 'Null' is not a subtype of type 'bool'
- Self hosted: 1.8.1
- Flutter SDK: 21.0.0
Althouh i know that this error occured when theris a missmated betwen sdk but for this error i have bothe latest appwrite version 1.8.1 and it flutter lasted sdk 21.0.0 and still facing this
type 'Null' is not a subtype of type 'bool' when creating file
Hey, I'm seeing the same issue when listing files in a bucket:
final list = await context.storage.listFiles(
bucketId: BucketIds.images,
queries: [Query.equal('name', name), Query.limit(1)],
);
This is the relevant stacktrace:
type 'Null' is not a subtype of type 'bool'
#0 new File.fromMap (package:dart_appwrite/src/models/file.dart:73)
#1 new FileList.fromMap.<anonymous closure> (package:dart_appwrite/src/models/file_list.dart:19)
#2 MappedListIterable.elementAt (dart:_internal/iterable.dart:442)
#3 ListIterator.moveNext (dart:_internal/iterable.dart:371)
#4 new List.from (dart:core-patch/array_patch.dart:29)
#5 new FileList.fromMap (package:dart_appwrite/src/models/file_list.dart:19)
#6 Storage.listFiles (package:dart_appwrite/services/storage.dart:161)
- Self hosted: 1.8.1
- dart_appwrite: 21.1.0
Have you found more info, or a workaround?
Looks like the encryption property is missing from the File payload. Tried to disable and re-enable encryption on the bucket settings, without success.
Went step by step, encryption is indeed missing, as well as compression.
Aaaaand I just found this PR: https://github.com/appwrite/appwrite/pull/11135 Looks like the issue is already fixed, we just have to wait for the next Appwrite version to be released.
For reference, the encryption and compression properties were added in dart_appwrite 21.0.0.
Sticking to 20.1.1 resolves the issue until Appwrite 1.8.2 (or above) gets released.
Recommended threads
- Bulk API limitations in self-hosted serv...
Environment: Appwrite Selfhost SDK: node-appwrite 28.0 Calling `upsertRows` (also applies to `createRows`/`updateRows`/`deleteRows`) with more than 100 rows fa...
- Self Hosted GitHub connection not adding...
After upgrading to 1.9.6 i noticed that i cannot search for new repositories when trying to add new functions. I removed the existing github connection via Set...
- Unable to init function via cli
Hello! I have created a new self hosted instance of appwrite 1.9.6 and have connected to that insatnce with the cli 27.2.0 that was released a few hours ago. Wh...