Android Версия 8.0
Я работаю над простым приложением для чата в реальном времени с использованием FireStore, и приведенный ниже код прекрасно работает на моих друзьях Xiaomi и моем старом Samsung Galaxy TabA, но не работает на Galaxy TabA6 +
class ChatFragment : BaseFragment() {
private val database = FirebaseFirestore.getInstance()
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
dialog = database.collection(chatType).document(user.email) // crash
...
}
}
Журналы ошибок:
java.lang.RuntimeException: Internal error in Firestore (0.6.6-dev).
at com.google.firebase.firestore.obfuscated.zzgf.zzb(com.google.firebase:firebase-firestore@@17.1.1:377)
at com.google.firebase.firestore.obfuscated.zzgk.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Cannot perform this operation because there is no current transaction.
at com.google.firebase.firestore.obfuscated.zzgf.zza(com.google.firebase:firebase-firestore@@17.1.1:288)
at com.google.firebase.firestore.obfuscated.zzgi.run(Unknown Source:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at com.google.firebase.firestore.obfuscated.zzgf$zza.run(com.google.firebase:firebase-firestore@@17.1.1:203)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.IllegalStateException: Cannot perform this operation because there is no current transaction.
at android.database.sqlite.SQLiteSession.throwIfNoTransaction(SQLiteSession.java:925)
at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:398)
at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:683)
at com.google.firebase.firestore.obfuscated.zzcw.zza(com.google.firebase:firebase-firestore@@17.1.1:155)
at com.google.firebase.firestore.obfuscated.zzbg.zzd(com.google.firebase:firebase-firestore@@17.1.1:160)
at com.google.firebase.firestore.obfuscated.zzbg.zza(com.google.firebase:firebase-firestore@@17.1.1:156)
at com.google.firebase.firestore.obfuscated.zzm.zza(com.google.firebase:firebase-firestore@@17.1.1:1224)
at com.google.firebase.firestore.obfuscated.zzt.run(Unknown Source:8)
at com.google.firebase.firestore.obfuscated.zzgf.zzc(com.google.firebase:firebase-firestore@@17.1.1:309)
at com.google.firebase.firestore.obfuscated.zzgj.call(Unknown Source:2)
at com.google.firebase.firestore.obfuscated.zzgf.zza(com.google.firebase:firebase-firestore@@17.1.1:285)
at com.google.firebase.firestore.obfuscated.zzgi.run(Unknown Source:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at com.google.firebase.firestore.obfuscated.zzgf$zza.run(com.google.firebase:firebase-firestore@@17.1.1:203)
at java.lang.Thread.run(Thread.java:764)
У кого-нибудь была похожая проблема?
Переустановка, очистка данных приложения и даже перезапуск устройства не помогли.