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
- Android SDK: Kotlin null Value Not Updat...
Hi team, I think you should check the Android SDK implementation once, as it seems to have an issue handling Kotlin **null** values. For example: When I send:...
- Unable to init function via cli
Hello! I have created a new self hosted instance of appwrite 1.9.6 and have connected to that insatnce with the cli 27.2.0 that was released a few hours ago. Wh...
- GB Hours IS NOT resetting
Hi, I was checking my usage and noticed that all of my usage quotas were reset on August 20, 2026, when my billing cycle renewed. Everything else appears to ha...