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
- Subscription Problem
I'm making an app in RN with Expo and Appwrite and there's a functionality which allows the user to create a task/test (i'll be reffering to them collectively a...
- Auth not working on expo react native
I'm trying to launch a development server with expo go and appwrite as a backend. On my windows pc, I've got a local docker instance of appwrite running as my b...
- Bug Report: Crash when trying to createR...
https://github.com/appwrite/sdk-for-android/issues/96 I think the bug is related with this one https://discord.com/channels/564160730845151244/1443887021314539...