Possible unhandled promise rejection (id: 0): Error: AppwriteException: User (role: guests) missing
- 0
- React Native

Hello everyone, I need some help. I am building a mobile application with expo react native but I am getting this error: "Possible unhandled promise rejection (id: 0): Error: AppwriteException: User (role: guests) missing scope"
here is my code const client = new Client();
client .setEndpoint('') .setProject('');
const account = new Account(client);
export async function verifyNumber(userId, phoneNumber) { try {
const response = await account.createPhoneToken(
userId, // userId
phoneNumber // phone
);
console.log(response.userId);
AsyncStorage.setItem('userId', response.userId);
return response.userId;
} catch (error) {
throw new Error(error);
}
}
export async function checkOtp(userId, secret){ console.log(userId: ${userId}, secret: ${Number(secret)}); // Log the inputs try { const response = await account.updatePhoneSession( userId, // userId secret // secret ); console.log(response);
} catch (error) {
console.error(error.message);
throw new Error(error)
}
}
// Sign Out Appwrite export async function signOutAppWrite() { try { const session = await account.deleteSession("current");
return session;
} catch (error) {
throw new Error(error);
}
} I don't know how to solve this issue, please could i get some help
Recommended threads
- Get all Documents and Expanded Relations...
I have multiple (quite small) collections that have many-to-many relationships. How can we return all documents and expanded relationship for a specific collec...
- Functions Failing Due to Installed Depen...
Hi team! Before anything, I am on the so far while we're in the planning phase of the app, and will be upgrading to pro soon. If there's a possibility that this...
- OAUTH Error 400
I’m encountering an issue with authentication with google or apple in my Expo React Native app. It was working previously, but it has recently stopped keeping, ...
