Back

[AppwriteException: anshdjab@dhwjs.com (role: users) missing scope (collections.read)]

  • 1
  • Databases
xSenny_
2 May, 2024, 10:23

I already gave access to all of my users to access the database collection. Is there another problem?

TypeScript
await databases.listDocuments(
      appwriteConfig.userCollectionId, [], 10, 0,
      [
        Query.equal("age", form.age),
        Query.equal("characteristics"), JSON.stringify(form.characteristics),
        Query.equal("hobbies"), JSON.stringify(form.hobbies),
        Query.equal("region", form.sector),
        Query.equal("gender", gender)
      ]
    ).then((res) => {
      users = res.documents;
    }).catch((e) => {
      console.log('eroare', e)
    })```
TL;DR
Issue: AppwriteException is occurring due to a missing scope (collections.read) for a specific role (users) with the given email address. Developers are working with React Native and Expo. It's not Android-specific and there doesn't seem to be a framework causing the problem. The code snippet is querying a database collection but is missing proper scope permissions. Check and ensure that the users have the necessary scope to read collections.
D5
2 May, 2024, 10:33

Is this Android, JS? Are you using some framework?

xSenny_
2 May, 2024, 10:33

yes with react native expo

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