If I don't finally find solution I'll send code here
I need to learn more
It returns two io.appwrite.exceptions.AppwriteException: User (role: guests) missing scope (account)
why?
This typically happens when you don't have a session which makes sense because you're calling account.getSession() before a session is created
In first situation sessionId string is not founded in debug and that's why it don"t work
I need to call deleteSession later?
no.
when you create a session, you get a session id. or you can call getSession. i don't really understand why you need to store it in shared preferences
....
String newSessionId is getting value from createEmailSession()
But when I going outside createEmailSession newSessionId value is null and catch's error in first code variation
Of course
I finally understand why problem here
In my code first instruction is account.create()
In account.create() other data saving code
But this code start compilation when account and Session created
But account.getSession() and account.deleteSession() starts work right now
And this is why i catch this error twice
I need to start this code only after account.create() full compilation
But I need to do it only outside
account.create() method
I solved this! I add boolean and when boolean == true session deletes
But I need to put it in AsyncTask because app is lagged when account creates
[SOLVED] Error when import java + kotlin sdk
Recommended threads
- Cannot migrate from Supabase
Hi, I was trying to migrate from Supabase to the Appwrite database. My database had around 190K columns. I tried it twice. Both times, after 2 days, the proce...
- Appwrite Remote MCP Server not working i...
Whenever I tried Authenticate - Appwrite Login in Browser - Paste Code, it always says `Error: calling "initialize": sending "initialize": Unauthorized` Already...
- "Invalid console fingerprint" when unpau...
I've tried logging out and logging back in, still can't figure out why this is happening.