英文:
NSInternalInconsistencyException in Firebase
问题
我在firebase中遇到了崩溃。我在下面附上了一个屏幕截图,请查看一下。
任何支持都将不胜感激。
我尝试了一些do-try-catch方法。但我认为firebase的API没有抛出任何错误。这并不有用。
最近我们遇到了许多崩溃,错误如下:
FIRESTORE内部断言失败:无法提交事务:<LevelDbTransaction NextMutationBatchAfterBatchID: 0 changes (0 bytes):> 失败:IO错误:/var/mobile/Containers/Data/Application/1D9183C6-D12F-42CB-8A18-A408B7F5F841/Library/Application Support/firestore/__FIRAPP_DEFAULT/[APP-NAME]/main/001236.ldb:设备上没有剩余空间(预期状态.ok())
英文:
I am having a crash in firebase. I have attached a screen shot below. please have a look.
Any support will be highly appreciated.
I Tried some do-try-catch method. But i think that firebase api is not throwing any error. it is not useful.
We had a lot of crash recently with the following error:
FIRESTORE INTERNAL ASSERTION FAILED: Failed to commit transaction: <LevelDbTransaction NextMutationBatchAfterBatchID: 0 changes (0 bytes):> Failed: IO error: /var/mobile/Containers/Data/Application/1D9183C6-D12F-42CB-8A18-A408B7F5F841/Library/Application Support/firestore/__FIRAPP_DEFAULT/[APP-NAME]/main/001236.ldb: No space left on device (expected status.ok())
答案1
得分: 1
以下是翻译好的部分:
似乎错误消息是由于Firestore内部的问题导致的。
以下是您可以尝试的故障排除步骤:
-
监控设备上的可用空间,并在可用空间降至某个阈值以下时禁用持久性。要禁用持久性,您需要通过调用其终止方法来关闭FIRFirestore实例。您甚至可以通过调用clearPersistence来释放一些磁盘空间。然后,您可以使用FIRFirestoreSettings对象重新启动FIRFirestore实例,将其persistenceEnabled属性设置为false。
-
限制缓存大小。此值可以在FIRFirestoreSettings的cacheSizeBytes属性中指定。
您还可以参考此GitHub 链接 以获取更多信息。
英文:
It seems the error message is due to rough edges of Firestore internals.
Below are the troubleshooting steps which you can try:
-
Monitor free space on the device and disable persistence if free space drops below a certain threshold.In order to disable persistence, you would need to shut down the FIRFirestore instance by calling its terminate method. You could even free up a bit of disk space by calling clearPersistence. Then, you can restart the FIRFirestore instance with a FIRFirestoreSettings object with its persistenceEnabled property set to false.
-
Limit the cache size. This value can be specified in the FIRFirestoreSettings cacheSizeBytes property.
You can also refer to this github link for more information.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论