Back

A user with the same id, email, or phone already exists in this project.

  • 1
  • Auth
  • Web
  • Cloud
henqsoft
30 Oct, 2024, 21:53

My Signup Form does not seem to work and the Auth is very hard:

I attached the signup and the AuthContext:

TL;DR
Developers are facing issues where a user with the same id, email, or phone already exists in the project when trying to register users via their appwrite service. The solution involves ensuring a unique ID is generated and no conflicting values are being passed. Verification of email availability in the project is crucial to avoid conflicts.
Kenny
30 Oct, 2024, 21:54

What doesn't work? Are you getting errors? What's the error?

henqsoft
30 Oct, 2024, 21:57

Yes, the error I get is email is already taken even when the user email is a new one and does not exist in database

henqsoft
30 Oct, 2024, 21:57

I can see the users that singup on the database

Kenny
30 Oct, 2024, 21:58

What is the exact error from this

console.error("Registration error:", err);

henqsoft
30 Oct, 2024, 21:59

Okay I am getting two errors

henqsoft
30 Oct, 2024, 21:59
henqsoft
30 Oct, 2024, 21:59

This is the second: AuthContext.jsx:71 Registration error: AppwriteException: A user with the same id, email, or phone already exists in this project. at _Client.<anonymous> (http://localhost:3000/node_modules/.vite/deps/appwrite.js?v=2d1e6e71:466:15) at Generator.next (<anonymous>) at fulfilled (http://localhost:3000/node_modules/.vite/deps/appwrite.js?v=2d1e6e71:13:24)

henqsoft
30 Oct, 2024, 23:54

I created seven users

Kenny
30 Oct, 2024, 23:55

Could you send a screenshot of just the name/identifier like this

henqsoft
30 Oct, 2024, 23:56

Okay let me do that

henqsoft
30 Oct, 2024, 23:58

This is it

Kenny
30 Oct, 2024, 23:59

Did you create those manually?

henqsoft
30 Oct, 2024, 23:59

yes

henqsoft
30 Oct, 2024, 23:59

I did

Kenny
31 Oct, 2024, 00:06

I don't think it'll do anything but you should await registerUser when you're calling it

Kenny
31 Oct, 2024, 00:08

open dev tools in the browser and go to the network tab and see the post request it's making

Kenny
31 Oct, 2024, 00:08

but honestly I don't see what could be the issue rn

henqsoft
31 Oct, 2024, 00:13

WOW, This is peak frustration. For over two weeks with an ordinary auth bug

henqsoft
31 Oct, 2024, 00:13

Let me try this

Kenny
31 Oct, 2024, 00:14

Honestly I've never ran into this issue, I think it's something to do with how you've setup your context.

henqsoft
31 Oct, 2024, 00:15

I want to try the signup without using context again

henqsoft
31 Oct, 2024, 00:24

Thanks a lot @Kenny I really appreciate. It did not work but it is super late here. I will troubleshoot in the morning

Steven
31 Oct, 2024, 00:36

A user with the same id, email, or phone already exists in this project.

henqsoft
31 Oct, 2024, 17:51

For some weird reason, I created a new project overnight and the auth seems to work

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more