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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AppwriteException: Invalid email param: Value must be a valid email address] #15

Open
2 tasks done
Suvrajit69 opened this issue Apr 28, 2024 · 3 comments
Open
2 tasks done
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@Suvrajit69
Copy link

Suvrajit69 commented Apr 28, 2024

馃憻 Reproduction steps

I just simply trying to register user based on email and password. This function is responsible for createUser.

export async function createUser(email, password, userName) {
  try {

    const newAccount = await account.create(
      ID.unique(),
      email,
      password,
      userName
    );
    // .catch((error) => console.log(error));

    console.log(newAccount);
    if (!newAccount) throw Error;

    const avatarUrl = avatar.getInitials(userName);

    await signIn(email, password);

    const newUser = await databases.createDocument(
      appwriteConfig.databaseId,
      appwriteConfig.userCollectionId,
      ID.unique(),
      {
        accountId: newAccount.$id,
        email: email,
        userName: userName,
        avatar: avatarUrl,
      }
    );
    return newUser;
  } catch (error) {
    console.log(error);
    throw new Error(error);
  }
}

馃憤 Expected behavior

It should register user but gives error

馃憥 Actual Behavior

[AppwriteException: Invalid email param: Value must be a valid email address]

馃幉 Appwrite version

Version 0.10.x

馃捇 Operating system

Linux

馃П Your Environment

No response

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

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

@Suvrajit69 Suvrajit69 added the bug Something isn't working label Apr 28, 2024
@stnguyen90
Copy link
Contributor

@Suvrajit69, thanks for creating this issue! 馃檹馃徏 Would you please log email before it's passed into account.create() or share the payload of the request?

@stnguyen90 stnguyen90 self-assigned this May 15, 2024
@stnguyen90 stnguyen90 added the question Further information is requested label May 15, 2024
@Krijestorac
Copy link

I got the same issue for this code as well. Can someone help?

@KyuubiTila
Copy link

If appwrite aren't interested in building a stable service maybe you all should throw the project into the bin and focus on writing html templates. because why have I been having [AppwriteException: Network request failed] thrown at my face all over development for the past 3 days now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants