title: How to use kotlin coroutines in firebase database
body: <p>I'm trying to access chatting room Using firestore and coroutines.</p>
  
  <pre><code>    fun getOwner() {
          runBlocking {
              var de = async(Dispatchers.IO) {
                  firestore.collection("Chat").document("cF7DrENgQ4noWjr3SxKX").get()
              }
              var result = de.await().result
          }
  </code></pre>
  
  <p>But i get error like this :</p>
  
  <pre><code>E/AndroidRuntime: FATAL EXCEPTION: Timer-0
      Process: com.example.map_fetchuser_trest, PID: 19329
      java.lang.IllegalStateException: Task is not yet complete
          at com.google.android.gms.common.internal.Preconditions.checkState(Unknown Source:29)
          at com.google.android.gms.tasks.zzu.zzb(Unknown Source:121)
          at com.google.android.gms.tasks.zzu.getResult(Unknown Source:12)
          at com.example.map_fetchuser_trest.model.Repository$getOwner$1.invokeSuspend(Repository.kt:53)
  </code></pre>
  
  <p>How can i get chat document? when i use origin api like below, I can access chat room document.</p>
  
  <pre><code>        firestore.collection("Chat").document(
              "cF7DrENgQ4noWjr3SxKX"
          ).get().addOnCompleteListener { task -&gt;
              if (task.isSuccessful) {
                  val chatDTO = task.result?.toObject(Appointment::class.java)
              }
          }
  </code></pre>