-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 - User Object gives an error #33
Comments
@dawid-niedzwiecki Can you please share the Appwrite Server version you are using? |
|
UpdateIt came out, that it actually does work properly on newly created accounts. The issue happened on an account, that was created on a previous version of the Appwrite server. After deleting that account and creating a new one, the error didn't show up anymore. |
Could be a migration bug. We will take a look into it. |
@dawid-niedzwiecki, was your account originally created via OAuth2? |
Yes, via Google |
Closing this, as this should be fixed in the newer versions of SDK and Appwrite, if not feel free to reopen the issue. |
I'm new to Appwrite so hopefully this isn't out of place. I am using the latest versions of Appwrite server and SDK and I am getting this error. I have a realtime subscription to the account channel. The account channel returns a User object instead of an Account object. Not sure exactly why that is. Anyway, when I try to pass the response to the Account.fromMap() constructor and I get the error given in this issue. It seems that the prefs attribute in the User object returns a List instead of a Map. If I understand correctly, what used to be a User object is now an Account object and the Account response works correctly, but I am getting a User response where the prefs attribute is still the wrong type. I'm not sure if this behavior is considered an error or not, but I'd thought I'd mention it. Perhaps I'm not using the application as intended. |
@jonscoresby it might be best to either create a new issue or join us on Discord. If you want to create an issue, please make sure to include you code, full error, and the response from Appwrite. 🙏🏼 |
Issue description:
when I execute
User _response = await Connection.instance.account.get();
, it gives an error:I suppose the cause of this issue is that the resposne map in
account.dart:19
:is a map with a key "prefs" -> List:

Which later, in
user.dart:41
:gets treated as a map.
The text was updated successfully, but these errors were encountered: