Skip to content
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

🐛 Bug Report: Error 500 when invoking account.createVerification on previously anonymous users #5220

Closed
2 tasks done
hosnipogi opened this issue Mar 13, 2023 · 6 comments
Closed
2 tasks done
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.
Milestone

Comments

@hosnipogi
Copy link

hosnipogi commented Mar 13, 2023

👟 Reproduction steps

  1. Create an anonymous session
await appwrite.account.createAnonymousSession();
  1. Anonymous user decides to sign up/create an account
const user = await appwrite.account.updateEmail(email, password); 
  1. Login the previously anonymous user
await appwrite.account.createEmailSession(user.email, val.password);
  1. Send a verification email to the newly signed up user
await appwrite.account.createVerification(
  `${window.location.origin}/account-verify`
); 
  1. Response from server is an Error 500

👍 Expected behavior

Show a much more meaningful error message or make user name field optional or default to an empty string instead of null

👎 Actual Behavior

500 error response, upon inspecting appwrite docker logs, the error is due to assigning null to the user's name field:

[Error] Message: Appwrite\Event\Mail::setName(): Argument #1 ($name) must be of type string, null given, called in /usr/src/code/app/controllers/api/account.php on line 2159

🎲 Appwrite version

Version 1.2.x

💻 Operating system

MacOS

🧱 Your Environment

NodeJS Server: node-appwrite ^8.2.0
Browser Client: appwrite ^10.1.0

👀 Have you spent some time to check if this issue has been raised before?

🏢 Have you read the Code of Conduct?

@hosnipogi hosnipogi added the bug Something isn't working label Mar 13, 2023
@stnguyen90 stnguyen90 added the product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services. label Mar 15, 2023
@stnguyen90
Copy link
Contributor

@hosnipogi, thanks for creating this issue! 🙏🏼 I think we should have a default for the name, but let me check what that should be.

@stnguyen90 stnguyen90 added help wanted Extra attention is needed good first issue Good for newcomers labels Apr 28, 2023
@divinenaman
Copy link

@stnguyen90 can I take this up ?

@pechtelt1
Copy link

#5495

@pechtelt1 pechtelt1 mentioned this issue May 3, 2023
2 tasks
@stnguyen90
Copy link
Contributor

@divinenaman, are you still interested in working on this?

@stnguyen90
Copy link
Contributor

@pechtelt1, I've assigned the issue to you and left a comment in your PR

@stnguyen90 stnguyen90 added this to the 1.4.0 milestone May 30, 2023
@vaibhavagarwal220
Copy link
Contributor

Can I be assigned to this, @stnguyen90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.
Projects
None yet
Development

No branches or pull requests

5 participants