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
- is `account.get()` safe to be used in th...
I want to user's `id` for authentication. However, a while ago I was told in this server not to use `account.get()` and instead add user preferences for that us...
- {"code": 1008, "message": "Invalid Origi...
Nothing has changed in my application or console settings so I'm curious as to what I need to do to fix this. I already have the client registered so I'm not en...
- mcp-server-appwrite 0.4 fails on startup...
I’m trying to use `mcp-server-appwrite` against Appwrite Cloud and the server authenticates successfully, but fails during startup validation when probing `tabl...