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
- React native Google OAuth not working - ...
## Code: *Pretty much just copied from appwrite docs* ```javascript const signInWithOAuth = async (provider) => { setLoading(true); try { // Crea...
- [AppwriteException: User (role: guests) ...
User signs in succesfully but after when trying to get currentuser i get the error above. It has been working for month with a user. now i implemented signup a...
- TMDB API got suck
Adamnaeman: Hi guys, Sorry for interrupt. I got a problem where my page does not repond to the TMDB API. The link youtube is the tutorial that I follow. For the...
