sdk-generator icon indicating copy to clipboard operation
sdk-generator copied to clipboard

Fix 30 add null value handling in user model

Open theemaster opened this issue 11 months ago • 9 comments

What does this PR do?

Fix User Model to handle null values for password, hash and hashOptions.

Test Plan

When using a JWT to authenticate and use Account.Get() there should no longer be an error.

Related PRs and Issues

🐛 Bug Report: Bug acquiring users on server side

Credit

Credit goes to @joaquingrech.

theemaster avatar Mar 13 '24 22:03 theemaster

I am experiencing this same error, was debugging a bit and couldn't find why on my side

nove1398 avatar Apr 14 '24 17:04 nove1398

I am experiencing this same error, was debugging a bit and couldn't find why on my side

It is because they never merged the fix. It is also in the latest 1.5. I'm surprised it passed release since if you don't use a password and login using Google or any other auth system, all queries for that user will always fail.

joaquingrech avatar Apr 14 '24 17:04 joaquingrech

Because the fix hasn't been reviewed yet and merged/released I have forked the dotnet repository and created a temporary nuget package with the package name theemaster.appwrite. You could use it temporarily until the fix has been released.

theemaster avatar Apr 14 '24 17:04 theemaster

How can we get some more eyes on this issue? The changes seem small enough where it could get applied as a patch.

nove1398 avatar Apr 14 '24 23:04 nove1398

I can confirm for me the password key error stops with your changes, but now i am getting it for mfa as well lol, i think the dictionary values should all be checked by TryGet in this User class

nove1398 avatar Apr 15 '24 01:04 nove1398

I can confirm for me the password key error stops with your changes, but now i am getting it for mfa as well lol, i think the dictionary values should all be checked by TryGet in this User class

Only the Mfa field or Totp also?

adityaoberai avatar Apr 15 '24 13:04 adityaoberai

I can confirm for me the password key error stops with your changes, but now i am getting it for mfa as well lol, i think the dictionary values should all be checked by TryGet in this User class

Only the Mfa field or Totp also?

Totp too, however I know what my problem is, I was using cloud with the fix meaning the response is trying to parse data the Server is not providing. When I use an older version of the fix it works as expected, and I am able to continue my dev work. Thanks for addressing this so quickly

nove1398 avatar Apr 15 '24 13:04 nove1398

I can confirm for me the password key error stops with your changes, but now i am getting it for mfa as well lol, i think the dictionary values should all be checked by TryGet in this User class

Only the Mfa field or Totp also?

Totp too, however I know what my problem is, I was using cloud with the fix meaning the response is trying to parse data the Server is not providing. When I use an older version of the fix it works as expected, and I am able to continue my dev work. Thanks for addressing this so quickly

Ah yes. That would work fine as soon as cloud is upgraded to 1.5.*

@lohanidamodar, in that case we should be good to merge this

adityaoberai avatar Apr 15 '24 13:04 adityaoberai

I can confirm for me the password key error stops with your changes, but now i am getting it for mfa as well lol, i think the dictionary values should all be checked by TryGet in this User class

Only the Mfa field or Totp also?

Totp too, however I know what my problem is, I was using cloud with the fix meaning the response is trying to parse data the Server is not providing. When I use an older version of the fix it works as expected, and I am able to continue my dev work. Thanks for addressing this so quickly

Ah yes. That would work fine as soon as cloud is upgraded to 1.5.*

@lohanidamodar, in that case we should be good to merge this

Thanks #TeamAppwrite ! I am happy to know .Net is not the forgotten language lol :) <3 I look forward to the cloud migration to 1.5 in the coming weeks. I have been working with some clients and ultimately I am recommending them to come onboard to the Appwrite platform. #DevRelations

nove1398 avatar Apr 15 '24 13:04 nove1398