Hello, What are the probable causes for this exception when I run the getCurrentUser:
Future<User> getCurrentUser() async =>
Account(_client).get().then((value) => value);```
Exception```Unhandled Exception: type 'Null' is not a subtype of type 'List<dynamic>'```
#0 new User.fromMap (package:appwrite/src/models/user.dart:87:18)
#1 Account.get (package:appwrite/services/account.dart:23:24)
<asynchronous suspension>```
What version of Appwrite are you on and what version of the Appwrite flutter sdk are you using?
Hello Steve,
appwrite: ^11.0.0 => flutter Appwrite console version 1.3.7
Version 11 of the Appwrite flutter sdk is meant for Appwrite 1.4. Please downgrade, checking the readme to see what version you should use
I just downgraded the flutter plugin to 9.0.0 and it worked! That's the workaround I guess?
Perfect. Thank you!
[SOLVED] Exception when retrieving current user
Recommended threads
- Error With iOS Apps
I keep getting the below errors for my flutter app. The clients are registered and have been. This wasn't an issue a few hours ago. AppwriteException: AppwriteE...
- Appwrite Auth & Function don't reveal cl...
When I execute a function or sign in with my Flutter app, Appwrite does not show my real IP: instead, it seems that Appwrite shows Fastly CDN IP address.
- Why does this happen?
`AppwriteException: general_argument_invalid, Invalid `secret` param: Value must be a valid string and at least 1 chars and no longer than 256 chars (400)` the...