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 is shown, but user is still created #80

Closed
2 tasks done
psschand16 opened this issue Jan 31, 2023 · 7 comments
Closed
2 tasks done

🐛 Bug Report: Error is shown, but user is still created #80

psschand16 opened this issue Jan 31, 2023 · 7 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@psschand16
Copy link

psschand16 commented Jan 31, 2023

👟 Reproduction steps

Account Registration and other api endpoints are not stable or not idempotant.

I am using the below cdn

<script src="https://cdn.jsdelivr.net/npm/[email protected]" />

on debugging I its failing below, which is in Web SDK in /appwrite/src/services/account.ts


 const uri = new URL(this.client.config.endpoint + path);
            return await this.client.call('post', uri, {
                'content-type': 'application/json',
            }, payload);

abc143 register successful Screenshot 2023-01-31 100020

abc144 failed to create account Screenshot 2023-01-31 100433

appwrite console Screenshot 2023-01-31 100536

👍 Expected behavior

Ideally user is either created or not created.
users should be created as account api is called with necessary parameters

👎 Actual Behavior

I am getting different results for the same endpoint
As an example in the case of a register register endpoint.

case 1: account created successfully
I recieve a popup that account is created successfully.

case 2: account not created successfully but user is successfully entered in Appwrite auth console
you get a popup user not created but you can find them appwrite console

case 3: account not created successfully but user is not found in Appwrite auth console

🎲 Appwrite version

Version 1.2.x

💻 Operating system

Windows

🧱 Your Environment

web sdk
index.html on a live server

👀 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?

@psschand16 psschand16 added the bug Something isn't working label Jan 31, 2023
@psschand16
Copy link
Author

@stnguyen90 stnguyen90 changed the title 🐛 Bug Report: 🐛 Bug Report: Error is shown, but user is still created Jan 31, 2023
@stnguyen90
Copy link
Contributor

@psschand16, thanks for creating this issue! 🙏🏼

case 2: account not created successfully but user is successfully entered in Appwrite auth console
you get a popup user not created but you can find them appwrite console

Would you please share what the HTTP response body is for this case? The screenshot you shared is for a different network request rather than the API call to create the account.

@stnguyen90 stnguyen90 self-assigned this Jan 31, 2023
@psschand16
Copy link
Author

psschand16 commented Feb 1, 2023

Hi @stnguyen90 , Many Thanks for looking into this and editing this.

please note you can test the same html/javascript app at the below link
https://appwrite.omggn.tk/

I am sharing screenshots of the network requests below, for that case 2.

image
image
image

image
image
image
image
image
image

@stnguyen90
Copy link
Contributor

@psschand16, thanks for all the info! 🙏🏼 I think the form is submitting and canceling the network request. we should probably add some event.preventDefault() call or something.

@smilebasti
Copy link

Hi,
would be great to see this implemented :)

@psschand16 have you found a solution or workaround?

@smilebasti
Copy link

If anybody else finds this issue, i fixed it with this merge request commit: #66

See commit 1 481e1c3

@stnguyen90
Copy link
Contributor

Fixed as part of #83

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
Projects
None yet
Development

No branches or pull requests

3 participants