account.get() takes too much time to give response in android studio.
Can you show your code? What version of Appwrite?
It's possible that Appwrite Cloud is undergoing it's daily backup, which might be causing the issue
i am using appwrite cloud
this is my code
suspend fun getUser(): Resource<User<Map<String,Any>>?> { return withContext(Dispatchers.IO) { try { val response = account.get() Resource.Success(response)
}catch (e:AppwriteException){
if(e.type.equals("general_unauthorized_scope")){
Resource.Success(null)
}else{
Resource.Error(e.message ?: "An error occurred")
}
}
catch (e: Exception) {
Resource.Error(e.message ?: "An error occurred")
}
}
}
Btw, it's best to use 3 back ticks with multi-line code. See https://www.markdownguide.org/extended-syntax/#syntax-highlighting
Are you connecting to Appwrite cloud? If so, where are you located?
How long is too long? Maybe you can log the time before and after the request?
how will i know cloud location ?
im asking you where you are located. Appwrite Cloud is currently in frankfurt
India
so thats why it takes so much time according to self hosting
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:...
- OAuth Missing redirect URL
Hello all, on a Flutter mobile app with latest Appwrite dependency (25.4.0) I always got "Missing redirect URL" - "Your OAuth login flow is missing a proper red...
- Need Help on Self Hosted Version of Appw...
Hi i wanted to test SMS OTP verify method but i am not able to do it. I follow all the steps but no luck. Please help me with this. I am using Appwrite self hos...