title: Firestore database keeps crashing
body: <p>I have successfully migrated my app from RealtimeDB to Firestore but after migrating the app crashes too often with the following error, how to fix this?. I have never run in to this error while using RealtimeDB</p>
  
  <pre><code>Fatal Exception: java.lang.RuntimeException: Internal error in Firestore (0.6.6-dev).
  
     at com.google.android.gms.internal.zzejs.run(Unknown Source)
     at android.os.Handler.handleCallback(Handler.java:751)
     at android.os.Handler.dispatchMessage(Handler.java:95)
     at android.os.Looper.loop(Looper.java:154)
     at android.app.ActivityThread.main(ActivityThread.java:6184)
     at java.lang.reflect.Method.invoke(Method.java)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:788)`
  
  Caused by java.lang.RuntimeException: Failed to gain exclusive lock to the Firestore client's offline persistence. 
  This generally means you are using Firestore from multiple processes in your app. 
  Keep in mind that multi-process Android apps execute the code in your Application class in all processes, 
  so you may need to avoid initializing Firestore in your Application class. 
  If you are intentionally using Firestore from multiple processes, 
  you can only enable offline persistence (i.e. call setPersistenceEnabled(true)) in one of them.
  
    `at com.google.android.gms.internal.zzefi.start(Unknown Source)
     at com.google.android.gms.internal.zzeca.zza(Unknown Source)
     at com.google.android.gms.internal.zzecc.run(Unknown Source)
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
     at com.google.android.gms.internal.zzejp$zza.run(Unknown Source)
     at java.lang.Thread.run(Thread.java:761)`
  </code></pre>