#409 Conflict - user_already_exists

7 messages · Page 1 of 1 (latest)

lilac quarry
#

Hey,

I have been facing this issue on one of the projects in appwrite cloud

I am sure that it is a bug because i have the exact same setup on another project and i don't see any issues.

This is happening only while creating a user using account.create()

I have used ID.unique()

I tried custom id generated logjc as well but still get the same error

This is critical, please help

sacred geyser
#

Check how many users there are and whether their email addresses or phone numbers have the same value as the user you entered.

lilac quarry
#

I have 23 users. There is no match with any email addresses or phone numbers

#

I have tried multiple times with dummy entries as well

I am able to create the same user on console but through account.create() it fails

sacred geyser
lilac quarry
#

Sure,

This is the code for account creation

`async createAccountWithoutSession(
email: string,
password: string,
name: string
) {
try {
const userAccount = await this.account.create(
ID.unique(),
email,
password,
name
);

  if (userAccount) {
    return {
      success: true,
      userId: userAccount.$id,
      message: "Account created successfully without session.",
    };
  }

  return { success: false, message: "Account creation failed" };
} catch (error) {
  throw error as Error;
}

}`