Skip to content
Back

Wierd Error during user account creation

  • 1
  • Web
  • Databases
  • Accounts
  • Cloud
  • Users
Zentagonist
24 Feb, 2024, 18:18

so im working with typescript and react with appwrite to create a social media app but i keep encounteing these two errors when creating the auth part for creating new users and adding them to the users collection When i reload the page before filling the form : AppwriteException: User (role: guests) missing scope (account) when i fill the sign up form and click on sign-up : AppwriteException: Server Error

Would appreciate any help as this is my end of studies project

TL;DR
Developers having errors during user account creation while working on a social media app using TypeScript, React, and Appwrite. Missing scope error and server error encountered. Granting full permissions to the comments collection related to users fixed the issue. Make sure to call `account.get()` with a session to avoid errors. Remember to ensure read access to related documents. Check project ID if server error persists. Despite errors, users are successfully added to the collection.
Steven
24 Feb, 2024, 18:23

If you call account.get() without a session, you'll get that error. It's expected.

The server error is probably due to something you're passing. What's your project id?

Zentagonist
24 Feb, 2024, 18:25
Steven
24 Feb, 2024, 18:27

Copy and paste here please

Zentagonist
24 Feb, 2024, 18:28

my bad , the project id is 65a003e0932f8903a34f

Zentagonist
24 Feb, 2024, 18:33

please note that despite these two errors , when i check the user collection in the console , i find the user is indeed added there

Steven
24 Feb, 2024, 18:34

The server error is because you're missing read access to some related document

Zentagonist
24 Feb, 2024, 18:37

i didnt understand , can i fix this from the console or my code ? because i know i gave all the permissions to the users collection

Steven
24 Feb, 2024, 18:38

And to everything related too?

Zentagonist
24 Feb, 2024, 18:45

i just added full permissions to the comments collection related to the users collection and it seems to have fixed the issue

Zentagonist
24 Feb, 2024, 18:46

how can i fix the missing scope error tho ? as it is expected and im still working through the signup only , shall i ignore it ?

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