Over the past two months, my app has become significantly more complex. I use Transactions to complete 90% of all document writes client side. I have added quite a few listeners recently as well. Over the apps development, a linear increase in transaction and listener usage has caused an exponential spike in crashes. These crashes are just from testing using one device! Furthermore, the crashes happen exclusively on Android devices...
These are the four causes of every crash my app has seen:
- io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$5.doInBackground(CloudFirestorePlugin.java:613)
- io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$DocumentObserver.onEvent (CloudFirestorePlugin.java:429)
- io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$EventObserver.onEvent (CloudFirestorePlugin.java:451)
- io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$5.doInBackground (CloudFirestorePlugin.java:633)
The information provided doesn't help in narrowing down the problem. I would normally assume that I am doing something wrong, but the fact that this occurs exclusively on android devices leads me to believe something is wrong at the package level. Digging online through forums and documentation it appears I am not alone with this Firestore Transaction/Listener related issue.
Has anybody had similar issues and found a solution? This isn't only a problem for me, it's a show stopper.
Is it possible that since introducing listeners I have created this problem?