cmcrawford2Original post
Apple Developer
I'm working with React Native. I'm getting the error message "AppwriteException: Create of a session is prohibited when a session is active." I restarted everything, even turned off my phone and turned it back on. Still getting the same error message.
`export async function signIn(email, password) {
try {
const session = await account.createEmailPasswordSession(email, password);
return session;
} catch (error) {
throw new Error(error);
}
}`
Summary
Developers experiencing an error message in React Native: "AppwriteException: Create of a session is prohibited when a session is active." Restarting and rebooting the phone did not resolve the issue. The problem lies within the attempt to create a session while one is already active. To fix this, either verify the session status or handle session creation differently to prevent this conflict.