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
- I'm experiencing a critical bug on Appwr...
Hey <@870607367597850624> team / support š I'm experiencing a critical bug on Appwrite Cloud that's blocking my production Flutter app. I've already filed GitH...
- Database listRows method call failing in...
I'm getting an error when trying to use listRows in a flutter app on a database. It seems something in the backend has changed because the production version of...
- Google's "Choose an account" screen stuc...
I've been struggling with this problem on my servers (self hosted 1.6.0 & 1.7.4) , multiple projects , multiple apps , and I think I have reached a very strange...